Wednesday, April 4, 2012

How to restore root access after upgrading from Android 4.0.2 to 4.0.4

The manual OTA upgrade from Android 4.0.2 to 4.0.4 on my Galaxy Nexus caused me to lose root access. Apparently the setuid bit was removed from /system/bin/su during the upgrade. This can be easily fixed by following the steps below. It assumes you are familiar with adb, fastboot and Clockwork Mod Recovery.

  1. Power off your phone and boot to the bootloader
    • Volume Up + Volume Down + Power
  2. Temporarily boot into the Clockwork Mod Reovery using fastboot (on the computer) 
    • fastboot boot cwmt-recovery- (or whatever version you are using)
  3. Mount /system using Clockwork Mod (on the phone): 
    • mounts and storage -> mount /system
  4. Chmod su using adb to turn on the setuid bit (on the computer)
    • adb shell chmod 6755 /system/bin/su
    • adb shell chown root:root  /system/bin/su
    • adb shell ls -l /system/bin/su (permissions should now be -rwsr-xr-x)
  5. Reboot. Super user should be working as expected (and your stock recovery is still intact)

No comments:

Post a Comment