Having root access on your Android device clearly has its perks. When it comes to updating to a newer Android version, things start to get annoying really fast. The usually convenient OTA (over the air) updates won’t work and throw an error because of the modified system partition on your rooted device.
The only way is to do the update manually. With all the custom ROMs out there, there’s no universal step-by-step process that covers every ROM. If you’re running a custom ROM, the best way would be to check the developers’ community for an up-to-date guide. In this guide, we will focus on updating a stock ROM using a factory image.
Update to a new version of the stock ROM without wiping your data or losing root
Before following the steps below, be aware that the bootloader of your Nexus needs to be unlocked and you need to have a working installation of ADB and Fastboot. Also, make sure that USB debugging is enabled in the developer settings.
- Download the latest stable version of SuperSU. Best way is to search the XDA forum for a download link. Once downloaded, transfer the ZIP file to your Android device.
- Download the latest build of factory images for your model (example: Nexus 6P = Angler, 5X = bullhead).
- Unzip the downloaded file and put the extracted folder into a save place (like your desktop).
- Inside that folder, locate the following files:
- Copy both files and paste them into the ‘platform-tools’ folder in which ADB and Fastboot are located. Normally ‘platform-tools’ can be found here:
- Windows: \Users\<user>\sdk
- Mac: /Users/<user>/Library/Android/sdk/
- Inside the extracted folder, look for a ZIP file with the following name and extract it:
- image-angler-xxxxxx ( end varies depending on the build)
- In this new folder, copy all .img files and paste them into the ‘platform-tools’ folder. Those files should be the following:
- Connect your Android device to your computer and fire up a command line window from within your ‘platform-tools’ folder.
- Run the following command to reboot your device into the bootloader:
- adb reboot-bootloader
OS X users need to start all commands with a dot and forward slash ‘./’
- adb reboot-bootloader
- Now, enter and run the following series of commands (Mac users always need to start with ./):
fastboot flash bootloader bootloader-angler-angler-02.45.img fastboot reboot-bootloader fastboot flash radio radio-angler-angler-02.50.img fastboot reboot-bootloader fastboot flash boot boot.img fastboot flash cache cache.img fastboot flash system system.img fastboot flash vendor vendor.img
- Don’t flash the recovery and userdata image files. This would get rid of your custom recovery and all your user data.
- Now, you should be inside the bootloader menu. Using the volume and power button on your device, enter recovery mode. This should launch your custom recovery (probably TWRP). If TWRP asks, allow it to modify the system partition.
- Using TWRP, install the SuperSU ZIP file and wipe cache/dalvik. Last thing to do is restart your device. In case TWRP asks you to install SuperSU, just say no.
- While booting up, your system will upgrade your apps and start up normally once that’s done.
That’s it! The Android update was a success and you’re device is still rooted. If you run into any issues or have questions, let us know in the comment section.