[Nexus S General] stewarta:
Unlocking, rooting, persistent recovery

@babloogta:

Unlock and Root the Nexus S GT-i9023

(Note that this is not the same as the GT-i9020A)

Part 1 - Drivers

1.1 Download Android SDK

1.2 Unzip and launch ‘SDK Manager.exe’

1.3 Cancel the first popup and go to ‘Available packages’ > ‘Third party Add-ons’ > ‘Google Inc.’

1.4 Select ‘Google USB Driver package’ and click ‘Install Selected’

1.5 Once you're finished go to your SDK installation ‘extras\google\usb_driver’ dir (if using a Mac, open a terminal window and cd to the android-sdk-mac_86 folder then run ./tools/Android)

1.6 (N.B. Ignore this step for i9020A models) Open ‘android_winusb.inf’ and add the following lines to both ‘[Google.NTx86]’ and ‘[Google.NTamd64]’ sections :

;

;Google Nexus S GT-i9023

%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E20

;

(as described here by allgamer (SOLVED) Google Android USB drivers - Nexus S SCLCD GT-i9023 not recognized]

1.7 Turn Off your NXS

1.8 Connect the NXS to the PC via the USB cable

1.9 Boot the NXS into the Bootloader Interface, by holding Volume UP & Power button

It reads LOCK STATE - LOCKED

Open Device Manager in Windows (or run devmgmt.msc) make sure you don't see this problem (windows failed to identify the NXS and install the correct drivers)

1.10 Right click and select Update Driver Software

1.11 Select Browse my computer for driver software

1.12 Point it to your Android SDK installation ‘extras\google\usb_driver’ dir

1.13 Make sure to CLICK ‘Let me pick from a list of device drivers on my computer’

1.14 Then from the list 3 choices select Android Bootloader Interface

1.15 If it's installed properly it should show up like this (reboot is not required)

NOTE: if you encounter problems like question marks, unknown drivers, or exclamation marks eve after you have installed the drivers, download and try the USBDeview 32/64 to remove and uninstall all the junk USB devices from your computer/registry

Part 2 - Unlock

2.1 Open a command window and type ‘CMD’ followed by the enter key

2.2 Change folders to where you unzipped the Android SDK and cd into the ‘tools’ folder

2.3 Type ‘fastboot oem unlock’ and press the enter key

Then you should see this

fastboot oem unlock

...

Selecting YES will wipe EVERYTHING from the NXS, so make sure you have backed up everything you needed to before you continue.

2.4 Use the Volume up/down keys to select and Power key to apply

you should see something like this after it's done

... OKAY [435.433s]

finished. total time: 435.433s

Now back on the NXS screen you should see

LOCK STATE – UNLOCKED

Part 3 - Recovery

3.1 Download the ClockworkMod recovery image (for i9020A models, use this i9023 recovery image too!) 3024v3-i9023.img from [MOD][RECOVERY]Clockwork 3.0.2.4 New wipe & confirm menus!! i9023 & i9020 versions

3.2 Save it to the Android SDK ‘tools’ folder on your PC

3.3 Open a command window on your PC and type ‘CMD’ followed by enter

3.4 Change folders (directory) to where you unzipped the Android SDK and into the ‘tools’ folder

3.5 Next, type ‘fastboot flash recovery 3024v3-i9023.img’ and press enter

You should get something like this, if not your image is corrupted, download it again

sending 'recovery' (3980 KB)... OKAY [ 0.621s]

writing 'recovery'... OKAY [ 0.511s]

finished. total time: 1.132s

3.6 Lastly in this phase Power Off the NXS or reboot it.

Part 4 - Root

4.1 Power ON the NXS

4.2 Download su-2.3.6.1-ef-signed.zip from [APP] Superuser 2.3.6.1 - Now on the Market [2010-09-05]

4.3 Save it to the Android SDK ‘platform-tools’ dir

4.4 Open a terminal window on the PC and type ‘CMD’ followed by the enter key

4.5 Change to the folder (directory) where you unzipped the Android SDK and change to the ‘platform-tools’ folder

4.6 In the PC terminal window type ‘adb push su-2.3.6.1-ef-signed.zip /SDCARD/su-2.3.6.1-ef-signed.zip’ followed by the enter key

4.7 Boot the NXS into the Bootloader Interface, by holding Volume UP & Power button

4.8 At the first menu on the NXS select ‘Recovery

4.9 If you simply see a triangle with exclamation mark, you may need to simply repeat the Phase 4 steps above.

4.10 Assuming you are in the Recovery menu, select ‘Install ZIP from SDCARD’ (the Vol Up and Down keys Navigate the menu, while the power button activates your selection)

4.11 Select ‘Choose ZIP from SDCARD’ (power button to apply)

4.12 Select su-2.3.6.1-ef-signed.zip (power button to apply)

4.13 Select ‘Yes - su-2.3.6.1-ef-signed.zip’

The NXS should report:

Install from SDCARD complete

4.15 Select go back

4.16 Still in Recovery mode, from the menu - select reboot

5. Persistent ClockworkMod Recovery

Wisely, Google have ensured that the ClockworkMod (CWM) Recovery is not persistent. That stated, many more experienced hackers do make CWM persistent for their own convenience. Now you have Root Access (Superuser), you can do the following on the NXS:

5.1 Install Rom Manager from Market

5.2 From Rom Manager, select ‘Flash ClockworkMod Recovery’ which will download the latest CWM (5.0.2.0) at the time of writing (10 Oct 2011)

5.3 Boot the NXS into Recovery and mount the system files from 'mounts and storage' (see image below).

5.4 Connect your PC to the NXS via USB and open a terminal window by typing ‘CMD’ and then the ‘enter key’.

5.5 On the PC change folders to the android-sdk/platform-tools folder and run the following command line on the PC:

adb shell

This will bring up a $# and a blinking cursor. The $ is the prompt symbol on the NXS, while the # symbol indicates you are the Superuser with root access.

5.6 Next type the following at the NXS $# prompt:

mv /system/etc/install-recovery.sh /system/etc/install-recovery.bak

This is a Linux command to move the sh script to a bak (backup) file name.

5.7 Reboot back into Android OS.

5.8 Next time you reboot the NXS into Recovery holding the Power Up button and the Power button simultaneously, and from the first menu select Recovery you will see a cyan coloured menu. Reboot back into Android unless there is something you may want to do, e.g., change the file permissions on graphics files so they appear in Gallery—chmod 777 file.jpg

5.8 Each and every time you boot into recovery CWM Recovery will be available.

Enjoy!

[Thanks to AllGamer & afilopou for the information on Unlocking and Rooting.]