Does an OTA update mean I lose root?

Do you “lose root” if you install an over-the-air update on a stock Android phone? No! All that happens is that the permissions on the “su” file get changed so it is no longer executable. Those l33t haxors will have you thinking you need to do something terribly complicated in order to “get root” but it’s really quite simple. As usual you’ll need the adb and fastboot commands from the Android SDK.

The easiest way to fix this is to boot into ClockworkMod recovery. At the time of writing, the most recent version for the GSM Galaxy Nexus is here. From the bootloader, run

# fastboot boot recovery-clockwork-

Note, we are not flashing anything to the phone here. We are not flashing a custom recovery image or a custom ROM. We are not changing anything in any way. All we are doing is a one-time boot from a different image. If you turn your phone off and on again it will boot back into Android just as it has always done.

Once CWM is running, type the following commands

$ adb shell mount /system
$ adb shell chmod 06755 /system/bin/su
$ adb shell umount /system
$ adb reboot

All we are doing is mounting the /system partition, changing the “su” file to be executable, unmounting the filesystem, and rebooting the phone. You now “have root” again. Don’t you feel like a l33t haxor?