Share this Story

How to: Unroot the Galaxy Nexus, Re-lock the Bootloader and Return to a Factory State

Unlocking the bootloader and rooting your Galaxy Nexus is really only half the battle. There may come a time when you need need to lock everything back up, including that bootloader. Thanks to the Android team, we have the factory images that can not only fix a bootlooping or soft-bricked device, but make it look like you just pulled it out of the box.  


*Note – These instructions will work for any Nexus device, you just need to swap out files and filenames in the command lines.

1.  Download the newest factory images to your PC.

[Download (4.0.2)]  [Download (4.0.4)] [Download (4.1.1)]

2.  Unzip the file and its contents into your SDK/Tools folder (wherever your adb.exe and fastboot.exe files are).

*Make sure they are not in their own folder, but have all been extracted to Tools.

3.  From within your Tools folder, open a command prompt (SHIFT + right click – “open command prompt here”):
4.  Type the following commands, allowing each to finish before moving onto the next:

*If flashing 4.0.4 or newer files, you will want to swap out to matching file names in the commands below.

adb reboot bootloader
fastboot flash bootloader bootloader-toro-primekk15.img
fastboot reboot-bootloader
fastboot flash radio radio-toro-i515.ek02.img
fastboot reboot-bootloader
fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img
fastboot reboot-bootloader
fastboot -w update image-mysid-icl53f.zip
fastboot reboot-bootloader
fastboot oem lock

5.  Reboot your phone by highlighting “Start” and pressing the lock switch.
6.  It really is as simple as that. Your phone is now back to a 100% stock, unrooted and locked state.


    Still iam facing WIFI slow and Touch screen multi-touch issue …How to solve this ???? IF there is no solution for this plz mention

  • morgan

    my phone is brick how adb mode dont turn my phone!! :S sorry but i dont speak english

  • bqluong

    I was having a really tough time flashing the 4.1.1 Jelly Bean to the Galaxy Nexus because Win7 64-bit kept disconnecting and adb didn’t show any devices. There is a file in the zip file called flash_all.bat. So Step 1: adb reboot bootloader. Step 2: flash_all.bat. Then sit back and relax and watch magic happen.

  • George

    I get this..PLEASE HELP

    sending ‘radio’ (10496 KB)… OKAY [ 1.370s]
    writing ‘radio’… FAILED (remote: Write Fail)
    ished. total time: 1.956s

  • Luiz Felipe Maximiano

    Hello, I am new at this thing and need ur help, please !! My Galaxy Nexus is from France (SFR mobile operator). My phone is running Android 4.0.1 but it fails when updating to 4.0.2. And more, doesn’t accept others sim cards except the original french sim card.
    Will this operation solve my problem ? What should I do ? Thx a lot !

  • Aidan Follestad

    Thanks, this was very useful while preparing for the Jellybean 4.1 update

  • Todd Swanson

    Why does it say ”
    fastboot -w” is not an external/internal command, and wont do anything. All other commands were working just fine.

  • Blueman88

    I did the method above twice successfully but now have lost the ability to use WiFi. Any suggestions? The network names all have worked before. Thanks for any help that you can give 

  • After doing fastboot -w update image-mysid-icl53f.zip, my phone rebooted and brought me to the original welcome screen.I never got a chance to enter in the last two steps. When I tried to restart it again, the phone just keeps bootlooping at the google logo. I tried the Recovery Mode, but it did not help. Can someone help?

    • nm.. i used ODIN to push new image. It works fine now

  • goph_chuck

    I dont completely understand the second step…Is there anyway someone could elaborate for me?

    • android

      Unzip the .tar file you downloaded, then rename that resulting file to .zip and unzip it.

  • Christopher Riner

    thank god.  saved my skin twice now.  Thanks, kellex, for bringing me back from bootloop hell after none of my nandroids worked.

  • Newb here and I want to uninstall a ROM but can not seem to do it. PLEASE  HELP!

  • Mholton12

    ok all im getting is waiting for device when i do the fastboot flash bootloader bootloader-toro-primekk15.img and i really need help

    • Jerome

      Your phone isn’t seen by your computer correctly. Check u have USB debugging enabled. In linux, you might need to run using sudo

  • Darkmagshin

    you REALLY should mention that this wipes the data partition of your device. i lost a lot of important pictures thinking this was like flashing any other rom.

  • This makes the phone stock again. If you just left it rooted though, they can very easily tell if they look for it.

  • james craig

    The speaker is much lower than the Epic Touch Galaxy 2, Droid original, Rezound abd Razr.

  • Rydell_hall

    This guide kinda sucks. What state does my phone have to be in after plugging in? Off? On? Debugging mode? What has to be open and running? SDK? ADB? What’s required to be installed with SDK for it to work?

    None of these questions are answered and makes it impossible to make sense of the guide. I was able to get SDK and ADB installed, I downloaded what I think are the drivers for it (so my computer can detect it while in debugging mode), still not being detected in my computer. However, it does make a ding when plugged in for debugging, which leads me to believe it’s being detected to some extent.

    But regardless, I attempted those commands in the tools folder after downloading said file, I then get “error: device no found” obviously. I tried all combinations of what’s not exactly specified here, and I’ve wasted about an hour on it. So as far as this is concerned, the guide falls way short. 

    You write this like we don’t understand simple directions, yet there are tons of missing steps.

  • Raptor2679

    Hi, been looking for the answer on google and android forums but can’t seem to find the answer. what is temporary vs permanent recovery? is one suggested over the other?

  • nickname

    I wasdownloading the factory image and when i tried to open it…..it said that
    windows cannot open this file…and i should choose which progrmam i want to
    open it with…but no program seems to open it properly…..(download it as one
    file only). Also noticed that on the end of the file name that you show on the video in red…it says ZIP….and when i try to download..at the end of the file it says TAR  thought maybe you can help me out??? thank…nice and simple video

    • Anonymous

      .tar is another compression type seen in unix/linux environments. You can use a program like winrar to unpack .tar, .tgz, .zip files in a windows environment.

  • I can’t load the Nova launcher because I can’t get into recovery. I really don’t want to go all the way back to locked bootloader because I don’t really want to wipe all my data again… Thanks for any help.

  • I have unlocked/rooted the new phone and the wi-fi mac address has not changed this time. Must have been something about that particular phone.

    • Anonymous

      I had the same experience. My first Nexus kept changing the MAC address on each reboot. I swapped it for a new phone that has not had that problem.

  • Anonymous

    Just got my Nexus yesterday. Followed the unlock/root steps without any issues and then discovered that every time I reboot the phone it comes online with a different Wi-Fi MAC address. Has anyone else seen this on their phones? I ended up swapping it at the Verizon store for a new one but now I’m a little nervous about unlocking/rooting again. Curious about others experiences. Thanks.

    • Anonymous

      I have unlocked/rooted the new phone and the wi-fi mac address has not changed this time. Must have been something about that particular phone. I did call both Verizon and Samsung and both are aware of the issue, though neither would comment on root cause or when/if a fix would be available.

  • Anonymous

    Just FYI, I’ve done this twice now and after flashing the stock image YOU WILL go into bootloop.

    Unplug the phone, battery pull and go into reboot into fastboot mode, select recovery, then you will get the error ! image. Again, just tap both volume up/down, and power at same time. Tap and release, it may take a couple tries. Then select wipe data / factory reset. 

    That should take 5 minutes or more. Then you will boot into fresh stock state with a clean slate. This is something that was totally missed in the instructions above.

    But remember, you still have to fastboot oem lock if you want the bootloader relocked. So battery pull and reboot into fastboot mode, plug back in, enter to fastboot oem lock command. 

    NOW your phone is stock and ready for new business, warranty return, etc.

    • Guest

      I have been at my wits end with the bootlooping.  I thought something terrible happened to the phone, or that I installed a bad image.  I’ve been dealing with this for 4 hours now.  I finally read this post, and my fingers are crossed that this solves the problem.  I really just want this phone to work again. 

    • From what I understand, if you do a clean install like this, the device reboot twice and reboots do take a longer while than normal. It took me about 4 minutes before I reach to my lockscreen. If it’s around or under 4, it’s all good. If it’s taking above 7 minutes, now that could be bootloop.

  • Hey guys after this:

    fastboot -w update image-mysid-icl53f.zip

    My phone rebooted on it’s own. Is this bad?

    • Anonymous

      Mine did the same thing. I shut the phone off and booted into the boot loader using the volume up/down + power press. Once there I issued the ‘fastboot oem lock’ and it locked just fine. Hope this helps.

  • Italia1918

    after i unzipped the factory images… i get these files …bootloader / flash / radio and there is another folder that is”image-mysid-icl53f” with 5 image files inside of it  do i have to pull those files out also?

  • Mike Woods

    I can adb reboot bootloader and get to the bootloader but when I try the next command. fastboot flash bootloader bootloader-toro-primekk15.img I get an error. Fastboot devices shows the GNex connected but I can’t flash the stock images. Any clues?

  • Cefx359

    I keep getting device not found after attaching usb cable and typing first line…I have updated the usb driver…any ideas?

  • Jared Kirk

    What if you just want to unroot but not re-lock?  For example if you want to receive an official OTA update (which requires you to be unrooted, correct?) 

    • Anonymous

      To receive the official OTA, you don’t have to be unrooted. As long as you didn’t modify anything else (custom kernal, ROM, possibly some other modifications) than you should be fine.

  • Eric

    Also, I’m not rooted, only unlocked. Is there a shorter version to just relock or do I just do all of the above even though I’m not rooted??  Thanks.

    • Anonymous

      This is for the verizon version. No you do not need all the steps above. You do need adb reboot bootloader, next fastboot oem lock and then press the power button to restart the phone

  • Eric

    Is the link above for the Verizon version of the system image?  Kind of important, might want to label which version!  I need to relock my bootloader and exchange my phone.

  • RJFrank

    How far should I go in these directions to just unroot but not lock the bootloader. I rooted with an img file before I saw the img file here and now I keep getting the droid with a triangle with ! in the middle when I try to boot into recover. I can’t load the Nova launcher because I can’t get into recovery. I really don’t want to go all the way back to locked bootloader because I don’t really want to wipe all my data again… Thanks for any help.

  • Anonymous

    I am not seeing a zip file when I download this. It is only showing up as a tar file and I cannot extract the files. Anyone have any ideas as to what I am doing wrong?

    • Mikewoods94

      use 7zip to extract that then extract the archive inside of that one.