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:
- Android SDK tools
- Latest Factory Image
- Latest TWRP Image
- Latest SuperSU Image (Systemless 2.61 or higher)
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 flash radio radio-angler-angler-xx.xx.img
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-188.8.131.52-angler.img
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
One of the cleanest guides to flashing/updating out there. Keep it up, friend.
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
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.
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”
“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.
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”?.
After flashing recovery to Nexus 6P, can’t boot to recovery, there’s android icon with an exclamation mark. What should I do?
Can I do this with lollipop or should i first update to 6.0?
Definitively update to 6.0 first. I would even advice for a hard reset after the update to the latest version.
“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?
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.
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.
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
awesome guide, i remember doing this last time for 6.0 but good to have as a refresher
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.
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.
thank you for the easy to follow guide
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