Updating an unlocked, encrypted Nexus to Android 4.4.3 without wiping

I currently use a Nexus 5 with Android native encryption enabled. I use the following process to update my phone to the latest versions of Android (using a Windows machine) without having to ever decrypt or wipe my data. Note: this requires an unlocked bootloader.

  1. On your phone, download the latest SuperSU zip and put it in the root of your phone SD card.
  2. Turn off your phone.
  3. On your machine, ensure you have the Android SDK installed, with the following packages up-to-date:
    1. Google USB driver.
    2. Android platform-tools.
  4. Boot your phone into fastboot mode (hold Vol Up + Vol Down + Power when the phone is completely powered off).
  5. Remember to look for a device called “Android” with a yellow exclamation mark in Windows Device Manager. Right-click, select “Update Driver Software”, following the wizard and point Windows to the USB driver folder. (E.G. “C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver”)
  6. Either add the platform-tools to your PATH variable, or navigate to it manually in a command prompt.
  7. Verify Windows can see your phone using fastboot devices.
  8. Download the factory image from Google.
  9. Extract the factory image into a folder, so you have the following files:
    1. image-hammerhead-ktu84m.zip
    2. bootloader-hammerhead-hhz11k.img
    3. radio-hammerhead-m8974a-2.0.50.1.13.img
  10. Extract the image-hammerhead-ktu84m.zip file again, so you also have the following files:
    1. boot.img
    2. cache.img
    3. system.img
  11. Download the TWRP recovery image (e.g. openrecovery-twrp-2.7.0.0-hammerhead.img)
  12. Run the following fastboot commands sequentially:
    1. fastboot flash bootloader bootloader-hammerhead-hhz11k.img
    2. fastboot reboot-bootloader
    3. fastboot flash radio radio-hammerhead-m8974a-2.0.50.1.13.img
    4. fastboot reboot-bootloader
    5. fastboot flash boot boot.img
    6. fastboot flash cache cache.img
    7. fastboot flash system system.img
    8. fastboot flash recovery openrecovery-twrp-2.7.0.0-hammerhead.img
    9. fastboot reboot-bootloader
  13. You should be all done now, note that you didn’t flash userdata.img, meaning nothing was erased (in terms of user data). Any mods that affect /system/ will need to be re-installed (i.e. SuperSU, Adblock via hosts, XPosed etc.)
  14. You can now boot into recovery with TWRP and flash the SuperSU zip you placed there at the beginning. If you have an encrypted volume, it will ask you for a password to mount it first. I also tend to allow it to wipe dalvik and cache before rebooting.
  15. Your phone will boot up-to-date with all data present, encryption still enabled, and rooted. You can then re-apply things like Adblock, BusyBox, XPosed etc.

Leave a Reply

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