Showing posts with label root. Show all posts
Showing posts with label root. Show all posts

Sunday, October 2, 2011

3. Install the super user binary

After you are done with

1. Unlocking the bootloader
2. Flashing a custom Recovery into Nexus S,
follows the final step in the rooting process!

1. Download super-user app (a zip file) from my dropbox (v2.3.6.1). This's just a backup, in case you can't find it's latest version online.

2. Move it to the root of the SD card

3. Reboot the phone into the recovery, by shutting down and turning on with Vol Down + Power button.

4. On boot screen, select recovery with vol down and confirm with power button.

5. Once into the recovery, select 'Install zip from SD card'.
(Remember, the only button you can use are vol up/down and power buttons.)

6. Select the super-user zip file (su-2.3.6.1-ef-signed, in my case) and confirm installation.

Kudos! You've successfully rooted you Nexus S! Give yourself a tap on your back! :)

Into your phone, you will find the Super User app in your Appdrawer (for your use) and the super user binary will be in the path of your device (for other apps requiring root permissions to use)

Now for the tiny glitch - loss of custom recovery after reboot!




Monday, September 19, 2011

2. Flashing a Custom Recovery into Nexus S

A typical Android device contains a few partition, the most important being
  1. boot
  2. recovery
  3. system
  4. cache
  5. userdata
The recovery partition can be flashed with a .img file. The basic recovery that comes with stock android has nothing more than the android mascot image with an exclamation symbol!

Replacing this with powerful recoveries like Amun-Ra or Clockwork Mod(CWM) gives you opportunities beyond imagination to play with your device!

The procedure mentioned below uses CWM. You can obtain it for free from the official site. Just get the latest version for 'crespa' the code name of Nexus S.

Flashing custom recovery from within Android requires the phone to be rooted and it's no more different and installing an app from the Android market itself. You could search and download it off Google Android market and follow the simple UI provided.

Although since now, we consider the phone out-of-the-box unrooted, it requires the phone to be in fastboot mode as mentioned in the previous post. (Unlocking the bootloader)

Once in fastboot mode, run the following command on your desktop's terminal.
 
fastboot flash recovery path_to_recovery

That should do the magic. Once done, you can scroll down to the 'recovery mode' in the bootloader menu using the volume button and selecting it with the power button.

Voila! There's you CWM recovery.
 
btw fastboot reboot on your terminal will also remote reboot your phone just like the 
reboot on your bootloader menu.




Just a word of caution: This recovery isn't going to remain here forever. After a complete reboot, this recovery will be lost due to an android-script that runs at boot time, which will replace the stock recovery. A couple of system files will have to be deleted to prevent that. That can be achieved after rooting the device.








Tuesday, September 13, 2011

Rooting the Nexus!

Rooting:

Rooting is a process that allows users of mobile phones and other devices running the Android operating system to attain privileged control (known as "root access") within Android's Linux subsystem with the goal of overcoming limitations that carriers and manufacturers put on some devices. It is analogous to jailbreaking on devices running the Apple iOS operating system.

That's how Wikipedia defines it! In short, you become the admin user a.k.a God! :) and mess up things the way you love!

I understand that the word Jailbreak sounds more like an illegal activity than 'Rooting' does. And actually their intentions are similar to their phonetics and so are the companies' views on them! Apple wants to prevent Jailbreaking on their devices while Google support rooting theirs! :)

Google is in fact urging it's partners, the hardware manufacturers to impose less restriction on the hardware/software and encouraging them to let the users decide how they want their phones. Although Android is now running more than just phones. For instance Android now runs Barnes & Nobles' e-Reader 'Nook', Sony's new Z-series Music Player, just to mention a few.

On that front, HTC has now officially released instructions along with the required tools, on their websites, to help customers unlock their phones.

The Nexus S comes with an awesome bootloader from Google that makes unlocking and rooting the devices the easiest! Easier than on any other phone.

Rooting the phone requires installation of a super user application on the device. Now the super user tool comes in two pieces - the binary which does the rooting and then the app that lives in the App drawer of the phones that gives and GUI to manage grant and revocation of SU rights to any other app as and when required.

The following is the breakup of the steps and each step is explained in detail in separate posts. This is to enable you to understand what you're upto and hence not again read the lines "Don't do this if you don't know what you're doing"!!!
  1. Unlock the bootloader
  2. Install custom Recovery
  3. Install the super user binary (& app).

1. Unlocking the Bootloader

The bootloader of the Nexus S is locked initially. You'll have to unlock it using a tool called fastboot. Warning: Since unlocking the bootloader and rooting the phones gives access to all the private data, by circumventing the Android's security model based on Unix, all your phone's data and data on the internal SD card will be erased for security reasons. Hence take a backup of the important data into your computer before you proceed.


You should have Android SDK installed in your machine. For this tutorial, I use a mac. Post Android SDK installation, download and place fastboot (which is just a single binary file) in your path or if you're comfortable, run it from any directory, using a terminal.

I would prefer you to place fastboot in the 'tools' directory of your android SDK installation.

Step 1. Reboot your phone into the bootloader by shutting it down and then turning it on by holding the volume up button + power button and you should see this.

Step 2. When on the bootloader screen, connect your phone to PC/Mac and run the command

fastboot devices
which should give an output similar to

List of devices attached 
HTXXXXXXXXXX	device


Step 3. Once, it's confirmed that your device is recognizable by fastboot, run the following command to unlock the bootloader. 

fastboot oem unlock
 
Read the warning on the phone and accept it.  That's it! Now you have an unlocked phone or bootloader, perhaps! :D This can be confirmed by seeing noting the last line on the first paragraph of the bootloader screen that reads

LOCK STATE - UNLOCKED

Next you shall run  

fastboot reboot
reboot your phone. Another hint to know that your bootloader is unlocked is to reboot your phone into the os and you can notice that beneath the Google logo appearing while it boots, there should appear an unlocked-lock icon!

It should be no surprise that you can run

fastboot oem lock
to lock the bootloader if you wish!