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


For now I have made a program which attempts to run random commands with system privileges.
Ƃ肠AsystemŔCӂ̃R}hsvONĂ݂܂B 

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.

܂ŁAsĂA 
ƁB 
ݒAvP[VmicroSD̃}Eg̃_CAO 
o_/datãp[~bV777ɂȂ܂B 

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.

܂͑1iKĂƂŁB 
onload.shjniĂяoɌĂяoR}h 
oncmd.sh_CAOoтɌĂ΂R}hɂȂ܂B 
ŉ͂Ă܂傤B 




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. ʒmGAmicroSDݒ
ETap 'Unmount microSD'. microSD̃}Eg
EThe 'Unmount microSD' dialog will appear. microSD̃}Eg_CAOo
@At this stage, oncmd.sh is executed. ̒iKŁAoncmd.shs
E Press the 'Cancel' button. LZ{^

$ ls -l /cache


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