Any way to root ICS over adb in fastboot? - Motorola Droid RAZR

Is there any way to root in fastboot mode???
If so, using what utility?
Thanks in advance.

I guess I am asking if issuing the following commands on a RAZR through adb while in fastboot result in root? This is for ICS.
These command are from DroidRAZRUtility .bat file.
echo [*] Waiting for device...
adb wait-for-device
echo [*] Device found.
adb shell "rm -r /data/local/12m/batch 2>/dev/null"
adb shell "ln -s /data /data/local/12m/batch"
echo [*] Rebooting device...
adb reboot
echo [*] Waiting for device to reboot...
adb wait-for-device
adb shell "rm /data/local.prop"
adb shell "echo 'ro.sys.atvc_allow_all_adb=1' > /data/local.prop"
echo [*] Rebooting device again...
adb reboot
echo [*] Waiting for device to reboot...
adb wait-for-device
echo [*] Attemping persistence...
adb remount
adb push su /system/bin/su
adb shell "chmod 6755 /system/bin/su"
adb shell "ln -s /system/bin/su /system/xbin/su 2>/dev/null"
adb push busybox /system/xbin/busybox
adb shell "chmod 755 /system/xbin/busybox"
adb shell "/system/xbin/busybox --install /system/xbin"
adb push Superuser.apk /system/app/Superuser.apk
echo [*] Cleaning up...
adb shell "rm /data/local.prop"
adb shell "rm /data/local/12m/batch"
adb shell "chmod 771 /data"
adb shell "chown system.system /data"
echo [*] Rebooting...
adb reboot
adb wait-for-device
echo [*] Exploit complete!
Click to expand...
Click to collapse

Related

General question about scripts/batch files

I love command line interface. Two years ago, when I got my OG EVO on launch day, the only way to root was through toast's cryptic instructions here and here. Even for an old DOS guy like me, they were daunting as an Android newb, but after several days of poking around and reading everything I could find, the process went smoothly. Fast-forward to today.....I'm ready to root my new EVO LTE and would love to do it myself. I have the SDK installed on both my work and home computers and feel like all I need to do is execute the commands contained in the one-click solution posted by zedomax.
Code:
@echo Rooting...
@adb wait-for-device
@echo Start Rooting...
@adb shell mv /data/local/tmp /data/local/tmp.bak
@adb shell ln -s /data /data/local/tmp
@adb reboot
@echo reboot #1 - DO NOT DISCONNECT YOUR DEVICE!
@PING 1.1.1.1 -n 1 -w 9000 >NUL
@adb wait-for-device
@adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
@adb reboot
@echo reboot #2 - DO NOT DISCONNECT YOUR DEVICE!
@PING 1.1.1.1 -n 1 -w 9000 >NUL
@adb wait-for-device
@adb remount
@PING 1.1.1.1 -n 1 -w 3000 >NUL
@adb push su /system/bin/su
@adb shell "chown root.shell /system/bin/su"
@adb shell "chmod 06755 /system/bin/su"
@adb shell "rm /system/xbin/su"
@adb shell "ln -s /system/bin/su /system/xbin/su"
@adb push Superuser.apk /system/app/.
@adb shell rm /data/local.prop
@adb shell rm /data/local/tmp
@adb shell mv /data/local/tmp.bak /data/local/tmp
@adb push busybox /data/local/tmp/.
@adb shell "chmod 755 /data/local/tmp/busybox"
@adb shell "/data/local/tmp/busybox mount -o remount,rw /system"
@adb shell "dd if=/data/local/tmp/busybox of=/system/xbin/busybox"
@adb shell "chown root.shell /system/xbin/busybox"
@adb shell "chmod 04755 /system/xbin/busybox"
@adb shell "/system/xbin/busybox --install -s /system/xbin"
@adb shell "rm -r /data/local/tmp/busybox"
@echo rebooting
@adb reboot
@echo All Done rooting Evo 4G LTE, check out OneXRoot.com for more cool stuff like ROMs, hacks, tips, and more!
So here's my question, will running each of these commands (minus the @echo and "wait-for-device" ones), accomplish the same thing as executing the batch file or does the automated nature of the script add something else to the process??? Obviously, I know that I need to put the busybox and su files in the appropriate folder, but other than that, is there something else I would need to do?
Thanks for any input!

Linux script logic for rooting .28

There is a thread for rooting .28, but it only includes a windows bat file:
http://forum.xda-developers.com/showthread.php?t=1706588
XDA blocks me from posting to that developer thread because I have not posted enough! LOL.
Here is the logic for a linux bash script - just download DebugfsRoot_v1.8.zip, point the ADB var at your adb binary, and run it. Worked for me - first time I've rooted the prime after just getting the .28 update. It's a prime purchased in Australia.
Enjoy,
Jason.
#!/bin/bash
ADB=./adb
$ADB kill-server
$ADB wait-for-device
read -p "ECHO Step 1 - Pushing files... (press a key to continue)"
$ADB push debugfs /data/local/
$ADB push su /data/local/
$ADB push debugfsinput /data/local/
$ADB shell "mv /data/local/tmp /data/local/tmp.bak"
$ADB shell "ln -s /dev/block/mmcblk0p1 /data/local/tmp"
read -p "Rebooting... (press a key to continue)"
$ADB reboot
$ADB wait-for-device
read -p "Step 2 - Rooting... (press a key to continue)"
$ADB shell "chmod 777 /data/local/debugfs"
$ADB shell "/data/local/debugfs -w /dev/block/mmcblk0p1 < /data/local/debugfsinput"
$ADB shell "rm /data/local/tmp"
$ADB shell "mv /data/local/tmp.bak /data/local/tmp"
$ADB shell "rm /data/local/su"
$ADB shell "rm /data/local/debugfs"
$ADB shell "rm /data/local/debugfsinput"
read -p "Rebooting... (press a key to continue)"
$ADB reboot
$ADB wait-for-device
read -p "Testing superuser... (press a key to continue)"
$ADB shell "/system/xbin/su -c id"
read -p "Installing Superuser.apk... (press a key to continue)"
$ADB install Superuser.apk
read -p "Rebooting..."
read -p "Once your Prime reboots, it will be rooted! (press a key to continue)"
$ADB reboot

[Q] i need Temp Root File - RW EVO 3D

if any one can help me and bring (Temp Root File - RW EVO 3D) for me please .....
Yasser Mansour said:
if any one can help me and bring (Temp Root File - RW EVO 3D) for me please .....
Click to expand...
Click to collapse
I also need temp root. But could not find any guide that works with Hboot 1.58 and 2.89.651.2 710RD
For temprooting:
Code:
adb shell mv /data/local/tmp /data/local/tmp.backup
adb shell ln -s /data /data/local/tmp
adb reboot
adb shell echo "ro.kernel.qemu=1 > /data/local.prop"
adb reboot
For removing temp root:
Code:
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.backup /data/local/tmp
adb reboot
This is TPSparkyRoot.
Try it. Once you reboot, you will see a black screen with only the statusbar visible at the top.
kgs1992 said:
For temprooting:
Code:
adb shell mv /data/local/tmp /data/local/tmp.backup
adb shell ln -s /data /data/local/tmp
adb reboot
adb shell echo "ro.kernel.qemu=1 > /data/local.prop"
adb reboot
For removing temp root:
Code:
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.backup /data/local/tmp
adb reboot
This is TPSparkyRoot.
Try it. Once you reboot, you will see a black screen with only the statusbar visible at the top.
Click to expand...
Click to collapse
Thanks for the reply!
Kinda late for me but maybe good for Yasser Mansour. I could not find anything so I went ahead and followed this http://forum.xda-developers.com/showthread.php?t=1889438 now I have S-off on Hboot 1.58!

[Q] Pipo M1 Tablet - Rooted

Okay, So I am working on a project for my work. We need to locate and test a tablet to sell to a client. The client needs it rooted. So We got in this Pipo M1. Nice unit for the price. I rooted it via VonDroid-Root and changed the default storage location from the ROM to the internal storage. I let the battery die on it to test battery life, now it will not charge. Two chargers and it never seems to detect a charger, and will not charge. Just boots, shuts down, and repeats. Anyone have any thoughts or Ideas?
Here is the Root script that I ran on it.
Code:
echo off
cls
echo *---* VonDroid.com N101 II Root Tool based on work by sunnydavid *---*
echo --- Plug in your device, make sure debugging is enabled in Developer Options
echo --- This script will now copy files over to your N101 II
echo.
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
echo --- Reboot 1/3 - Press Space Bar once the device has rebooted
pause
adb shell rm /data/local.prop > nul
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
adb reboot
echo --- Reboot 2/3 - Press Space Bar once the device has rebooted
pause
adb shell id
echo --- If the ID shows as 0/root then continue, otherwise CTRL+C to cancel and start over
pause
adb remount
adb push su /system/bin/su
adb shell chown root.shell /system/bin/su
adb shell chmod 6755 /system/bin/su
adb push busybox /system/bin/busybox
adb shell chown root.shell /system/bin/busybox
adb shell chmod 0755 /system/bin/busybox
echo --- Installing SuperSU
adb shell chown root.root /system/app/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU.apk
adb push RootExplorer.apk /system/app/RootExplorer.apk
adb shell chown root.root /system/app/RootExplorer.apk
adb shell chmod 0644 /system/app/RootExplorer.apk
echo Completing Root
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.bak /data/local/tmp
adb reboot
echo echo --- Reboot 3/3 - Your N101 II should now be rooted
pause
echo on

how to install su in system ? /Traditional option

i cant install su in system i test all many option and still cant please tell me
stargam said:
i cant install su in system i test all many option and still cant please tell me
Click to expand...
Click to collapse
Try this
Code:
adb devices
adb disable-verity
adb reboot
adb devices
adb shell "mkdir -p /data/local/tmp > 2/dev/null"
adb push c:\su /data/local/tmp > nul
adb shell "chmod 0777 /data/local/tmp/su"
adb shell "-c '/data/local/tmp/su'"
adb shell "setenforce 0"
adb shell "cd /"
adb shell "mount -o rw,remount -t auto /system"
adb shell "cp /data/local/tmp/su /system/bin"
adb shell "mount -o ro,remount -t auto /system"
adb reboot
adb devices
adb enable-verity
adb reboot
Ok I try
jwoegerbauer said:
Try this
Click to expand...
Click to collapse
When I test adb "mkdir-p/data/local/tmp>2/dev/null" he say no such file or directory
stargam said:
When I test adb "mkdir-p/data/local/tmp>2/dev/null" he say no such file or directory
Click to expand...
Click to collapse
1. I think you forgot to type a simple "space" between Command: "mkdir -p" and Dirname: "data/local/tmp > 2 /dev/null"
2. And the last part "> 2 /dev/null" means redirect stdout (or error stream) and ignore it.
Conclusion, maybe just a typo? or err. mssge isn't what you think --> redirection made it dissappear.
Hopefully this works...
otherwise use this code:
adb devices
adb shell "mkdir -p /data/local/tmp" 2>nul >nul
adb shell "chmod 0755 /data/local/tmp"
adb push C:\su /data/local/tmp > nul
adb shell "chmod 0777 /data/local/tmp/su"
adb shell "/data/local/tmp/su -c 'cd / && mount -o rw,remount -t auto /system'"
adb shell "cp /data/local/tmp/su /system/bin"
adb shell "/data/local/tmp/su -c 'setprop ro.build.type user-debug'"
adb reboot
Click to expand...
Click to collapse
Cheerz!
webbex said:
1. I think you forgot to type a simple "space" between Command: "mkdir -p" and Dirname: "data/local/tmp > 2 /dev/null"
2. And the last part "> 2 /dev/null" means redirect stdout (or error stream) and ignore it.
Conclusion, maybe just a typo? or err. mssge isn't what you think --> redirection made it dissappear.
Hopefully this works...
otherwise use this code:
Cheerz!
Click to expand...
Click to collapse
Thanks it work ?

Categories

Resources