5

I updated to 5.0.1 via OTA sometime ago, and it worked fine. Now I got a notification that 5.0.2 is ready but when Android shuts down to install update it returns error (with no other message. My Nexus 7 is rooted but has the stock recovery.

Is there an easy fix that doesn't require factory reset or installing recovery?

2
  • 1
    What is the error? Are you rooted? Do you have a custom recovery? Edit your question with as much information as possible and you'll be more likely to get a useful answer.
    – bmdixon
    Commented Jan 22, 2015 at 9:15
  • No error message, it only says error. No i don't have any recovery. Yes its rooted. I was hoping this is a known bug and that i could fix it without much hassle. Commented Jan 23, 2015 at 1:04

3 Answers 3

7

Since Android 5.0, any modifications to /system will cause OTA updates to fail. Android Police noted that:

... the OTA script no longer patches individual files. Instead, it patches the system block directly and treats it as one enormous blob.

Therefore you have 2 choices if you want to update your device.

  1. Remove any modifications to the system partition and remove any files that you may have added/renamed and restore any deleted files.
  2. Flash the factory image. For the 5.0.2 update you can probably flash just the system image although this may not be the case for later updates. To do this you can use the instructions in my answer here (although it is for a different Nexus device the procedure is the same, the file names may differ though). To just flash the system image you can just perform steps 1 and 6.
1
  • 2
    This is the answer I'm waiting for, especially for those who root their devices. Hopefully this can be a canonical post for "Lollipop OTA update fail on rooted device".
    – Andrew T.
    Commented Jan 23, 2015 at 9:18
4

As indicated here and by bmdixon, you have to flash the /system and /boot partition from you stock package, because these ones usually get modified when rooting your device. Afterwards the OTA update works fine (working for 5.1.1 from 5.1.0). As long as you only flash your system and boot partition, your data will be preserved.

I used the Nexus Root Toolkit to flash the System image (from inside the Advanced section of the Toolkit). Once the OTA Update has completed, you can root your device again without losing any data.

1

This is my approach to this known issue with rooted devices over 5.x (which I am get used to, since I am a rooted Nexus 4 owner)

  1. Backup (rule of thumb)
  2. download the suitable factory image for your device model and uncompress it
  3. enter in fastboot
  4. fastboot flash radio xxxxx
  5. reboot fastboot
  6. fastboot flash recovery xxxxx
  7. reboot fastboot
  8. fastboot flash boot xxxx
  9. reboot fastboot (I guess is not necessary to reboot between each step, but i prefer to)
  10. fastboot flash system xxxxx
  11. reboot and wait

I have followed this procedure not less than ten times and everything went smoothly. Then, you can root again and flash the recovery of your choice (or leave stock recovery, whatever)

Enjoy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .