I'm trying to automate some things I do after upgrading nightlies using a shell script. The system seems to execute the shell script (shows messages informing granting of root privileges and successful completion of the script), but the script does not seem to run, ie the changes do not occur. Here's the script if it's of any help :
Code:
#!/system/bin/mksh
# Gain root access
su -
# Replace baseband
rm /system/etc/motorola/bp_nvm_default/*
cp /mnt/sdcard/Download/bp_nvm_default/* /system/etc/motorola/bp_nvm_default/
chown root:root /system/etc/motorola/bp_nvm_default/*
chmod 644 /system/etc/motorola/bp_nvm_default/*
# Make Apex Launcher system app
cp /mnt/sdcard/Download/ApexLauncher.apk /system/app/
chown root:root /system/app/ApexLauncher.apk
chmod 644 /system/app/ApexLauncher.apk
# Move Marimba ringtone to phone
cp /mnt/sdcard/Download/Marimba.ogg /system/media/audio/ringtones/
chown root:root /system/media/audio/ringtones/Marimba.ogg
chmod 644 /system/media/audio/ringtones/Marimba.ogg
I'm amazed there are no replies to this thread.
No one ever tried running a shell script on their rooted phone?
S_xda said:
I'm amazed there are no replies to this thread.
No one ever tried running a shell script on their rooted phone?
Click to expand...
Click to collapse
What did you tried to run the script??, use the terminal or the SManager.
SManager works fine to me
Questions go in the Q&A section
Related
First off, I want to say thanks to Kam187 & the Creators of asroot
Okay, Below is the Method I used for getting Root working for my app's.
Even though Shell is running as Root, any Call's made to su trigger's the white List Superuser.apk, So don't think your phone is wide open. G1's & MT3G Setup's are the same regard sh.
I'm not sure is the apk is counted as warez or not, if so I hope a Mod will remove the link to the Apk or let me know to Remove it...
Okay, File's Need to complete the Task is....
Try3 Placed in C:\SDK\tools> found here > File's attached below
SU for /system/bin found here > File's attached below
Superuser app control for our App's found Here > File's attached below
Next, Mount the SDCARD and place the SU file in the root of the sdcard like so ( /sdcard ). This is Important!!!
From here we do the Following.. ( Kam187 script the I edited ).
adb push try3 /data/local
adb shell chmod 0755 /data/local/try3
adb shell
/data/local/try3 /system/bin/sh
mount -o rw,remount /dev/st9 /system
chmod 04755 /system/bin/sh
cat /sdcard/su > /system/bin/su1
cat /sdcard/su > /system/bin/su
chmod 04755 /system/bin/su
su
cat /system/bin/playlogo > /system/bin/playlogo_real
/system/bin/chmod 0755 /system/bin/playlogo_real
echo "#!/system/bin/sh
/data/local/try3 /system/bin/sh
mount -o rw,remount /dev/st9 /system
chmod 04755 /system/bin/sh
cat /system/bin/su1 > /system/bin/su
chmod 04755 /system/bin/su
/system/bin/playlogo_real" > /system/bin/playlogo
Click to expand...
Click to collapse
Once Done, place the Superuser.apk in your SDK tools Directory.
Mine happens to look like this
C:\SDK\tools>
Click to expand...
Click to collapse
Once you have that Copied over, Open a Command prompt and CD to your sdk\tools directory and type the following.
adb install Superuser.apk
Click to expand...
Click to collapse
Once done, do a reboot of the Phone, Once boot up is complete open a Command Prompt ( or app that needs Root ).
For Command Prompt, type:
adb shell
Click to expand...
Click to collapse
su
Click to expand...
Click to collapse
If done correctly you will now see the deny or allow prompt on the Phone, or just open any app that needs root & you will see the same window.
Here's some Picture of it working
SU working with SU apk on Twitpic & SU working with SU apk on Twitpic
So I'm on the Latest official 2.2.1 from Motorola/ATT, but I'm having some issues.
My home button doesn't work at all and I can't get it to work despite my efforts. So I think I just need to do a factory reset and delete everything, I think my rooting and mods to my 2.1 soft ware may have messed everything up. Before I try this, will it delete all my text messages and stuff? or should I back them up with that SMS backup program?
Also, i'm having a hard time rooting it with SuperOneClick, it fails to work completely so does anybody know exactly what commands I need to just root via my terminal?
nevermind I figured it out. Here are the commands if anybody is interested:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v2 /data/local/tmp
./adbmac push busybox /data/local/tmp
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
$ exit
./adbmac remount
./adbmac shell
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
# busybox chmod 6755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox ln -s /system/xbin/su /system/bin/su
# busybox cp /data/local/tmp/busybox /system/xbin
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# exit
$ exit
./adbmac install Superuser.apk
./adbmac reboot
I copied pasted from somewhere else on this site
Have you tried flashing the 2.2 SBF using RSD Lite? I tried that for a different problem and it worked.
Sent from my MB520 using XDA Premium App
Ok I just reflashed it using the stock recovery then I wiped all the data(factory reset). I backed my stuff up first though. I was wrong in my previous post about how to root using terminal. To correctly root you need to follow this guide to the T. http://www.addictivetips.com/mobile/how-to-root-nexus-one-running-android-2-2-1-from-ubuntu-linux/
I just flashed RC2 and it is loading now...
Maybe I'm the only one but this is the method I prefer to use to root my phone. I'm not always sure which OS I'll be working with when I have to do this and this one works on all of them as long as you have the Android SDK.
Put the files into your platform-tools folder to make them easy to find.
Not sure if I need this but I'm not responsible for bricks or any other complication, etc, etc.
adb push psneuter /data/local/tmp
adb push bin/su /data/local/tmp
adb shell chmod 6755 /data/local/tmp/psneuter
$ ./data/local/tmp/psneuter
adb shell
# mount -o rw, remount /dev/block/mmcblk0p12 /system
# rm /data/local/tmp/su /system/bin/su
#chmod 6755 /system/bin/su
exit
really? psneuter only works for 1.26 froyo
I used this method on 1.83 when I first got the phone. Might need to look back into this. Someone asked about this method so I posted it.
Sent from my MB860 using XDA Premium App
I always have problems to root official 2.3 with automatic ways, and found that this caused from some adb miscommunication.
So this is how to do it manual, in case automatic ways stacked.
First install adb-sdk and add its path to system variables, so to don't have to go to adb' s path before you can run it.
Then download doomlord' s rooting tool and extract it to drive C:\DoomLordRoot.v3.
http://forum.xda-developers.com/attachment.php?attachmentid=784296&stc=1&d=1321435888
Preparation steps on device:
1) Dial: *#*#2846579#*#*
2) Go to projectmenu > background settings > log settings > log switch > set Log on
3) Reboot Phone
4) Switch USB Debugging ON
5) uncheck fast boot from settings -> applications
Click to expand...
Click to collapse
Open windows command prompt window and do the above:
Code:
adb push c:\DoomLordRoot.v3\files\zergRush /data/local/tmp/
[COLOR="DarkSlateBlue"]adb shell[/COLOR]
chmod 777 /data/local/tmp/zergRush
./data/local/tmp/zergRush
[COLOR="DarkSlateBlue"]Hit CTRL+C to exit from adb shell[/COLOR]
adb push c:\DoomLordRoot.v3\files\busybox /data/local/tmp/
[COLOR="DarkSlateBlue"]adb shell[/COLOR]
su
chmod 755 /data/local/tmp/busybox
/data/local/tmp/busybox mount -o remount,rw /system
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown root.shell /system/xbin/busybox
chmod 04755 /system/xbin/busybox
/system/xbin/busybox --install -s /system/xbin
rm -r /data/local/tmp/busybox
[COLOR="DarkSlateBlue"]Hit CTRL+C to exit again from adb shell[/COLOR]
adb push c:\DoomLordRoot.v3\files\su /system/bin/su
[COLOR="DarkSlateBlue"]adb shell[/COLOR]
su
chown root.shell /system/bin/su
chmod 06755 /system/bin/su
rm /system/xbin/su
ln -s /system/bin/su /system/xbin/su
[COLOR="DarkSlateBlue"]Hit CTRL+C to exit once more from adb shell[/COLOR]
adb push c:\DoomLordRoot.v3\files\Superuser.apk /system/app/
[COLOR="DarkSlateBlue"]adb shell[/COLOR]
su
cd /data/local/tmp/
rm *
reboot
This is basic what the runme.bat file does, just some paths corrected to point to the right locations.
I have the latest official gingerbread (I think v3) and have been trying to root with no luck. I've gone through the steps here but when try to get root access (su), it gives me permission denied...
Any ideas?
Oneclickroot v2. 2 did the work for me or something like this
Sent from my U8800
SS said:
I have the latest official gingerbread (I think v3) and have been trying to root with no luck. I've gone through the steps here but when try to get root access (su), it gives me permission denied...
Any ideas?
Click to expand...
Click to collapse
This probably means that rooting failed.
What messages you get when you run zergrush?
dancer_69 said:
This probably means that rooting failed.
What messages you get when you run zergrush?
Click to expand...
Click to collapse
I got messages for sending 149, then 189 zerglings, then messages about not being able to mount, find or write to directories.
It seems like it wasn't able to get root access to be able to run its process.
In any case, I just downgraded to the previous release and then used ZergRush, which worked perfectly
don't work.
try this, it works for my B528 rom!
http://forum.xda-developers.com/showpost.php?p=23565074&postcount=7
Anybody get an fix for camera after unlock the botloader. (Zenfone 5 A501CG - 16GB 1.6Ghz) When i unlock my zenfone the camera show the message saying that camera isn't found and that I want 2 reboot my phone.
charlieitme said:
Anybody get an fix for camera after unlock the botloader. (Zenfone 5 A501CG - 16GB 1.6Ghz) When i unlock my zenfone the camera show the message saying that camera isn't found and that I want 2 reboot my phone.
Click to expand...
Click to collapse
In this time there isnt 100% fix, some ZF just have this problems.. you can try another unlocking methods, or just relock your phone (if you arent using cus. kernel) and camera will work again.
Thnks. In another thread anybody say that copy the lib again manually restore this function. I'll try...
charlieitme said:
Thnks. In another thread anybody say that copy the lib again manually restore this function. I'll try...
Click to expand...
Click to collapse
where the thread? I also faced this problem
AhZhi said:
where the thread? I also faced this problem
Click to expand...
Click to collapse
The developer told me in response the following
Detail: He did not mention if the commands 2 run on the terminal emulator or a terminal in Linux (like Ubuntu)
enter this command on terminal with su privileges
rm /system/lib/libxditk_DIT_Manager.so
ln -s /system/lib/ditlib_a500cg/libxditk_DIT_Manager.so /system/lib/libxditk_DIT_Manager.so
rm /system/lib/libxditk_DIT_CloverTrailPlus.so
ln -s /system/lib/ditlib_a500cg/libxditk_DIT_CloverTrailPlus.so /system/lib/libxditk_DIT_CloverTrailPlus.so
rm /system/lib/hw/sensors.redhookbay.so
ln -s /system/lib/hw/a500cg.sensors.redhookbay.so /system/lib/hw/sensors.redhookbay.so
mv /system/bin/akmd09911 /system/bin/a600cg_akmd09911
ln -s /system/lib/a500cg_akmd09911 /system/bin/akmd09911
chmod 0755 /system/bin/akmd09911
chmod 0755 /system/bin/a500cg_akmd09911
chmod 0755 /system/bin/a600cg_akmd09911
chmod 0644 /system/lib/hw/a500cg.sensors.redhookbay.so
chmod 0644 /system/lib/hw/a600cg.sensors.redhookbay.so
chmod 0644 /system/lib/hw/sensors.redhookbay.so
chmod 0644 /system/lib/ditlib_a500cg/libxditk_DIT_Manager.so
chmod 0644 /system/lib/ditlib_a500cg/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/lib/ditlib_a600cg/libxditk_DIT_Manager.so
chmod 0644 /system/lib/ditlib_a600cg/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/lib/libxditk_DIT_Manager.so
chmod 0644 /system/lib/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/build.prop
if it isnt still working. Copy manually camera libs on /system/lib/ditlib_a500cg/ to /system/lib/
Detail2: I tried to extract an updated ROM files and move to the directory that was Mentioned by TWRP or root explorer, and it still fails.
The solution i found:
For everything return to work, I got access to official rom 2.21.40.30, and used the ADB 2 block botloader and install this version and then updating on until 2.22.40.54. After updating over the air up there, you need to download the version 3.23.40.52 and put the zip in memory, so you'll be back with lollipop and download updates over the air to 3.24.40.87 which is the last update for zenfone 5.
charlieitme said:
The developer told me in response the following
Detail: He did not mention if the commands 2 run on the terminal emulator or a terminal in Linux (like Ubuntu)
enter this command on terminal with su privileges
rm /system/lib/libxditk_DIT_Manager.so
ln -s /system/lib/ditlib_a500cg/libxditk_DIT_Manager.so /system/lib/libxditk_DIT_Manager.so
rm /system/lib/libxditk_DIT_CloverTrailPlus.so
ln -s /system/lib/ditlib_a500cg/libxditk_DIT_CloverTrailPlus.so /system/lib/libxditk_DIT_CloverTrailPlus.so
rm /system/lib/hw/sensors.redhookbay.so
ln -s /system/lib/hw/a500cg.sensors.redhookbay.so /system/lib/hw/sensors.redhookbay.so
mv /system/bin/akmd09911 /system/bin/a600cg_akmd09911
ln -s /system/lib/a500cg_akmd09911 /system/bin/akmd09911
chmod 0755 /system/bin/akmd09911
chmod 0755 /system/bin/a500cg_akmd09911
chmod 0755 /system/bin/a600cg_akmd09911
chmod 0644 /system/lib/hw/a500cg.sensors.redhookbay.so
chmod 0644 /system/lib/hw/a600cg.sensors.redhookbay.so
chmod 0644 /system/lib/hw/sensors.redhookbay.so
chmod 0644 /system/lib/ditlib_a500cg/libxditk_DIT_Manager.so
chmod 0644 /system/lib/ditlib_a500cg/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/lib/ditlib_a600cg/libxditk_DIT_Manager.so
chmod 0644 /system/lib/ditlib_a600cg/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/lib/libxditk_DIT_Manager.so
chmod 0644 /system/lib/libxditk_DIT_CloverTrailPlus.so
chmod 0644 /system/build.prop
if it isnt still working. Copy manually camera libs on /system/lib/ditlib_a500cg/ to /system/lib/
Detail2: I tried to extract an updated ROM files and move to the directory that was Mentioned by TWRP or root explorer, and it still fails.
The solution i found:
For everything return to work, I got access to official rom 2.21.40.30, and used the ADB 2 block botloader and install this version and then updating on until 2.22.40.54. After updating over the air up there, you need to download the version 3.23.40.52 and put the zip in memory, so you'll be back with lollipop and download updates over the air to 3.24.40.87 which is the last update for zenfone 5.
Click to expand...
Click to collapse
if i want to use cm13.1 , it work? because this method is only for stock rom