≡ Menu

Quick root on Nexus S

Capturing some data about how to quickly root a Nexus S here so that its not lost when I go looking for it again.

I discovered quite by accident that the Clockwork recovery image allows adb to connect to it while sitting at the recovery menu. The adb shell is a root shell. You can use clockwork to mount whatever filesystems you may need to work on. This means that you can take any of the su binaries floating around the net, or even hack a bit and then build the su thats in the Android tree,  and dump it in /system/bin/su while in the recovery menu and then chmod it 4755 to suid it root.

So basically:

  • boot nexus S into fastboot with vol up and  power
  • pick recovery off the menu
  • from the recovery menu:
    • mount /system partition
  • from adb:
    • adb push /path/to/your/su/binary  /system/bin/su
    • adb shell
      • chmod 4755 /system/bin/su
  • from the recovery menu:
    • reboot device

When the handset comes back up, adb in as normal, and then issue an su command and you should be root.

>>>Karl