[Nexus S General] Amin Sabet:
1/27/11 Update: Some members have commented that the MoDaCo Superboot method is easier, and although I haven't used it myself, it does look easier. If you want to go that route instead, you'll still need to unlock your bootloader, which means completing Steps 1-5 below. After that, you can go with the method given here: http://xdaforums.com/showthread.php?t=927838

________________________________________________________

The following directions should let you root your Nexus S using an Intel Mac running OS 10.5 or 10.6. Thanks to Koush for providing the method and the recovery img, to ChainsDD for providing Superuser, and to Luxferro for providing a workaround for 2.3.1.

You should apply the 2.3.1 OTA update before obtaining root. Otherwise you'll have to do it over again after the update. If you installed a rooted/insecure boot image with the original instructions and now find yourself unable to upgrade to 2.3.1 (Status 7 error), one option is to use ROM Manager to restore the 2.3.1 Nandroid backup kindly provided by momohammed20 in this thread. From there, you will have stock 2.3.1 and can follow the steps below to obtain root again.

Warning: If you break your phone trying this, I am not responsible. I do not guarantee that the following is safe or that the steps are correct. Rooting your phone voids the warranty. I have no responsibility for anything that occurs as a result of your following these directions! I cannot provide any support nor guide you in undoing this process and restoring the phone to factory condition.

This process will wipe your phone. Ie, you will lose all your apps/data on your phone and have to reinstall them. It will also wipe your external storage, so back that up prior to proceeding if you want to keep anything.

1) Download the "androidsdk.zip" file from here: http://www.box.net/shared/ljhg8t5sjh

Unzip that file (if not already unzipped automatically upon download), and place the "androidsdk" folder on your Desktop. It has to be in this location for the rest of the steps to work.

2) On your phone, go to Menu>Settings>Applications. Select "Development" and check the box next to "USB debugging"

3) Connect the phone to your Mac via the USB cable

4) Open a Terminal window on your Mac (Applications>Utilities>Terminal), and copy/paste the following into the Terminal:

~/Desktop/androidsdk/platform-tools/adb reboot bootloader

Hit "Return" and wait for your phone to to reboot into Bootloader/Fastboot mode

5) If your Bootloader screen says "LOCK STATE - UNLOCKED" then skip to Step 6. If it says "LOCK STATE - LOCKED" then copy/paste the following into the Terminal:

~/Desktop/androidsdk/tools/fastboot oem unlock

Hit "Return" and on your phone will prompt you to confirm and warn you that you are going to lose everything. Confirm. At this point you will have an unlocked bootloader.

6) Copy/paste the following into the Terminal window:

~/Desktop/androidsdk/tools/fastboot flash recovery ~/Desktop/androidsdk/tools/recovery-clockwork-3.0.0.0-crespo.img

Hit "Return" again and wait for recovery to flash.

7) At this point you should still be in Bootloader/Fastboot mode. DO NOT REBOOT YOUR PHONE*. Press the "Volume Down" key until "RECOVERY" is highlighted, and press the "Power" key to select this option.

*Note: You must go to Recovery directly from Bootloader/Fastboot mode after Step 6 without rebooting your phone in between, or else your phone will replace ClockworkMod Recovery, hang at the "Google" splash screen requiring a battery pull, and you'll need to start again from Step 6.

For the following steps while in Recovery, use "Volume Down" to highlight a selection and "Power" to choose that selection:

8) Choose "mounts and storage"

9) Choose "mount USB storage". Your phone should now be mounted on the Mac as a Device called "NO NAME"

10) Look inside the "androidsdk" folder on your Desktop for a file called "su2361ef.zip", and using the Finder on your Mac, copy that file (without unzipping it) to the main directory of your mounted phone ("NO NAME").

11) Eject/unmount your phone in the Finder on your Mac.

12) On your phone, choose "Unmount"

13) Choose "mount /system"

14) Choose "+++++Go Back+++++"

15) Choose "install zip from sdcard"

16) Choose "choose zip from sdcard"

17) Choose "su2361ef.zip"

At this point you have root, but your phone will continue to replace ClockworkMod Recovery on reboot. To prevent this, do the following:

1) Reboot your phone, and download the app "Root Explorer" from the Market

2) Open Root Explorer and navigate to the "etc" directory.

3) Tap on the gray box that says "Mount R/W"

4) Tap and hold on the file "install-recovery.sh" and rename this file to "install-recovery.sh.old"

5) Download the app "ROM Manager"

6) Open ROM Manager and choose "Flash ClockworkMod Recovery". At this point you are all set :).

---------------------------------------------

To re-lock your bootloader (Optional step):

1) With your phone connected and "USB Debugging" still enabled (which it will be unless you disabled it after the above), copy/paste the following to the Terminal:

~/Desktop/androidsdk/platform-tools/adb reboot bootloader

Hit "Return" and wait for your phone to to reboot into Bootloader/Fastboot mode

2) Copy/paste the following to the Terminal:

~/Desktop/androidsdk/tools/fastboot oem lock

Hit "Return".

Reboot your phone.

---------------------------------------------

Major thanks to Koush, ChainsDD, momohammed20, and Luxferro!