Injecting modules into exeDSP

Ideas and dreaming will go this forum

smartsmurf
Official SamyGO Developer
Posts: 111
Joined: Thu Jun 24, 2010 8:26 am
Location: Frankfurt, Germany

Re: Injecting modules into exeDSP

Post by smartsmurf » Tue Nov 23, 2010 9:28 am

dirkbernhard wrote: Unfortunately I got the following error message :

Code: Select all

/mtd_rwarea/inject/injectso: /mtd_rwarea/inject/injectso: 1: Syntax error: ")" unexpected
(1) Please check injectso for corruption by just executing the "/mtd_rwarea/inject/injectso" executable.
(2) Then just check the command line which should be executed (see the post from tusko).
(3) If both items are working, then something ist wrong with your script.

pjslf
Posts: 17
Joined: Sat Dec 18, 2010 7:12 pm
Location: Czech Republic

Re: Injecting modules into exeDSP

Post by pjslf » Mon Dec 20, 2010 10:19 pm

Hi all,

firstly I would like to thank you for the great work done. I really appreciate it!

I was trying to load the channelinfo module via the injectso tool on my B550 TV, but unfortunately nothing happened. At first I tried to load the example module. I got lot of errors while looking for the symbols, but everything seemed to work great.

Code: Select all

# /mtd_rwarea/SamyGo/injectso `pidof exeDSP` /mtd_rwarea/SamyGo/testmodule/module.so Inject_Main /mtd_rwarea/SamyGo/testmodule/

Module injector V1.2 for ARM based CPUs.
(copyleft) SmartSmurf 2010 (smartsmurf@shared-files.de)

Info: Import dlopen set at 0x004a7878
Info: Import dlsym set at 0x004a6e70
Info: Import dlclose set at 0x004a6924
Info: current register set:
R0 =0xFFFFFFFC R1 =0x00000000 R2 =0x00000001 R3 =0x00000000
R4 =0x00000001 R5 =0x025D1038 R6 =0x020EC358 R7 =0x000000F0
R8 =0x00000000 R9 =0x00000000 R10=0xBED31A78 R11=0x00000000
R12=0x00000001 SP =0xBED31A68 LR =0x4005DA44 PC =0x4005B008
CPSR=0x80000010

Info: new SP for inject code 0xBED31668
Done.

Code: Select all

# cat /dtv/module.log
<Inject_Main>: module loaded.
<Inject_Main>: self path = '/mtd_exe/exeDSPyGo/c'.
<Inject_Main>: arg1 = '/mtd_rwarea/SamyGo/testmodule/'.
<Game_Main>: module loaded.
<Game_Main>: path = '/mtd_rwarea/SamyGo/testmodule/'.

Code: Select all

# cat /mtd_rwarea/etc/injectso.imports
004a7878 004a6e70 004a6924
Then I tried to load channelinfo module.

Code: Select all

# /mtd_rwarea/SamyGo/injectso `pidof exeDSP` /mtd_rwarea/SamyGo/channelinfo/loader.so Game_Main /mtd_rwarea/SamyGo/channelinfo/

Module injector V1.2 for ARM based CPUs.
(copyleft) SmartSmurf 2010 (smartsmurf@shared-files.de)

Info: Import dlopen set at 0x004a7878
Info: Import dlsym set at 0x004a6e70
Info: Import dlclose set at 0x004a6924
Info: current register set:
R0 =0xFFFFFFFC R1 =0x00000000 R2 =0x00000001 R3 =0x00000000
R4 =0x00000001 R5 =0x025D1038 R6 =0x020EC358 R7 =0x000000F0
R8 =0x00000000 R9 =0x00000000 R10=0xBED31A78 R11=0x00000000
R12=0x00000001 SP =0xBED31A68 LR =0x4005DA44 PC =0x4005B008
CPSR=0x80000010

Info: new SP for inject code 0xBED31668
Done.
But no "ChannelInfo" window showed up while switching channels. I still get only the "ChannelBox" window. I tried to grep /proc/`pidof exeDSP`/maps and it looks like module was not injected.

Code: Select all

# cat /proc/`pidof exeDSP`/maps | grep /mtd
00008000-01fa7000 r-xp 00000000 8a:0a 22         /mtd_exe/exeDSP
01fae000-020e9000 rw-p 01f9e000 8a:0a 22         /mtd_exe/exeDSP
40026000-4003a000 r-xp 00000000 8a:0b 2112       /mtd_appdata/Comp_LIB/libptp.so
4003a000-40041000 ---p 00014000 8a:0b 2112       /mtd_appdata/Comp_LIB/libptp.so
40041000-40042000 rw-p 00013000 8a:0b 2112       /mtd_appdata/Comp_LIB/libptp.so
40042000-40048000 r-xp 00000000 8a:0b 2114       /mtd_appdata/Comp_LIB/libusb.so
40048000-4004f000 ---p 00006000 8a:0b 2114       /mtd_appdata/Comp_LIB/libusb.so
4004f000-40051000 rw-p 00005000 8a:0b 2114       /mtd_appdata/Comp_LIB/libusb.so
Does anyone know what went wrong?
LE40B550A5WXXH | T-CHL5DEUC-2008.0 / patched u-boot / network support

pjslf
Posts: 17
Joined: Sat Dec 18, 2010 7:12 pm
Location: Czech Republic

Re: Injecting modules into exeDSP

Post by pjslf » Wed Dec 22, 2010 5:32 pm

Ok, it looks like nobody knows so I'll try to ask more general question. Is there any simple way to verify that the module was successfully injected? I used the /proc/`pidof exeDSP`/maps approach, but i'm not sure if it's the correct one.
LE40B550A5WXXH | T-CHL5DEUC-2008.0 / patched u-boot / network support

nostromo1983
Posts: 72
Joined: Sat Nov 07, 2009 4:39 pm

Re: Injecting modules into exeDSP

Post by nostromo1983 » Wed Dec 22, 2010 6:18 pm

I've wondered the exact same question, i'm injecting chaninfo sucessfully but i cant see the loader.so module inside exeDSP maps. If you dont see the .so into maps of exeDSP it does not necessary means it's not patched into memory.
Also i got the exact same issue you have with B550 and channel info patch some months ago. The problem resides into the patching function which is not searching the instruction at the right place with B550 firmware. The channel info function is slightly different between B650 and B550 and also between firmware of B550. In the meantime i swtich my firmware version to 2006.0 and the default module is working, but you need i could recompile the module to feet your version 2003.0. Can you tell me your current md5sum of loader.so?
Samsung LE32B554 T-CH5DEUC 2006.0 with patched u-boot for usb boot with OpenEmbedded custom kernel with network supported and usb rootfs

pjslf
Posts: 17
Joined: Sat Dec 18, 2010 7:12 pm
Location: Czech Republic

Re: Injecting modules into exeDSP

Post by pjslf » Wed Dec 22, 2010 6:28 pm

Thank you nostromo.

Code: Select all

$ md5sum ChannelInfo/loader.so
cbe7fc00046e76d09d79c786f46d330c  ChannelInfo/loader.so
LE40B550A5WXXH | T-CHL5DEUC-2008.0 / patched u-boot / network support

nostromo1983
Posts: 72
Joined: Sat Nov 07, 2009 4:39 pm

Re: Injecting modules into exeDSP

Post by nostromo1983 » Mon Dec 27, 2010 3:21 pm

Sorry for late answer. About firmware version 2003, seems like it's a buggy version that introduces also problem with SamygoDCA 0.3, i didn't have time to recompile chaninfo but i suggest you to upgrade to firmware T-CH5DEUC 2006 or maybe 2008. This way you'll avoid 2 problems, one with chaninfo and one with samygoDCA 0.3. I've seen you're trying to flash your B550 with network kernel into another thread. Is it probmematic to upgrade to 2006?
Samsung LE32B554 T-CH5DEUC 2006.0 with patched u-boot for usb boot with OpenEmbedded custom kernel with network supported and usb rootfs

pjslf
Posts: 17
Joined: Sat Dec 18, 2010 7:12 pm
Location: Czech Republic

Re: Injecting modules into exeDSP

Post by pjslf » Mon Dec 27, 2010 5:34 pm

I'm planning to flash the modified 2008 FW from juuso, which should fix the u-boot issue. Then i'll try to load channelinfo and dca module with injectso. If everything will work fine, i'll keep this version. In other case, i can try to boot 2006 FW via u-boot and give it a try. If i get it right, i still have to patch and recompile the channelinfo module to get it work on B550 no matter which version i'll use. Is it correct?
LE40B550A5WXXH | T-CHL5DEUC-2008.0 / patched u-boot / network support

nostromo1983
Posts: 72
Joined: Sat Nov 07, 2009 4:39 pm

Re: Injecting modules into exeDSP

Post by nostromo1983 » Mon Dec 27, 2010 7:49 pm

you dont need to recompile chaninfo if you get version 2006 or 2008 it should work with the default binary as is, afaik, that's why i suggest to leave version 2003 that seems that have also a bug with samygoDCA
Samsung LE32B554 T-CH5DEUC 2006.0 with patched u-boot for usb boot with OpenEmbedded custom kernel with network supported and usb rootfs

Post Reply

Return to “[B] Brainstorm”