Thanks Kam187 for the Feedback, I was just playing with stuff... Stuff that needs Root

but, found it useful & wanted to share.. I'm not sure if this gives you other idea's or not, but, like I said I found it useful was all.
Thanks for the Short hand version of that, wasn't to sure on it, but found it did work correctly..
Quote:
Originally Posted by kam187
Thats wierd so it doesnt reset permisions on sh.
Anyway thats a bit of a long way to do it. Line by line what you're doing:
# open 'sh' shell as root
/data/local/try3 /system/bin/sh
# remount filesystem as writable
mount -o rw,remount /dev/st9 /system
# copy sh to su
cat /system/bin/sh > /system/bin/su
# move sh to sh1 (not needed)
mv /system/bin/sh > /system/bin/sh1
# move su to sh (not needed)
mv /system/bin/su > /system/bin/sh
# set permisions on sh (not needed)
chmod 2000 /system/bin/sh
# set different permisions on sh
chmod 04755 /system/bin/sh
Instead you can do the following:
echo "#!/system/bin/sh
/data/local/try3 /system/bin/sh
mount -o rw,remount /dev/st9 /system
chmod 04755 /system/bin/sh
/system/bin/playlogo_real" > /system/bin/playlogo
But this will open ALL shells as root.
|