Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
Created November 14, 2011 12:23
Show Gist options
  • Save ryo1kato/1363842 to your computer and use it in GitHub Desktop.
Save ryo1kato/1363842 to your computer and use it in GitHub Desktop.
Linux/MacOSX version of "Easy rooting toolkit"
#!/bin/sh
#
# Linux/MacOSX Version of "Easy rooting toolkit (v2.0)" script.
# http://forum.xda-developers.com/showthread.php?t=1320350
# You need Linux/MacOSX version of 'adb' binary copied into 'files'
# directory
#
alias adb='./files/adb'
cat<<EOF
---------------------------------------------------------------
Easy rooting toolkit (v2.0)
created by DooMLoRD
using exploit zergRush (Revolutionary Team)
Credits go to all those involved in making this possible!
---------------------------------------------------------------
MacOS Support By @ryo1kato
---------------------------------------------------------------
[*] This script will:
(1) root ur device using latest zergRush exploit (10 Nov)
(2) install Busybox (1.18.4)
(3) install SU files (binary: 3.0.3 and apk: 3.0.6)
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) enable "USB DEBUGGING"
from (Menu\Settings\Applications\Development)
(3) enable "UNKNOWN SOURCES"
from (Menu\Settings\Applications)
(4) [OPTIONAL] increase screen timeout to 10 minutes
(5) connect USB cable to PHONE and then connect to PC
(6) skip "PC Companion Software" prompt on device
---------------------------------------------------------------
CONFIRM ALL THE ABOVE THEN
- Press [ENTER] to continue
- Ctrl-C to abort
EOF
read
echo "--- STARTING ----"
echo "--- WAITING FOR DEVICE"
adb wait-for-device
echo "--- cleaning"
adb shell 'cd /data/local/tmp/; rm *'
echo "--- pushing zergRush"
adb push files/zergRush /data/local/tmp/.
echo "--- correcting permissions"
adb shell "chmod 777 /data/local/tmp/zergRush"
echo "--- executing zergRush"
adb shell "./data/local/tmp/zergRush"
echo "--- WAITING FOR DEVICE TO RECONNECT"
echo "if it gets stuck over here for a long time then try:"
echo " disconnect usb cable and reconnect it"
echo ' toggle "USB DEBUGGING" (first disable it then enable it)'
echo "--- DEVICE FOUND"
adb wait-for-device
echo "--- pushing busybox"
adb push files/busybox /data/local/tmp/.
echo "--- correcting permissions"
adb shell "chmod 755 /data/local/tmp/busybox"
echo "--- remounting /system"
adb shell "/data/local/tmp/busybox mount -o remount,rw /system"
echo "--- copying busybox to /system/xbin/"
adb shell "dd if=/data/local/tmp/busybox of=/system/xbin/busybox"
echo "--- correcting ownership"
adb shell "chown root.shell /system/xbin/busybox"
echo "--- correcting permissions"
adb shell "chmod 04755 /system/xbin/busybox"
echo "--- installing busybox"
adb shell "/system/xbin/busybox --install -s /system/xbin"
adb shell "rm -r /data/local/tmp/busybox"
echo "--- pushing SU binary"
adb push files/su /system/bin/su
echo "--- correcting ownership"
adb shell "chown root.shell /system/bin/su"
echo "--- correcting permissions"
adb shell "chmod 06755 /system/bin/su"
echo "--- correcting symlinks"
adb shell "rm /system/xbin/su"
adb shell "ln -s /system/bin/su /system/xbin/su"
echo "--- pushing Superuser app"
adb push files/Superuser.apk /system/app/.
echo "--- cleaning"
adb shell "cd /data/local/tmp/; rm *"
echo "--- rebooting"
adb reboot
echo 'ALL DONE!!! (Press [ENTER] to finish)'
read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment