Autoloader for custom "Game" plug-ins

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.
Post Reply

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Autoloader for custom "Game" plug-ins

Post by juusso »

i made the same:
bruintje71 wrote:I have put the gdb binary and the gdbtrick.sh script (the one last posted by Arris69) in the mtd_rwarea.
i left just channelinfo in gdbtrick.sh:

Code: Select all

#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_rwarea/
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_rwarea/gdbtrick.gdb
# gdb_delay: gdb will be scheduled to run after $gdb_delay seconds
#            this is for letting exeDSP to settle down at TV startup
gdb_delay=30
# libraries: absolute path of libraries to be loaded
#            there can be several, separated spaces!!
#            this script requires paths WITHOUT spaces
libraries="/mtd_tlib/GGame/channelinfo/loader.so" # add more libraries here
### end configure me
and after i run the script i am getting error

Code: Select all

 #mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 49
detach
---
will be executed by /mtd_rwarea/ in 30 secs!!

# mtd_rwarea/gdbtrick.sh: mtd_rwarea/gdbtrick.sh: 38: /mtd_rwarea/: Permission denied
The 38th line is

Code: Select all

{ sleep $gdb_delay; $gdb_binary -batch -x $gdb_commands; } &
what am i doing wrong? I chmoded gdb and gdbtrichk.sh to 755, what else?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Autoloader for custom "Game" plug-ins

Post by juusso »

bruintje71 wrote:I think you simply need to replace "gdb_binary=/mtd_rwarea/" by "gdb_binary=/mtd_rwarea/gdb"
Nothing happends. I use your script to run manualy. gdb library is placed in /mtd_rwarea/gdb. script is placed in /mtd_rwarea/. I stil get the same permission denied error. I seems that some permissions are not set, but why i allways get the same last line error?

Code: Select all

localhost login: root
-sh: id: not found
# mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 48
detach
---
will be executed by /mtd_rwarea/gdb in 5 secs!!

# mtd_rwarea/gdbtrick.sh: mtd_rwarea/gdbtrick.sh: 33: /mtd_rwarea/gdb: Permission denied
#
the script (called manually) does not return me the command-prompt cursor to, i have to press control-C to get it back.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Autoloader for custom "Game" plug-ins

Post by juusso »

gdb binary (sorry for library :)) is placed in /mtd_rwarea/gdb/gdb and chmoded to 755. Directory /mtd_rwarea/gdb/ chmoded to 777. Script is placed in /mtd_rwarea/ and chmoded to 755. /mtd_tlib/GGame/channelinfo/loader.so is in right place too and works well if loaded from game_menu. Here is my script

Code: Select all

#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_rwarea/gdb/
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_rwarea/gdbtrick.gdb
# gdb_delay: gdb will be scheduled to run after $gdb_delay seconds
#            this is for letting exeDSP to settle down at TV startup
gdb_delay=5
# libraries: absolute path of libraries to be loaded
#            there can be several, separated spaces!!
#            this script requires paths WITHOUT spaces
#libraries="/mtd_tlib/GGame/channelinfo/loader.so /mtd_tlib/GGame/avrfix2/telnet.so /mtd_tlib/GGame/Switch/loader.so" # add more libraries here
libraries="/mtd_tlib/GGame/channelinfo/loader.so" # add more libraries here
### end configure me
exeDSP_PID=$(pidof exeDSP)
temp='attach '$exeDSP_PID'\n'
i=0
for l in $libraries
do
        if [ -e "$l" ] ;then
                temp=$temp'call dlopen("'$l'", 2)\n'
                let i++
                temp=$temp'call dlsym($'$i', "Game_Main")\n'
                let i++
                temp=$temp'call $'$i'("'${l%/*}/'", 0)\n'
                let i++
        fi
done
temp=$temp'detach\n'
echo -e 'The following commands:\n---\n'$temp'---\nwill be executed by '$gdb_binary' in '$gdb_delay' secs!!\n'
echo -e $temp >$gdb_commands
{ sleep $gdb_delay; $gdb_binary -batch -x $gdb_commands; rm $gdb_commands; } &
and output:

Code: Select all

# chmod 755 mtd_rwarea/gdb
# /mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 48
call dlopen("/mtd_tlib/GGame/channelinfo/loader.so", 2)
call dlsym($1, "Game_Main")
call $2("/mtd_tlib/GGame/channelinfo/", 0)
detach
---
will be executed by /mtd_rwarea/gdb/ in 5 secs!!

# /mtd_rwarea/gdbtrick.sh: /mtd_rwarea/gdbtrick.sh: 33: /mtd_rwarea/gdb/: Permission denied

i tried to create an empty file, no success:
touch /mtd_rwarea/gdbtrick.gdb and chmod 777 /mtd_rwarea/gdbtrick.gdb
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[B] Software”