Skip to content

Instantly share code, notes, and snippets.

@dblencowe
Created February 17, 2016 11:28
Show Gist options
  • Select an option

  • Save dblencowe/94bf3d1dc10bae2db360 to your computer and use it in GitHub Desktop.

Select an option

Save dblencowe/94bf3d1dc10bae2db360 to your computer and use it in GitHub Desktop.
#!/bin/bash
adb reboot bootloader
echo "Press a key once your device says bootloader in the bottom right..."
read -n 1 -s
fastboot oem append-cmdline "androidboot.unlocked_kernel=true"
sleep(8)
fastboot continue
echo "your device is rebooting and will inject root files."
sleep(5)
adb wait-for-device && adb remount
adb push files\libsupol.so /data/local/tmp/
adb push files\root_fire.sh /data/local/tmp/
adb push files\su /data/local/tmp/
adb push files\Superuser.apk /data/local/tmp/
adb push files\supolicy /data/local/tmp/
adb shell chmod 777 /data/local/tmp/root_fire.sh
adb shell /data/local/tmp/root_fire.sh
echo "Once the screen is black and says fastboot in the corner press any key to continue"
read -n 1 -s
fastboot oem append-cmdline "androidboot.unlocked_kernel=true"
sleep(8)
fastboot continue
echo "your device is rebooting and will finish the root process."
sleep(5)
adb wait-for-device && adb remount
adb shell /system/xbin/su --install
adb reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment