Here's the steps that I followed:
- Reboot Nexus S into bootloader mode. To do so, use the following command at terminal or press the Volume Up + Power key simultaneously.
adb reboot bootloader
- Unlock the bootloader using the following command:
fastboot oem unlock
- Download recovery-clockwork-herring.img from here.
- Now install Clockwork recovery image on Nexus S by using the following command:
fastboot flash recovery recovery-clockwork-herring.img
- Reboot into recovery mode by using the following command at terminal or choose recovery from fastboot menu
adb reboot recovery
- Download Koush's unsecure boot image (rootboot.img) from here and put it in your /sdk/tools/ folder
- Now boot into fastboot and use the following command to install the rooted boot image:
fastboot flash boot rootboot.img
- Download CHainsDD's Superuser zip (su-18.104.22.168-ef-signed.zip) from here.
- Open the zip file, place the su binary and Superuser.apk in your sdk/tools/ folder.
- Now use the following set of commands at terminal to install Superuser app
adb push su /system/bin/
adb push Superuser.apk /system/app/
chmod 6755 /system/bin/su