Random max

Wednesday, October 31, 2012

Playing around with the Google Galaxy Nexus

If you have a need to install a new android OS or clockworkmod recovery, you need administrator permissions. Android has a similar file hierarchy to what is present in linux. The OS also has a corresponding arm su binary, but this is not present in galaxy nexus by default and there is no way for users to do administrator activities on the phone. The way to root the phone is install the su binary by going into recovery mode. The prerequisite for rooting is the android sdk which can be got from here.

Rooting the nexus phone

1. download the following package for galaxy nexus here
2. extract the tarball and run gnlt.sh in the home directory of the extracted tarball
3. Connect the phone to USB and enable USB Debugging mode.
4. Copy the su.zip from the extracted tarball to the sdcard of the phone by executing the following instruction:
adb push su.zip /sdcard/. 
The next step requires you to have the phone in bootloader mode. For this, first switch off the phone. Then, press both the volume buttons and the power button simultaneously.
5. Execute option 2 from gnlt.sh which flashes clockworkmod recovery.
6. If last step doesnt work, then execute option 1 which unlocks the bootloader. Remember you will lose data on doing this. Now repeat step 5.
7. Once the clockworkmod recovery is flashed, boot into the recovery console.
8. Choose install zip from sdcard and choose su.zip for installing it.
9. Your phone is now rooted. Reboot the phone.
10. Go to rommanager and install the latest clockworkmod recovery. This should work now as the phone has been rooted.

Now your phone has been rooted which means you can now perform any administrative practices on the phone. It is always a good practise to take backups through the recovery console before updating the OS or drivers.

The following are some useful tools that can be used with an android phone:
1. Terminal Emulator
2. SSH droid
3. ROM Manager

Enjoy hacking your galaxy nexus. Hopefully this post proved to be useful and avoided the hazzle i went through before managing to root the galaxy nexus. Any suggestions and criticisms regarding the post are welcome.