Nexus One: How to unroot device and restore back to the original rom

   Posted May 16, 2011 by Jimmy Selix in Android

This guide will explain how to restore a rooted/custom rom Nexus One back to its original Google image. This guide will work with most Android devices.

This will remove root, restore back to a factory recovery image and also remove all custom tweaks to the OS. This can be handy if you decide to sell or return your phone.  Be sure to back up all data prior to doing this since anything on the phone will be removed.

So if your running a custom recovery image like Clockwork or Anon’s it will be removed and returned to the stock recovery image.

Preliminary Steps:

1. Download my quick adb/fastboot package here.  Extract this to your C: (this zip will create a folder on C:\Android\superboot-kit\ and extract files to this folder).

This zip file contains adb-windows.exe, fastboot-windows.exe, several related DLL files and a restore-back.bat file.  We will end up putting all of our img files here and then running the .bat file to do our restore.

2. Download the stock rom you want to restore back to. has several official builds up to 2.2.1 (FRG83) over here.

In my example, I am recovering back to FRG83 since that is the newest full factory rom package thats available on the web.

3. Put your Nexus One into Recovery mode/Fastboot and install the USB drivers.

  • – On your Nexus One, power it down.
  • – Once off, hold the trackball in and then power on the phone while still holding the trackball.  It will then boot to the Android Fastboot / Recovery menu.
  • – Plug your Nexus One into the USB cable to your PC.  Windows may not be able to find the USB Driver, have it check Windows Updates for the driver and it should find an HTC Bootloader driver and install it.
  • – Leave the Nexus One connected and in Fastboot / Recovery mode.

Restore device to factory rom:

Now that we are prepped, we can restore our device back and in turn remove root and the custom recovery image we have.

4. Copy all of the .img files we extracted from the factory rom into our C:\Android\superboot-kit folder.  There will be four files: boot.img, recovery.img, system.img, userdata.img.

5. Finally, in the C:\Android\superboot-kit folder, right-click on the restore-back.bat file and choose to Run As Administrator.

A command window will popup and first will check to see if your device is showing up in Fastboot.  If you see your device, hit any key for it to continue; if you don’t see your device make sure the HTC Bootloader driver installed. You may need to point the driver update to the files. Here is a link to the USB Bootloader driver for Google Developer phones, Nexus One and Nexus S phones,  get here.

The batch file will then restore the boot, recovery, system and userdata partitions back to the factory rom and also wipe the dalvik cache and lastly will reboot your device.

6. Your phone should be back to the Android setup screens and be restored back. This does not re-lock your bootloader, this still cannot easily be done at the moment.  I’d also recommend doing a checkin for updates by typing this on your phone dialer:  *#*#2432546#*#* (ie *#*#checkin#*#*); this forces your phone to check to see if there are updates from Google.  I went from 2.2.1 right up to 2.3.4 upon check in. 🙂

Additional Notes:

Here are the exact commands the batch file runs:

  • fastboot-windows.exe -w
  • fastboot-windows.exe erase cache
  • fastboot-windows.exe flash boot boot.img
  • fastboot-windows.exe flash recovery recovery.img
  • fastboot-windows.exe flash system system.img
  • fastboot-windows.exe flash userdata userdata.img
  • fastboot-windows.exe reboot

– Here is a link to the OEM USB Driver page from Google. Pick your phone maker and use such driver (non Google Dev phones).  

– Here is a link to the Google USB Driver page. Compatible with official Google Dev Phones, Nexus One, and Nexus S.

– The latest Nexus One roms available at Modaco are rather older ones, Froyo 2.2.1 so you will need to run through the system updates once your phone is on Wifi or mobile data.  You can force an update checkin by typing on the dialer keypad: *#*#2432546#*#*

– You can remove root and/or a custom recovery image by just flashing the appropriate recovery.img to your version of Android. This can be a bit trickier since you have to find the EXACT recovery.img for the version of Android your on. ie the recovery.img from 2.2.1 will not work on a 2.3.4 rom and vice versa.  Thus why I opt to reflash an older 2.2.1 rom that is all factory back and then just update to latest official build. 🙂

– This guide and batch file should work with almost any Android phone given you have the proper USB Driver installed and unlocked boot loader and .img files.


About Jimmy Selix

Jimmy Selix is an early adopter that loves to be one of the first on the block to have the latest and greatest in technology and gadgets. Another love of his is being able to share his knowledge to others seeking it. Feel free to drop any comments or questions that you may have.
View more articles by Jimmy Selix

The Conversation

Follow the reactions below and share your own thoughts.

  • Gildastalmadge

    Don’t install applications and DLLs from unknown sources – go to the source!

    • is a trusted source. paulobrien is one of the elite android modders/cfw makers/hackers out there 😉

  • Thanks a Ton!!!!… I bricked my phone yesterday trying to copy system files that can read connected Arabic. 

    Since this is my first time dealing with the System files and I did not find the Stock Roms on the official android site (only source code 🙁 ) I was disappointed but luckly I came across your post and found the links to the Stock Roms.

    I downloaded & flashed them and everything worked fine….Thanks again 🙂

    • not a problem. i always have to do a ton of research when google pushes a new os update since i’m not a big CM7 fan and like to try the updates vanilla stock. i like the mods but imo there are just TOO many at times. 

      and like you, i’ve done a few system edits that results in a boot loop and i need to restore. the fastboot method is a guarantee no matter what you do. if you can recovery boot, you can unbrick 😉
      thanks for stopping by! 

  • Johhny

    Didnt work for me on N1 running 2.3.4 stock rom.  

    If no device shows above this line, close this window and reconnect NeOtherwise….Press any key to continue . . .erasing ‘userdata’… FAILED (remote: not allowed)erasing ‘cache’… OKAYsending ‘boot’ (2338 KB)… OKAYwriting ‘boot’… INFOsignature checking…FAILED (remote: signature verify fail)sending ‘recovery’ (2564 KB)… OKAYwriting ‘recovery’… INFOsignature checking…FAILED (remote: signature verify fail)sending ‘system’ (125969 KB)… OKAYwriting ‘system’… INFOsignature checking…FAILED (remote: signature verify fail)sending ‘userdata’ (2 KB)… OKAYwriting ‘userdata’… INFOsignature checking…FAILED (remote: signature verify fail)rebooting…”Restore completed, device will reboot”Press any key to continue . . .

    • claudio

      > Gents if you are getting (remote: signature verify fail) message you should run the fastboot.exe (download from foruns on google)

      run the following command:

      fastboot oem unlock

      After that a screen on the phone prompting to accept bootloader unlock will show up and you accept it.
      After that the commands should work without signature verify fail.

  • sorry for late reply. 

    i have not tried w/a stock rom yet, i can load up my n1 later and see. do you have root on your stock rom or pure vanilla stock?

  • Sexyneme

    m trying to get boot,recovery,system,userdata.img files since 2 days m not getting these.where are they plese help me to fing thanks.

  • ck

    Oh, i need the help too, my problem same with “Johhny”

    • Jimmy Selix

      1. are you rooted?
      2. if so, what rom are you running?
      3. if not rooted, you should be fine with just a normal Factory Reset.

      let me know if that helps

  • nagraj

    A+ to Jimmy, thanks a bunch for this tutorial.
    It worked perfectly form me. I was on CynogenMod and I restored back to Froyo and the system update took me straight up to GB !
    I can now love with my Nexus one for 1 more year 🙂

  • Pingback: [آموزش] چگونه Nexus One روت شده خود را به حالت کارخانه ای باز گردانید ؟()

  • CoNtRoL809

    dude you rock!!!!! You made my whole week!!!! I had my power button broke down and my phone was soft briked, and thanks to you it’s back to life!!!! A lot of love from the Dominican Republic!!! Did I mentioned that you ROCK!!!!!!!!! Thanks!!!!

  • mariane

    hi i my nexus one is not detected in command prompt, i have installed all the new drivers but still no luck. i am rooted and is with cyanogenmod 7
    please help. Thanks

  • Jimmy Selix

    re: Mariane
    be sure to enable usb debugging in Settings > Applications > Development 🙂
    does device manager show your device as an adb?

  • Cedric


    I am having the exact problem as Mariane, my usb debugging is on and on device manager, my android shows as Android Bootloader Interface.

    On a side note, my nexus one haven’t been able to usb to my laptop for quite sometime now, it just stopped working.


  • > hmm, have you tried a different usb port on your computer or perhaps a different computer (if possible)? sometimes my devices have issues when connecting through a non powered usb hub or even the front usb ports on a computer case (desktop pc that is).

  • Athar

    Thanks..worked for like peanuts on htc google nexus one. Now will try HTC Flyer Tab too…
    thanks again

  • lovres

    Thanks for the topic! Everything is clear and detailed even for dummies.