Tuesday 4 October 2011

How To Unroot Android Phone


Source: setoelkahfi.com
Android device offers the owner the thrill of freedom to modify the system. As we know that Android is derivated from Linux, so the character of Open-Source also come with the system. For example when we want to update android os to the later version, we need to have the root acces (read How To Root Android). Then after the process is done, we need to reverse the process, it's called unroot android
Firstly, in order to unroot android phone, you need:

  1. An update available for your phone or an old nandroid backup that has a previous version of your phone android version.
  2. A nandroid backup done before you attempt the following steps below.
Once the above conditions are met, you are ready to unroot your android phoneBefore you read the procedure, read how it works below and get a better picture:


HOW
Firstly, one known method of unrooting is to install an available system update. However, stock updates are signed with official keys and custom recoveries only accept updates signed with their custom keys.
So, to unroot, you need to have stock recovery installed. One way to get your phone`s stock recovery back is contained in the update zip.
The update zip is the key, literally. Look through it and you will find (usually in the system folder) a file called recovery.img, which will be used as your new stock recovery.
By flashing in the image into recovery, you can now install updates, keep your previous applications, enjoy being unrooted and updated.
There are other unroot options that tailor to specific android phones and versions, but this solution should work on all android phones.
Why unroot? Because sending in a rooted phone for repair will void your warranty. Also, by having a rooted phone, you run the risk of a rogue rooted application that does unwanted stuff to your phone.


PROCEDURE

  1. If you still have your original stock recovery that came with your phone, continue. Else search for my previous thread: "[RECOVERY] Reverting to original(STOCK) recovery" and follow the steps there. You can use the update file you used to revert to stock recovery here as well or vice versa.
  2. Reboot you phone.
  3. Check for system updates and download them.
  4. Wait until phone reboots. All your applications and user settings will be retained.
  5. a.) Open up a terminal emulator on your phone and enter "su" (Check if unroot). b.) If you cant turn your phone on to check if unrooted, boot into recovery mode, open up adb enter:
  6. adb shell
    su

  7. If you get "permission denied" or something like that from step 5a/5b,
  8. CONGRATULATIONS! YOUR PHONE HAS BEEN SUCCESSFULLY UNROOTED!
  9. If you don`t want to void your warranty, you should unistall applications that require root, especially Superuser.

To date, I have rooted and unrooted my phone (Backflip) 3 times without any problems. In case your phone can`t be booted up, only to the bootloader or recovery, DO NOT WORRY! You can use the adb (android debug bridge) to flash in the stock recovery, push/pull the updates and reboot the phone into recovery mode or normal mode.


Useful ADB commands:
Reboot Phone
adb shellreboot
Reboot Phone into recovery mode
adb shellreboot recovery
Flash a new recovery image temporarily (resets when rebooting)
adb shellflash_image recovery /sdcard/recovery.img
Flash a new recovery image that does not reset when rebooting
adb shellflash_image recovery /sdcard/recovery.imgexitadb shellcd systemsumount -o rw,remount /dev/block/mtdblock1 /systemrm recovery.imgmount -o ro,remount /dev/block/mtdblock1 /systemexitexit
Push file to sdcard
adb push file.blah /sdcard/file.blah
Push file to sdcard
adb pull /sdcard/file.blah file.blah
Here`s wishing you good luck and a belated happy new year! Conratulation, now you just success unroot your android device.

0 comments:

Post a Comment