Wednesday, November 9, 2016

How do I update an OTA while retaining TWRP and Magisk, only with my phone?


I have a OnePlus 6 that uses the A/B partition schema.


Previously with my OnePlus 5 with TWRP, I normally download the OTA package, reboot into TWRP to install it, and then TWRP img and Magisk ZIP afterwards. Then I have a fully updated system with TWRP and Magisk.


Now with A/B partition, the OTA gets installed immediately after downloading. I can only flash Magisk before rebooting, by manually extracting the boot image using command-line tools and Magisk's "Patch Boot Image" function, before flashing the patched boot image back. However, I see no option to install TWRP in this way (I'm currently not able to apply the ZIP using CLI tools). Any ideas?



Some good points for OnePlus over AOSP: OnePlus detects Magisk root and downloads full image instead of incremental OTA image, which saves the time for boot restoration, and also allows installing OTA even if /system is modified.


However, there's no "Disable Auto OTA Installation" in Developer Settings, so OTA installation may not be avoidable to some extents.



Answer



I just realized that I self-answered this question some time ago.


The answer is YES. After OTA, I use dd to pull out the new boot image, install TWRP in the way given above, and install Magisk over the TWRP-equipped boot image, and then dd it back. After rebooting, the after-OTA system has TWRP and Magisk ready.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...