Complete Android

Everything Android, Tutorials and More!

Complete Guide to Rooting the Nexus S (+ No Wipe Version)

IF YOU ARE RUNNING 2.3.3 THIS GUIDE MAY NOT WORK!

I have found this guide to be suitably complete for 2.3.3 - http://jaxov.com/2011/02/how-to-root-android-2-3-3-gingerbread-on-nexus-s/ Thanks very much to Wolverine over at Jaxov for the useful guide!

Please use it for rooting on 2.3.3. The new part 2 mentioned here will NOT work on 2.3.3, Google has changed something so it won’t.

Today I took the plunge and rooted my Nexus S, but once again, none of the tutorials were quite complete. The best one I found was by AllGamer, over at XDA-Developers, and his guide, which can be found here: http://forum.xda-developers.com/showthread.php?t=895545

All credit for the original guide goes to AllGamer, however some alterations and much more detailed instructions have been made here by me.

New info: Upon finding another thread over at XDA (http://forum.xda-developers.com/showthread.php?t=931865) it has been realized that you can root your Nexus S without unlocking the bootloader, and therefore not loosing your data on the SD card. Part 1 for the new method is still the same, but choose the new Part 2!

This tutorial is also available on XDA-Developers (http://forum.xda-developers.com/showthread.php?t=935819), so if you need extra help, that would be the best place to ask!

WARNING: Rooting your device will wipe all data off it, so you will loose EVERYTHING! Make sure you backup all important data first. (Only applies to FASTBOOT OEM UNLOCK method!)

What you will need

Part 1

  1. Download the Android 2.3 SDK (or direct from Google here, 32MB).
  2. Once it has finished downloading, unzip it, and run the SDK manager.
  3. Select whatever components you wish to install, but you MUST make sure you install Google USB Driver (Available packages > Third party Add-ons > Google Inc. Add-ons > Google Usb Driver package, revision 4) otherwise this guide will not work!
  4. We must now install the Google USB Driver, or the phone will not be recognised as a device other than a mass storage device.
  5. Connect your Nexus S to your computer, and put it in USB storage mode.
  6. Put it in USB Debugging Mode (Settings > Applications > Development > USB Debugging)
  7. Windows should now recognise your Nexus S when you plug it in, and ask to install drivers. It probably won’t find anything, so we need to help it manually.
  8. (Installing drivers manually varies between Windows versions, so please refer to http://developer.android.com/sdk/win-usb.html if you are having trouble). Launch Device Manager (you can find it in Control Panel), find Other Devices, and listed under that heading, you should find Nexus S. Right click, and select Update Driver Software. Click Browse my computer for driver software, find your SDK folder, then the google-usb_driver folder inside it, click OK, then Next. This should install the USB driver successfully. Reboot your computer.
  9. Power off your Nexus S, connect it to your computer via USB cable, and boot it into the Bootloader Interface (you can do so by holding down the Power and Volume Up buttons at the same time).
  10. It should say LOCK STATE – LOCKED, in white just above the green Android. You are now ready to move on!

Part 2 - Fastboot Oem Unlock Method - WIPES ALL DATA! (For non-wipe method, scroll down to the new Part 2)

  1. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don’t worry about this!). Follow along with any other instructions. You should be set now.
  2. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use ‘fastboot oem unlock’ (the rooting command) now.
  3. Open a command prompt window (Start > Run > cmd.exe).
  4. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) ‘cd c:\*YOUR SDK*\tools’.
  5. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn’t).
  6. Now in the command prompt, type in (without the quotes) ‘fastboot oem unlock’.
  7. Now turn your attention to the phone, and read through the new information displayed on the screen. Using the Volume keys select Yes, then press the Power button. This will WIPE EVERYTHING! I bear no responsibility for any lost data on your phone!
  8. If everything is successful, on your phone, the LOCK STATE should now read UNLOCKED, and on your computer, the command prompt window should say something like this:
  9. Download the Clockwork Recovery image (here if you don’t already have it) to your Android SDK tools folder (*Android SDK*\tools).
  10. Rename the newly downloaded Clockwork Recovery image to ‘recovery.img’ (no quotes).
  11. Now we need to flash it to our Nexus S, so enter this command into the Command Prompt (make sure it is in the Androis SDK tools folder!) ‘fastboot flash recovery recovery.img’ (without the quotes).
  12. If all is successful, the Command Prompt window should look something like this now:
  13. Download the superuser app to the Android SDK tools folder.
  14. Power on your Nexus S, leaving it connected to USB.
  15. Mount the USB storage, and drag and drop the superuser .zip file you just downloaded into the root of the internal SD card (so Computer > *Device Name*, not in any other folders!). It should look something like this:
  16. Power off the Nexus S, and return to the Bootloader Interface (step 9, part 1).
  17. Select Recovery using the Volume buttons, then the Power button.
  18. The phone should reboot into Clockwork Recovery, but if not don’t panic, just repeat steps 9-12, including downloading a new copy of the file (mine only worked the second time around, don’t worry!)
    (So sorry for the blurry picture, but you get the idea of what Clockwork Recovery looks like!)
  19. Using the Volume buttons and Power button, select install zip from sdcard.
  20. Select choose zip from sdcard.
  21. Select the su-version#-signed.zip file you downloaded earlier and apply it.
  22. Select yes (there are lots of nos).
  23. Confirm it says something like this:
  24. Select Go Back.
  25. Select Reboot. (You will now also have an unlocked padlock when you boot up)
  26. Done! You now have to set up your phone again like when you first got it, but it will be rooted now.

New Part 2 - Does NOT wipe everything – Keeps the Bootloader locked

  1. Make sure Part 1 is completed.
  2. Make sure you have downloaded the Clockwork Recovery file and the Superuser file.
  3. Move the Clockwork Recovery file to your tools folder within the Android SDK folder, and rename it to recovery.img (for simplicity).
  4. Connect your Nexus S via USB to your computer and mount it as USB storage. Copy across the Superuser file to the top level of your sdcard. (So the first window you see, not in any other folders. The sdcard is just where all the files are stored, don’t worry about it too much for now). It should look something like this (there may be more folders however, all depending on what data you have on your phone): 
  5. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don’t worry about this!). Follow along with any other instructions. You should be set now.
  6. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use ‘fastboot boot’ (the boot image command) now.
  7. Open a command prompt window (Start > Run > cmd.exe).
  8. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) ‘cd c:\*YOUR SDK*\tools’.
  9. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn’t).
  10. We now need to use the ‘fastboot boot’ command to load Clockwork Recovery onto our Nexus S. In the command prompt, type in the following (but without the quotes, as always) ‘fastboot boot recovery.img’
  11. Once you are in Clockwork Recovery (it may take a couple of tries, don’t panic, just redownload Clockwork Recovery, and complete steps 3 and 10, part 2) it should look something like this:
    (So sorry for the blurry picture, but you get the idea of what Clockwork Recovery looks like!)
  12. Using the Volume buttons and Power button, select install zip from sdcard.
  13. Select choose zip from sdcard.
  14. Select the su-version#-signed.zip file you downloaded earlier and apply it.
  15. Select yes (there are lots of nos).
  16. Confirm it says something like this:
  17. Select Go Back.
  18. Select Reboot.
  19. Done! You should still have all your data present on your phone, and have root access!

Notes

As AllGamer said in his tutorial:

It’s normal to lose the recovery after the reboot, the steps to flash the CW recovery needs to be repeated every time you want to access the CW recovery.
This is due the build in protection in 2.3
As some one pointed it out on another topic, the good thing about this is that you’ll never lose the stock recovery of 2.3, thus minimizing the chance of a bricked phone.

If you want to the CW recovery to remain permanently, you’ll need to rename /etc/install-recovery.sh to something thing else

Keep this in mind! It’s not because you didn’t do something right ;)

Also, some root apps require BusyBox to be installed, as I found out with Titanium Backup, so once you set up your Nexus S again, head on into the Market, and download BusyBox. It installed fine on my Nexus S this way, and now TB works fine.

I hope this is the best, most thorough guide you will find on rooting the Nexus S. Enjoy! Feedback is appreciated, and I will help out if you need any extra help.

About these ads

3 responses to “Complete Guide to Rooting the Nexus S (+ No Wipe Version)

  1. Guilherme March 1, 2011 at 1:01 am

    I’ve updated my Nexus S to 2.3.3. How can I proceed?

    Thanks in advance.

    • Jonathon Grigg March 1, 2011 at 5:40 am

      Over on XDA we have been discussing this, and there is an interesting outcome. Have you rooted your Nexus S on 2.3.2? Or are you already on 2.3.3? You may need to unlock the bootloader (using the old part 2) for 2.3.3.

      However I will try to update the guide over the weekend so if you can wait a bit, that’s probably your best bet.

  2. Guilherme March 1, 2011 at 6:05 am

    Thanks, Jonathon. I’ll wait. :-)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.