49 SIM sage 2012/02/02() 04:59:31.70 ID:i0AYTvFs

English translation by Cheeseus and Tokyo_dom, 21.02.2014
*********************************************************


For now I have made a program which attempts to run random commands with system privileges.

Link to download the files: http://goo.gl/Bs6Iq 


Run the following commands from your PC using ADB to transfer the necessary files to your phone:

adb push onload.sh /data/local/ 
adb push libsdservice_jni.so /data/local/ 
adb push shdisphook /data/local/ 
adb shell chmod 755 /data/local/onload.sh 
adb shell chmod 755 /data/local/shdisphook 
adb reboot 
adb wait-for-device shell /data/local/shdisphook 


When this program is executed,
the unmount microSD dialog will be shown from within Settings,
and the permissions on /data will be set to 777.


To start with, the first step.
When onload.sh calls jni, the called command, oncmd.sh, becomes the command that is used in order to display a dialog.
Let's analyze that.





HOW TO USE:

adb shell
$ echo 'chmod 777 /cache' > /data/local/oncmd.sh
$ chmod 755 /data/local/oncmd.sh

ETap the microSD settings option in the notifications bar.
ETap 'Unmount microSD'.
EThe 'Unmount microSD' dialog will appear.
@* At this stage, oncmd.sh is executed.
E Press the 'Cancel' button.

$ ls -l /cache


NOTE: You might also want to check this page: http://forum.xda-developers.com/showthread.php?t=1378206&page=6