Created
December 1, 2013 05:44
-
-
Save aes512/7728963 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# less echos save trees: | |
ADB="adb" | |
echo " | |
************************************************** | |
Easy unroot for LG G2 | |
--- THIS WILL ONLY WORK IF YOU HAVE A BACKED UP PERSIST.IMG --- | |
************************************************** | |
Please ensure you have your persist.img file in this directory. | |
If you need to check please Ctrl+C and check, then run this script again. | |
" | |
read -rsp $'Press enter to continue...\n' | |
$ADB wait-for-device | |
echo "Remounting RW and removing Superuser and su" | |
$ADB remount rw | |
$ADB uninstall Superuser.apk | |
$ADB shell "rm /system/xbin/su" | |
echo "Rebooting device" | |
$ADB reboot | |
$ADB wait-for-device | |
echo " | |
******************************************************* | |
Now, please unplug usb, go to developer options and | |
disable USB debugging and re-enable it. | |
Once you've done that, re-plug your usb... | |
*******************************************************" | |
read -rsp $'Press enter to continue...\n' | |
echo " | |
Restoring persist partition." | |
$ADB push persist.img /sdcard/persist.img | |
$ADB remount rw | |
$ADB shell "dd if=/sdcard/persist.img of=/dev/block/platform/msm_sdcc.1/by-name/persist" | |
echo " | |
Rebooting phone. | |
" | |
$ADB reboot | |
echo" | |
******************************************************* | |
Now your phone should be unrooted. | |
To confirm, reboot into download mode: | |
- Power phone off | |
- Unplug any usb cable | |
- Press and hold volume up button | |
- Plug in usb cable | |
After download mode has started up, it should say 'unrooted' in the bottom left. | |
Press and hold power to normal boot out of download mode. | |
-- Please report any issues you have with this -- | |
*******************************************************" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment