How to update a rooted Nexus device

Google has finally started to provide their users with monthly security updates.

This is good news for everyone, but more work for those of us who have rooted phones, as the OTA updates check if the system was modified before installing, and refuse to install if it was.

For rooted users, the solution, although a little bit extensive, is quite easy – flashing all the system files, and re-rooting the device.

The following is needed before starting:

Notice: The following procedure will keep all user data (some system settings are reset), but as with all system upgrades, a backup is advisable. Any and all damage you might  do to your device and your data is your full responsibility. I’m assuming anyone attempting this will already have experience using fastboot and adb.

Before starting make sure that USB debugging is enabled and that the computer you are going to use is authorised.

After extracting the factory image and booting into Fastboot Mode (usually Volume Down + Power), the following steps should be executed:

fastboot flash bootloader bootloader-angler-angler-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio radio-angler-angler-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot erase cache
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img

The system should now be able to boot, but it will be un-rooted.

To root it, the following should be executed after entering Fastboot Mode.

fastboot flash recovery twrp-2.8.7.2-angler.img
fastboot reboot-bootloader

After this, enter Recovery Mode (through the Fastboot Mode menu) and flash the SuperSU zip file (if needed, adb push can be used to upload the file). After rebooting the phone should be rooted and running the latest version of Android.

This was successfully tested on 2015.12.08, upgrading from Android 6.0.0 to 6.0.1 on the following devices :

  • Nexus 6p
  • Nexus 6
  • Nexus 5

20 Comments

  1. One of the cleanest guides to flashing/updating out there. Keep it up, friend.

  2. You said we required Android SDK tools, but no where in this page you mention the use of it.
    Little confused… I am on 6.0.0 stock rooted … elementalx… Xposed framework. Can this be done from phone only. If yes then what the use of Android SDK tools

    • E. Balsa

      2015/12/10 at 09:53

      The SDK Tools are required because all of those commands need to be run from an attached computer. The Fastboot command is part of the Android SDK Tools.
      Please do not attempt to update your phone this way if you are not familiar with these commands.

      • There is no vendor.img in the extracted folder.

        • E. Balsa

          2015/12/10 at 11:54

          Just extract the zip file that is inside the zip file. As I said before, this procedure assumes you are familiar with dealing with this kind of tools.

          • Sir, I have rooted my phone on 6.0.0 nexus 5 from PC using fastboot. Just now I extracted the .tgz file then extracted the zip file in it that is “image-hammerhead-mmb29k.zip ” but sir, there is no file with the name “vendor.img”

          • Ray Van Cleave

            2015/12/22 at 05:05

            “this procedure assumes you are familiar with dealing with this kind of tools”
            THAT is an understatement!
            This guide may be excellent but it presumes a BOATLOAD!
            For example the command “fastboot flash bootloader bootloader-angler-angler-xx.xx.img”
            If you didn’t know that “angler” was a hardware specific image and you tried this command “as written” on a Nexus 6 you would be SOL and not have any idea why.
            That is just one out of dozens or scores of pitfalls that a novice could get tripped up on.
            As I say there are more assumptions in this turtorial than there are command lines.
            Nothing at all wrong with that….but you really should make that clear.

          • E. Balsa

            2015/12/22 at 09:05

            Why would someone getting stuck at a filename even want to root their nexus devices? Article clearly states “I’m assuming anyone attempting this will already have experience using fastboot and adb.”. Should I also add “I assume you know what filenames are”?.

  3. After flashing recovery to Nexus 6P, can’t boot to recovery, there’s android icon with an exclamation mark. What should I do?

  4. Can I do this with lollipop or should i first update to 6.0?

    • E. Balsa

      2015/12/20 at 18:40

      Definitively update to 6.0 first. I would even advice for a hard reset after the update to the latest version.

  5. “fastboot flash recovery recovery.img”

    Why are you flashing stock recovery then re-flashing TWRP? Can’t you just flash everything except for Recovery and Userdata, reboot into TWRP flash SuperSU and save yourself some time?

    • E. Balsa

      2015/12/20 at 18:39

      I was actually stuck on a boot loop when I did that. That’s also why I’m booting to Android un-rooted, to allow the system to follow the update process before any other modification. This might not be needed in most situations, but it solved the boot loop for me.

  6. It should be noted that if you are using older “system” root (SuperSU 2.5.2) you need a modified boot.img or you will get stuck at the loading screen. Otherwise using the newer “system-less” root (SuperSU 2.6.1) should work with the stock boot.img.

  7. Just tried this and ended up in getting a Red Alert Device Corrupt page then stuck in boot loop. Restore via recovery and tried again without vendor. No issues. Nexus 5X

  8. awesome guide, i remember doing this last time for 6.0 but good to have as a refresher

  9. Clear guide. Cheers.

    I found I didn’t have a ‘vendor.img’ in the March 2016 update, but I ignored it and it worked anyway.

  10. Awesome instructions…on my Linux box I unzipped everything to a my fastboot folder to make things easier…keep in mind that there is also a zip file inside the one you downloaded where some of the other images are located.

    I also had to run all the commands using sudo.

    Thank you for your time Ebalsa.

  11. thank you for the easy to follow guide

  12. I used this guide until I found FlashFire (written by Chainfire (the SuperSU developer)), which automates this and doesn’t need a computer! Works very well

Leave a Reply

© 2017 E. Balsa

Theme based on hemingway and unoUp ↑

%d bloggers like this: