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.
#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/dtv/usb/sda1/gdb
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/dtv/usb/sda1/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 by commas (no spaces!!)
# this script requires paths WITHOUT spaces AND commas
libraries=/dtv/usb/sda1/samygoPVR/loader.so, # add more libraries here
### end configure me
libraries=$(echo $libraries | sed 's/\,/ /')
exeDSP_PID=$(ps aux | grep exeDSP | grep -v grep | sed 's/[ ]*\([0-9]*\).*/\1/')
temp='attach '$exeDSP_PID'\n'
i=0
for l in $libraries
do
temp=$temp'call dlopen("'$l'", 2)\n'
i=$(( i + 1 ))
temp=$temp'call dlsym($'$i', "Game_Main")\n'
i=$(( i + 1 ))
l_dirname=$(echo $l | sed 's/[^\/]*$//')
temp=$temp'call $'$i'("'$l_dirname'", 0)\n'
i=$(( i + 1 ))
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; } &
HI tusko,
I have a prob with your script. I have no value for exeDSP_PID, when i execute the command`s by hand is all fine.
can you take a look of
tusko wrote:arris69: damn, you are right , thanks I edited the script. By the way, I would like to avoid the 'sed' command completely and using pidof is a step in the right direction. There is still more 'sed', though. For example, when assigning l_dirname. Unfortunately, the obvious solution (using dirname shell command) does not work in my TV.
....
#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/dtv/usb/sda1/gdb
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/dtv/usb/sda1/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 /mtd_tlib/GGame/avrfix2/load.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; } &