root and ota updates - how to

danjac

Senior Member
Feb 4, 2012
193
121
73
as it is asked quite often, here's how you get ota with a modified stock rom.
For example, ota will fail if you have root (as it changes your boot partition slightly) or if you deleted some preinstalled apps (e.g. chrome browser). OTA script always checks the signatures of your running rom and the ota update. If they don't match, it will fail.
An unlocked bootloader does not prevent ota from working!!!

requirements: a backup of a 'clean' stock rom

So if you want to update perform the following steps (edit: you can find a second and easier method at the end of the post)


1. boot twrp
2. backup everything to be safe (boot, recovery, system, data) if something goes wrong
3. restore 'clean' stock boot partition and recovery partition
(4. if you changed something in 'system' restore system as well)
5. boot tablet
6. download and install ota - it should succeed
7. boot twrp and restore data again if needed
(8. root again with magisk)

good to know:
if you restore partitions, make sure they are from the same build! if not, tablet might not boot or ota will fail again.
if you are rooted, you can use the the backup of boot created by the magisk script (-->/data/stock_boot_<sha1>.img.gz)
if you don't have a backup, try to get hands on a stock rom and flash the required partitions manually (e.g. fastboot flash boot.img etc..)

good luck

(if anyone knows a better way, let me know and i will add it here)

edit: @MarkAllen provided this method which is far more simple (but which unfortunately has never worked for me by now).

1) Boot TWRP and install "Magisk Uninstaller"
2) Clear cache and Dalvik cache in TWRP then reboot
3) Uninstall phh's SuperUser and Magisk Manager
4) Start OTA update and follow instructions

This completed no problem for myself and then I just re-rooted again

5) Boot TWRP and installed Magisk 12
6) Clear cache and Dalvik cache then reboot
7) Install phh's SuperUser from the play store
8) Launch SuperUser and Magisk manager each one time (for some reason root checker claimed root was not installed properly until I did this)
9) Check root using root checker
 
Last edited:

MarkAllen

Senior Member
Apr 24, 2015
70
33
0
I was rooted from the last February security update. I was under the impression I would be able to allow the April security update to download then copy it on the root of my internal or sdcard storage then boot to normal recovery to install. I've done this with other devices I own (Shield Tablet and TV) and seemed to work fine for them. You would just re-root later when done. Anyway as you noted this didn't work on the Yoga Book though due to changes rooting makes on this device.

How I ended up doing this was a bit different then you describe, but meets the same end as your instructions I guess? All I had done was uninstalled root, ran OTA update (which worked this time), then rooted again and it worked great.

1) Boot TWRP and install "Magisk Uninstaller"
2) Clear cache and Dalvik cache in TWRP then reboot
3) Uninstall phh's SuperUser and Magisk Manager
4) Start OTA update and follow instructions

This completed no problem for myself and then I just re-rooted again

5) Boot TWRP and installed Magisk 12
6) Clear cache and Dalvik cache then reboot
7) Install phh's SuperUser and Magisk manager from the play store
8) Launch SuperUser and Magisk manager each one time (for some reason root checker claimed root was not installed properly until I did this)
9) Check root using root checker
 
Last edited:
  • Like
Reactions: danjac

danjac

Senior Member
Feb 4, 2012
193
121
73
I was rooted from the last February security update. I was under the impression I would be able to allow the April security update to download then copy it on the root of my internal or sdcard storage then boot to normal recovery to install. I've done this with other devices I own (Shield Tablet and TV) and seemed to work fine for them. You would just re-root later when done. Anyway as you noted this didn't work on the Yoga Book though due to changes rooting makes on this device.

How I ended up doing this was a bit different then you describe, but meets the same end as your instructions I guess? All I had done was uninstalled root, ran OTA update (which worked this time), then rooted again and it worked great.

1) Boot TWRP and install "Magisk Uninstaller"
2) Clear cache and Dalvik cache in TWRP then reboot
3) Uninstall phh's SuperUser and Magisk Manager
4) Start OTA update and follow instructions

This completed no problem for myself and then I just re-rooted again

5) Boot TWRP and installed Magisk 12
6) Clear cache and Dalvik cache then reboot
7) Install phh's SuperUser from the play store
8) Launch SuperUser and Magisk manager each one time (for some reason root checker claimed root was not installed properly until I did this)
9) Check root using root checker
great to hear...
using the uninstaller alone has never worked for me...it always aborts...sometimes it complains that some files are missing or were changed, the recovery partition doesn't match the expected one, etc...
mostly i can't remember which things i've done to the rom/system.

but again, good to know that magisk uninstaller works, it definitely is less complicated and time consuming.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone