How To: Root the Samsung Nexus S (Updated 01.20.11)

I. Before You Begin

1. This will unlock your phone’s bootloader (so you can flash recoveries and ROMs), and can be undone very easily (unlike the Nexus One).

2. This WILL ERASE all your information on the phone.

II. Setup ADB

1. Head to our How To Setup ADB procedure, once you can see your phone’s serial number after typing adb devices then come back to this procedure and continue.
(MAKE SURE YOU FOLLOW ALL THE STEPS IN THE WRITTEN PROCEDURE AS THERE HAVE BEEN UPDATES ADDED).

III. Unlock the Bootloader

1. Turn off your phone.

2. Turn it on by holding Volume Up and Power until fastboot mode comes up.

3. Plug the phone in via USB cable to your computer while it is in fastboot mode.

4. Open a command prompt on your computer by clicking on the Start menu button and typing cmd and hitting enter in the search box.

5. In the command prompt that pops up, type the following with hitting enter at the end of each line:

cd c:\androidsdk\tools\
fastboot oem unlock

6. At this point the phone will ask you to confirm, select yes. You now have an unlocked bootloader.

IV. Flash a Custom Recovery Image

1.  Download the custom recovery image and save it to your computer:

ClockworkMod Recovery for Nexus S

2. Copy the recovery.img file inside the tools folder of the sdk (so it is in the same folder as fastboot.exe)

3. Then in the command prompt that should still be open, type the following with hitting enter at the end of each line:

fastboot flash recovery recovery.img

4. Once it is flashed, leave the phone in plugged in and in fastboot mode.

V. Root the Phone

1. In fastboot mode, select Recovery using the volume buttons and power button and wait for it to boot into recovery mode.

2. Download the Superuser flashable zip file and save it to your computer.

Superuser for Android 2.0 and Up Flashable Zip

3. Once in recovery mode, select Mounts and Storage then select Mount USB Storage so we can transfer files to the sd while it is in recovery mode.

4. Copy the Superuser.zip file to the root of your internal storage (do NOT extract it, do NOT put it in any folders, just on the phone’s storage itself).

5. Select Unmount on the phone.

6. Select Mount System, then select Go Back to  get back to the main menu.

7. Then scroll to flash zip from sdcard and then choose zip from sd card and select the superuser.zip file and wait for it to finish flashing.

8. Once it is done, select Go Back then Reboot System and wait for the phone to reboot.

VI. Stop the Phone from Uninstalling the Custom Recovery Image

1. Once the phone is booted up, plug it in via USB cable and do NOT mount the storage.

2. Open a command prompt on the computer and type the following with hitting enter at the end of each line:

adb shell
cd etc
mount -o rw,remount /dev/block/mtdblock3 /system
mv install-recovery.sh install-recovery-no.sh

3. That will mount the system as writable and rename the file that overwrites the recovery image on reboot so that our custom recovery will stay.

4. Turn off the phone and turn it back on by holding down Volume Up and Power to get into fastboot mode.

5. Plug the phone in via USB cable while in fastboot mode and open the command prompt again and type the following with hitting enter at the end of each line:

cd\
cd c:\androidsdk\tools\
adb reboot bootloader
fastboot flash recovery recovery.img

5. Once it is done, you have just reflashed the recovery image and it will now stick. You are all done! You have an unlocked bootloader, a custom recovery image, and root access! If you want to now load a custom ROM head to the next procedure linked below.

VII. (Optional) Load a Custom ROM

1. Head to our How To Load a Custom ROM on the Nexus S procedure.

Thanks Koush for the rooting images!

137 thoughts on “How To: Root the Samsung Nexus S (Updated 01.20.11)”

  1. ive done the adb process and iget my phones serial number my issue comes when i try to put in fastboot oem unlock in the terminal it said’s command not found plz help.

    1. For 2.3, they are not in the same directory. ADB is under “platform-tools” directory while fastboot and everything else is under the original “tools” directory.

  2. nope one didn’t show i even checked my finder for it didn’t see it do i just download one for mac’s and i got it to work thank you as a request can u do some for macs or at least speak on mac’s while doing pc version because trying to piece together the process for mac going to 100 different sites is such a pain especially when i check this site so often thank you again

  3. If you followed the directions, we have a how to setup ADB procedure and if you followed that procedure everything would be in the tools folder (we just give you adbrite to put in manually instead of the hassle of installing the platform tools etc).

  4. this is the second phone i have done this to, however with this one once we get to the phase where we select redovery in the bootloader it just goes to the screen with the google logo and the unlocked padlock icon and it sticks there, any suggestions?

    1. Try entering the recovery command again in the command prompt:

      cd c:androidsdktools

      fastboot flash recovery recovery.img

      Then restart in recovery and continue

    2. Try entering the recovery command again in the command prompt:

      cd c:androidsdktools

      fastboot flash recovery recovery.img

      Then restart in recovery and continue

    3. Try entering the recovery command again in the command prompt:

      cd c:androidsdktools

      fastboot flash recovery recovery.img

      Then restart in recovery and continue

  5. this is the second phone i have done this to, however with this one once we get to the phase where we select redovery in the bootloader it just goes to the screen with the google logo and the unlocked padlock icon and it sticks there, any suggestions?

  6. Uhm I get stuck at fastboot unlock oem. I enter it and the command screen says waiting for device and the phone just sits there not going anywhere. Any ideas? Thanks

    1. Hi,

      my nexus one have USB ID of 4E20 to the driver was not installed correctly.
      the workaround was to change the google-usb_driver.inf under google-usb_driver in the SDK

      look for nexusone and replace the 3 lines

      %SingleAdbInterface% = USB_Install, USBVID_18D1&PID_4E11
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E12&MI_01
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E22&MI_01

      with

      %SingleAdbInterface% = USB_Install, USBVID_18D1&PID_4E20
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E12&MI_01
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E20&MI_01

      after this you can reinstall the the driver.

    2. Hi,

      my nexus one have USB ID of 4E20 to the driver was not installed correctly.
      the workaround was to change the google-usb_driver.inf under google-usb_driver in the SDK

      look for nexusone and replace the 3 lines

      %SingleAdbInterface% = USB_Install, USBVID_18D1&PID_4E11
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E12&MI_01
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E22&MI_01

      with

      %SingleAdbInterface% = USB_Install, USBVID_18D1&PID_4E20
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E12&MI_01
      %CompositeAdbInterface% = USB_Install, USBVID_18D1&PID_4E20&MI_01

      after this you can reinstall the the driver.

  7. Uhm I get stuck at fastboot unlock oem. I enter it and the command screen says waiting for device and the phone just sits there not going anywhere. Any ideas? Thanks

  8. how come i can get into recovery by selecting recovery from the flashboot mode . i am stuck in google n lock screen . i took out the battery n turn back on . Its works fine but no superuser logo . what did i did wrong ?

  9. This worked great & I got all the way up through step 6 under rooting the phone, but then, when I try to select Recovery, i just get a white & yellow triangle with the little Android and nothing ever happens after that. My phone is back to factory settings (boo) and I can see that the superuser.zip is in the root, but i can’t get past this step. Any advice?

    Thanks!!! This is the first tutorial that really helped and allowed me to understand unlocking the bootloader.

  10. The nexus s does not have a sd card to put the superuser.zip file in. I assume the /DCIM is the appropriate place.

    Is that correct?

    I go through all the steps and everything runs with no errors. But then I go to ROM Manager and it tells me I need to root my phone “Superuser not found @ system/bin/su or system/xbin/su.

    Whats going on here?

    1. Okay, more info. When I run the superuser.zip file I get the following:
      finding update package
      opening update package
      verifying update package
      E:signature verification failed
      installation aborted.

      When I use the su-2.3.6.1-ef-signed.zip I get:

      finding update package
      opening update package
      verifying update package
      E:failed to seek in /tmp/sideload/package.zip (invalid argument)
      E:signature verification failed
      installation aborted.

      I using build number GRH78.

    2. Okay, more info. When I run the superuser.zip file I get the following:
      finding update package
      opening update package
      verifying update package
      E:signature verification failed
      installation aborted.

      When I use the su-2.3.6.1-ef-signed.zip I get:

      finding update package
      opening update package
      verifying update package
      E:failed to seek in /tmp/sideload/package.zip (invalid argument)
      E:signature verification failed
      installation aborted.

      I using build number GRH78.

    3. Figured it out. After unlock I did:
      fastboot-windows flash recovery recovery-clockwork-herring.img

      The step i was missing was:
      fastboot-windows flash boot boot.superboot.img

      then, fastboot-windows reboot

      Done! Now rom manager works and so does tethering.

    4. Figured it out. After unlock I did:
      fastboot-windows flash recovery recovery-clockwork-herring.img

      The step i was missing was:
      fastboot-windows flash boot boot.superboot.img

      then, fastboot-windows reboot

      Done! Now rom manager works and so does tethering.

  11. ya i got stuck at ‘fastboot oem unlock’, it just says ” and the phone just sits at the bootloader. any ideas of what to do??? thx.

  12. ya i got stuck at ‘fastboot oem unlock’, it just says ” and the phone just sits at the bootloader. any ideas of what to do??? thx.

    1. Did you unpack the drivers from the android sdk, then install the driver? I am using the android_sdk_r08_windows.zip file.

    2. Did you unpack the drivers from the android sdk, then install the driver? I am using the android_sdk_r08_windows.zip file.

      1. ok so i got it all installed (it was the drivers i believe) but now after about a week rom manager does not have super user access anymore. it did and was working fine besides needing to flash clockworkmod recovery every time i rebooted the phone. any ideas of why that would happen? and needing to flash clockworkmod like that, is that normal?

  13. I tried to use Android Mate to rename the install-recovery.sh file like you did in the video. It failed because the file is marked as Read Only. When I looked carefully at your video, I see that your renaming also failed (message the pops up at the bottom of the screen). I ended up using Root Explorer, which has a Read/Write toggle, and thus allows the renaming to stick.

      1. The file is in the etc directory. Toggle the “Mount R/W” button at top of screen. Rename the file like shown in the video. Done.

        1. toggle is located where? i tried using many of the root file explorer as well as the computer cmd prompt…
          from using the Android Mate as advised in the video where is the toggle for ‘mount r/w’? 

  14. I tried to use Android Mate to rename the install-recovery.sh file like you did in the video. It failed because the file is marked as Read Only. When I looked carefully at your video, I see that your renaming also failed (message the pops up at the bottom of the screen). I ended up using Root Explorer, which has a Read/Write toggle, and thus allows the renaming to stick.

  15. thank you,
    it was a very good guide.
    must say I had some trouble all threw the process but if you watch the film and read carefully everything works perfectlly.

    thanks!!!

  16. Can anyone help me, i absolutely love this guide it’s great and fully detailed. Now i only have one problem, every single time i try to go into CMD and type mount-o rw,remount/dev/block/mtdblock3 /system

    i get mount-o :permission denied

    Does anyone know how to fix this problem? i don’t want to have to go through the whole process again.

    1. there probably should be a space between mount and -o
      -o is a switch, the command is not mount-o, it’s mount, the switch is placed after that, not concatenanted to it.

      1. I cannot get adb shell to switch from $ to # giving me root access.  I installed super user with the link in the instructions, updated it in the market place, but every time I type su in adb shell i get:

        C:android-sdkplatform-tools>adb shell
        shell@android:/ $ su
        su
        reloc_library[1285]:  2290 cannot locate ‘_mktemp’…
        CANNOT LINK EXECUTABLE
         255|shell@android:/ $

        USB debug is enabled.  What am I doing wrong?

  17. I used root mate but it didn’t change the name of the file and my computer cant find the adb, What should I do?

    1. I’m getting caught at this step too. I’m not sure what to follow, the written instructions or the video. If I follow the video it say that renaming the recovery failed.

      Not sure what to do to stop the old recovery from reflashing.

    2. Enable USB debugging again (not default enabled in recovery image). Just go through the setup guide on your phone screen and go into Settings->Applications->Development->USB debugging (and change the checker)

  18. hi, i have forgot to enable the USB Debugging mode, and now i cannot connect my phone through command line, n e suggestions?

    thnks

  19. Okay, so I followed the direction to the T. Here are some troubleshooting steps I found. If it says while you are unlocking the bootloader, make sure that the adbwinapi.dll AND adbwinusbapi.dll files are in the same folder as fastboot. (If you are downloading the lastest version of SDK from Google, Fastboot and ADB will be in two different folders.)

    Where I’m stuck is the fact that I still don’t have SU access after the root is complete. I’ve flashed the recovery, mounted, transfered the superuser.zip, installed said zip, rebooted, then when I run ADB SHELL it says permission denied when telling the phone not to delete my recovery. I tried granting myself SU in the shell and that is denied as well.

    I decided I had done everything wrong so this morning I got up and did everything again (funny, after 3 hours last night it only took me about 5 minutes) and it still isn’t working. Same hang up. I’m really getting frustrated. Anyone have any ideas?

  20. had issues with renaming the install-recovery.sh had to download root explorer from the market. Thanks treodoc for giving that solution. Woot for root!! Thanks for the guide!

  21. Thanks for this – like with my Hero 18 months ago you have got me up and running. All seems to be fine (and I have flashed a custom ROM as well) – however I don’t seem have the install-recovery file on my system to rename – and this is confirmed by many reboots not overwriting clockworkmod – any explanation and how I can restore my original recovery (if needed) would be greatly appreciated!

    1. I’m also very curious about this. I would lilke to know how to revert the nexus s back to the original recovery since mine didn’t have the install-recovery.sh file and mine doesnt ever revert to stock recovery (i keep root access even after rebooting)

  22. Also had to add the Product-ID 4E20 to the USB-Drivers to make fastboot work!
    maybe this is because it is a “europe Nexus-S i9023” (the version with LCD not the amoled version i9020)….
    OR maybe it is the german “vodafone version”. This is not really “branded” but the carrier-info is set to “VDF”.

    After patching the USB-Drivers everything went smoth!
    before remount /system, you forgott to enter “su” mode. But this is not neccessarry for my 9023! There is no script to remove recovery. So no need to reflash.

  23. Im still stuck in trying to unlock the phone… I never get prompt on the phone and the computer just says waiting… the computer is connecting to the phone and recognized it because it gave me the number but I’m not getting prompt… need help I’m running android 2.3.2 and my computer is on windows 7

  24. I got this far: “2. Open a command prompt on the computer and type the following with hitting enter at the end of each line:

    adb shell”

    When I typed in ‘adb shell’. I got ‘error: device not found’. Now my phone’s stuck in limbo.

  25. Dumb question – the recovery image is only required if you want to recover back to stock correct?

    The unlock is very easy and quick to do – the .img file seems to be where people get stuck.

    Once unlocked – you could skip that step and load a rom.

  26. I have followed the video guide and got to the point where I am looking for install-recovery.sh in the system/etc directory but its not there. What have I done wrong and how do I get it there?

    Thanks for any help!

  27. I am stuck I did all the above but I cant find the ” install-recovery.sh” file… I also read I cant revert back to stock without this file.. so what can I do?
    I had an ota update to v2.3.4 I clicked install when the phone rebooted to start it, it went into clockwork recovery??

    Yes I am a newbie I hope some one can point me in the right direction.

  28. after typing fastboot oem unlock it says waiting for device in the command prompt but stays there forever. i know it’s not supposed to take this long.

  29. that file that’s supposed to be in the android mate app doesn’t exist when i go to rename it. it’s not there. was something updated since the day this was made and now? i mean i have the super user and recovery img on my phone but how will i know if it’ snot being written over or not?

  30. Jaggedredpill

    this does not work.  I can get to fast boot mode, when I type fastboot oem unlock it says I am missing a .dll.  I copy fastboot.exe to the same dir as the dll and run again, nothing happens.  my phone does not prompt me for anything.  bogus instructions

  31. This does not work, wrong information.  they got the info from another incorrect website to get you to come here to sell advertising.  does not work, tried it 20 times.

  32. Hey! I have the problem that when I do step VI. that my cmd says that no file or directory “install-recovery.sh” can be found… please help me!

  33. I just a samsung nexus s, my husbands number is showing up as “my number” in the settings, does anyone know how to change this setting?

  34. This worked for me as well!! Watch the video closely when he trys to rename the file in the “etc” it says failed to rename!!!! If you use this other root explorer you have to click the mount r/w button then edit the file name with the -no.. Worked like a champ. David please watch the video cause alot of ppl depend on you for good info myself included and you have always been good but this could really set ppl off. I worked on this for awhile before noticing it, Thanks for all the good work! And yes work if your on 2.4 or w/e

    1. Holy crap, my bad guys. Nice catch Louie! What file explorer did you use and I’ll make an edit to the procedure. Thanks!

      EDIT: So I just noticed that for some reason in the written procedure I put how to do it using ADB, and in the video I used the file explorer… Not sure why I did that honestly. For people having issues in the meantime, just follow the written procedure (Section VI), instead of using the file explorer.

      1. Hey David,

        The written instructions are not working for me. I am getting the same error with renaming as well. Did you update them? Or could you shed some light on how to do this using the Explorer app? Any info would be greatly appreciated.

  35. I have done everything in the description and in the video as well, i have changed the install-recovery.sh to install-recovery-no.sh but when i trying to install it, im getting denied and i cant find my device in fastboot mode when im trying to flash the recovery image again. Please Help??

  36. Windows Vista can’t find drivers for fastboot mode. The drivers for Android device installed just fine. I then booted into fastboot and then connected my Nexus S to my PC and Windows Vista needs to install drivers…but said drivers aren’t found.

    1. Here is a solution: http://forum.xda-developers.com/showpost.php?p=12347750&postcount=2. There “extrasgoogleusb_driver” is “c:androidsdkextrasgoogleusb_driver”.

  37. Please help. (See screenshot)
    I cannot progress beyond step VI (Item 2)
    (STOP THE PHONE FROM UNINSTALLING THE CUSTOM RECOVERY IMAGE)
    adb shell
    cd etc
    PROBLEM BEYOND NEXT LINE (tried both variations!)
    mount -o rw,remount/dev/block/mtdblock3/system
    mount -o rw,remount /dev/block/mtdblock3 /system
    CMD DISPLAYS:
    Usage: mount [-r] [-w] [-o options] [-t type] device directory
    IS THIS OK TO CARRY ON FROM?
    mv install-recovery.sh install-recovery-no.sh
    CMD DISPLAYS:
    failed on ‘install-recovery.sh’ – No such file or directory

    THE ICONS ON MY SCREEN DOES DISPLAY “Superuser,” and the phone is working fine.
    I want to get to the end, but am stuck here at present.
    Can anyone help/advise me.
    Many Thanks.

  38. Great guide, but i’m having an issue. when i type mount “-o rw,remount/dev/block/mtdblock3 /system” i get the message “mount: Operation not permitted” 
    any help is appreciated. thanks in advance.

  39. I can not get it to rename my recovery in the step where you type install-recovery I get failed read only error can anyone help  me with this.

  40. Can I root or unlock my Samsung nexus s Android with out a computer just with the phone or I need a computer. And how can I use any service provider instead of Fido?

  41. not sure if this is a driver issue or not but when i setup adb and go into a command prompt and type “adb devices” i see a serial number which im guessing is my nexus s.  Now when i power the phone off and type in adb devices again i get nothing ? is that normal or should i still see my device serial number there 

    1. You are not going to see your phone listed when you type ‘adb devices’ while your phone is off because your phone is off.   adb devices lists all the phones it is connected to.  when your phone is on, and not in fastboot, if adb sees the phone, it will list it.  hope that helps

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.