How to Unroot Nexus 5 with Stock Firmware!

Download this video for viewing in HD on your smartphone or computer.
Click Here to Download High-Quality HD video to your Smartphone or Computer.

If you ever need to unbrick your Nexus 5 or return your phone for warranty purposes, you can unroot your Nexus 5 completely back to stock with stock firmware.

Now, if you did make a backup ROM of your stock ROM, you don’t have to do this, you can simply restore your stock ROM then lock the bootloader.  But in case you did not make a backup of your stock ROM, here’s how to unroot your Nexus 5 with stock firmware.  You can use Windows, Mac, or Linux to do this.

*WARNING – This unroot method delete EVERYTHING on your Nexus 5, please MAKE A BACKUP of EVERYTHING on your Nexus 5 before starting!  YOU’VE BEEN WARNED!

Step 1. Turn off your Nexus 5 then hold down Volume Down and Power buttons together for about 2 seconds until you see bootloader menu.  If you are in a bootloop, you can also hold the buttons down for about 15 seconds until your Nexus 5 reboots into bootloader menu.

howto-unroot-nexus5-1

Connect a micro-USB cable from your Nexus 5 to your computer.

howto-unroot-nexus5-2

Step 2. Download the latest stock firmware for your Nexus 5 and unzip the file.  If you do not have an unzipping software you can use 7zip or Alzip.

Download Nexus 5 stock firmware

howto-unroot-nexus5-3

howto-unroot-nexus5-4

Step 3. Download fastboot.zip, unzip the files and copy everything to your stock firmware folder you unzipped in Step 2.

howto-unroot-nexus5-5

Step 4. Open a command prompt for Windows and Terminal Emulator for Mac/Linux.  If you don’t know how to do this, please Google it.

Next type:

cd Downloads

cd hammerhead-krt16m-factory-bd9c39de

cd hammerhead-krt16m

Replace above hammerhead-krt16m-factory-bd9c39de
and hammerhead-krt16m with appropriate directory name for the firmware you downloaded.

Then type:

For Windows:

fastboot devices

For Mac:
chmod 755 *
./fastboot-mac devices

For Linux:
chmod 755 *
./fastboot-linux devices

You should see a bunch of random numbers.  If you do see it, you can go ahead.  If you don’t see it for Windows, you may need to install drivers. Follow Step 6 in our Nexus 5 Root tutorial if you don’t know how to install drivers.
howto-unroot-nexus5-6

Step 5. Next, we are going to flash the stock bootloader as it may be required on newer firmwares so type:

For Windows:

fastboot flash bootloader bootloader-hammerhead-HHZ11d.img

For Mac:

./fastboot-mac flash bootloader bootloader-hammerhead-HHZ11d.img

For Linux:

./fastboot-linux flash bootloader bootloader-hammerhead-HHZ11d.img

*Replace bootloader-hammerhead-HHZ11d.img with the file ending in .img in your stock firmware directory!!!

howto-unroot-nexus5-7

Step 6. Next, we are going to flash the actual stock firmware so type:

For Windows:
fastboot reboot-bootloader
fastboot -w update image-hammerhead-krt16m.zip

For Mac:
./fastboot-mac reboot-bootloader
./fastboot-mac -w update image-hammerhead-krt16m.zip

For Linux:
./fastboot-linux reboot-bootloader
./fastboot-linux -w update image-hammerhead-krt16m.zip

*Replace image-hammerhead-krt16m.zip with the file starting with “image” and ending in “zip” in your stock firmware folder.

*On some firmwares, you may have to flash the radio (if the firmware comes with it):

fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.08.img

*Replace radio-hammerhead-m8974a-2.0.50.2.08.img with the radio image file.

howto-unroot-nexus5-8

howto-unroot-nexus5-9

Step 7, When that is done successfully, your Nexus 5 will reboot.  You should see a welcome sign and if you see this, congratulations!  You’ve successfully unrooted your Nexus 5 with stock firmware.

If you are returning your Nexus 5 for warranty or your phone is in bootloop, continue to Step 8 otherwise you can stop here if you want.

howto-unroot-nexus5-10

Step 8. Repeat Step 1 to enter bootloader menu then select “Recovery mode” and enter stock recovery.

howto-unroot-nexus5-11

howto-unroot-nexus5-12

Step 9. Hit the Volume keys to see the stock recovery menu then select “Wipe data/factory reset” and reset your Nexus 5.  This will completely reset your Nexus 5 to fix bootloops and also clean it completely.

howto-unroot-nexus5-13

Step 10. Reboot into bootloader menu by repeating Step 1 then connect a micro-USB cable from your Nexus 5 to your computer.

howto-unroot-nexus5-14

howto-unroot-nexus5-15

Step 11. Let’s lock the bootloader now for the final step.

Go back to your command prompt/terminal and type:

For Windows:

fastboot oem lock

For Mac:

./fastboot-mac oem lock

For Linux:

./fastboot-linux oem lock

howto-unroot-nexus5-16

Step 12. Once bootloader is locked, simply reboot your Nexus 5 and your Nexus 5 should be completely unrooted just the day you got the phone.  Congrats!

howto-unroot-nexus5-17

Extras

This is optional and I left out the step for flashing radio but the command for flashing radio is simple:

For Windows:

fastboot flash radio radio-hammerhead-M8974A-1.0.25.0.17.img

For Mac:

./fastboot-mac flash radio radio-hammerhead-M8974A-1.0.25.0.17.img

For Linux:

./fastboot-linux flash radio radio-hammerhead-M8974A-1.0.25.0.17.img

FAQ

Q: I am in a bootloop no matter what!!!
A: You can usually get out by locking and unlocking your bootloader, try:

fastboot oem unlock
then
fastboot oem lock

Need Help? Follow/add me on Google+, Facebook, or Twitter!
GooglePlus
Facebook
Twitter
Want to stay updated on latest Nexus 5 Root news?
Sign up for our Nexus 5 Root Newsletter here so you get ROM of the week and more!
Nexus 5 Reference
You will need a rooted Nexus 5 to install all ROM/kernels.
NOTE: THE AUTHOR OF THIS SITE IS NOT RESPONSIBLE IF YOU MESS UP YOUR PHONE, PLEASE READ INSTRUCTIONS TWICE BEFORE TRYING IF THIS IS YOUR FIRST TIME TO ROOTING AND CUSTOM ROMS!

First time to rooting and custom ROMs?

Please see our Nexus 5 Root FAQ FIRST!!!

10 thoughts on “How to Unroot Nexus 5 with Stock Firmware!

  1. Surviven6802

    I need help please!! I own a Nexus 5 32g for sprint I used CM installer to unlock the boot loader and root my phone which was fantastic! Just out the blue my phone rebooted and I lost ROOT and my phone factory reset itself and nothing works,cm gapps and my clockwork recovery image v6.0.4.5 is broken and reads (can’t mount /cache/recovery/command). I cant wipe, restore,flash nothing ! omg..
    I used every Nexus 5 unrooting method, manual unroot, and auto unroot I could find on xda nothing works keeps booting back in CM rom instead of oem version.Its like the phones drivers are crossed where mount and camera storage is crossed and the internal storage isn’t recognizing sorry I dont know how to explain. I would Donate if some one can help me unbrick my phone. thank you

    Reply
  2. Christian Adams

    Got a question. If my phone is rooted and bootloader is unlocked, but I’m not running a custom ROM, can I do a Factory data reset from the Backup & reset settings on my Nexus 5?

    Reply
  3. Puneet

    my nexus 5 is rooted and its bootloader is unlocked…but i am running on.my stock rom..no custom rom is installed..so from where should i follow ur procedure…?

    Reply
  4. Pingback: How to Install Android 5.0 L Preview on Nexus 5! | RootNexus5.com

  5. Steven

    I just want to say Max I find your methods so easy and great compared to the other ways out there! Keep up the GREAT work! You are my NUMBER ONE android source! Stay high on android my friend!

    Reply
  6. rohan

    hey bro every thing is fine bt in step 6 it says baseband version verification failed help me out bro
    in my nexux when i open supersu it says as u upgraded to 4.3 u need to re root ur device bt i have to un root it now what should i do

    Reply
  7. rohan

    it says device version-baseband is ‘m9615a-cefwmazm-2.0.1701.04′.
    update requires ‘m9615a-cefwmazm-2.0.1701.03′.

    what should i doo plzzz help

    Reply
  8. kristina

    so I downloaded the ROM toolkit went into lcd density and I changed it to a smaller setting which I hate so I went back on and tried to change the density once more and it wont let me, I went over to prefernces and clicked reboot but nothing happened and my provider isn’t showing up nor is my service! HELP!!

    Reply
  9. Brady

    I tried this method as I have to send my n5 back for repairs. Can’t get it to work on my pc as it won’t recognize the device after multiple attempts to uninstall drivers and reinstall, etc.

    I moved to my wife’s Macbook, and again am stuck. I can get to the dir no problem but get stuck there. None of the cmds after that go anywhere for me.

    chmod 755 *
    ./fastboot-mac devices

    nothing happens here, I get no devices no matter what I try.

    The crazy thing is I had no problem on my pc rooting this a while back with the same guide, now, no bueno. Any suggestions for the Mac.

    Thanks

    Reply
  10. 95Latisha

    Hi admin, i must say you have very interesting content here.
    Your website can go viral. You need initial traffic only.
    How to get it? Search for: Mertiso’s tips go viral

    Reply

Leave a Reply to Christian Adams Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>