diff --git a/docs/images/disable_auto_ota.png b/docs/images/disable_auto_ota.png index 4bee0e690..3cf1fd575 100644 Binary files a/docs/images/disable_auto_ota.png and b/docs/images/disable_auto_ota.png differ diff --git a/docs/images/install_inactive_slot.png b/docs/images/install_inactive_slot.png new file mode 100644 index 000000000..14566d643 Binary files /dev/null and b/docs/images/install_inactive_slot.png differ diff --git a/docs/images/install_second_slot.png b/docs/images/install_second_slot.png deleted file mode 100644 index fcc16d806..000000000 Binary files a/docs/images/install_second_slot.png and /dev/null differ diff --git a/docs/images/manager_reboot.png b/docs/images/manager_reboot.png new file mode 100644 index 000000000..342541c52 Binary files /dev/null and b/docs/images/manager_reboot.png differ diff --git a/docs/images/ota_done.png b/docs/images/ota_done.png new file mode 100644 index 000000000..ed948c13d Binary files /dev/null and b/docs/images/ota_done.png differ diff --git a/docs/images/ota_step2.png b/docs/images/ota_step2.png deleted file mode 100644 index 7f6aada43..000000000 Binary files a/docs/images/ota_step2.png and /dev/null differ diff --git a/docs/images/restore_img.png b/docs/images/restore_img.png index 6fafc30ba..d1c5b064e 100644 Binary files a/docs/images/restore_img.png and b/docs/images/restore_img.png differ diff --git a/docs/tips.md b/docs/tips.md index 13c0d0f99..b5b221635 100644 --- a/docs/tips.md +++ b/docs/tips.md @@ -3,45 +3,45 @@ ## OTA Installation Tips Magisk does modifications systemless-ly, which means applying official OTAs is much simpler. Here I provide a few tutorials for several different kind of devices to apply OTAs and preserve Magisk after the installation if possible. -**This tutorial is only for Magisk v14.1+** +**This tutorial is only for Magisk v17.0+** **NOTE: In order to apply OTAs, you HAVE to make sure you haven't modified `/system` (and `/vendor` if available) in any way. Even remounting the partition to rw will tamper block verification!!** #### Prerequisites 1. Please disable *Automatic system updates* in developer options, so it won't install OTAs without your acknowledgement. -1. When an OTA is available, please go to Magisk Manager → Uninstall → Restore Images. **Do not reboot immediately or you will have Magisk uninstalled.** This will restore your boot (or dtbo if available) back to 100% untouched stock images in order to pass verifications. **This step is required before doing any of the following steps written below!** +1. When an OTA is available, first go to (Magisk Manager → Uninstall → Restore Images). **Do not reboot or you will have Magisk uninstalled.** This will restore your boot (and dtbo if applicable) back to 100% untouched stock images in order to pass pre-OTA block verifications. **This step is required before doing any of the following steps written below!** #### Devices with A/B Partitions -(Includes Pixel family) -Due to the fact that these devices have two separate partitions, and the OTA installation happens live while the system is still running, these devices have the best support: the out-of-the-box OTA installation works seamlessly and Magisk will be preserved after the installation. +Due to the fact that these devices have two separate partitions, it is possible to have the OTA installed to the inactive slot and have Magisk Manager to install Magisk onto the updated partition. The out-of-the-box OTA installation works seamlessly and Magisk can be preserved after the installation. -1. After restoring stock boot image, apply OTAs as you normally would (Settings → System → System Updates). -1. Once the installation has passed step 1 and is starting step 2, go to Magisk Manager → Install → Install to Second Slot. This will install Magisk into the second boot image slot, which is the updated slot. - -1. Let the OTA finish its job. After a reboot, the bootloader will switch to the updated system. Magisk should still be installed since we already patched the new boot image. +1. After restoring stock boot image, apply OTAs as you normally would (Settings → System → System Update). +1. Wait for the installation to be fully done (both step 1 and step 2 of the OTA), **do not press the restart button!!** Instead, go to (Magisk Manager → Install → Install to Inactive Slot) and install Magisk to the slot that the OTA engine just updated. + +1. After installation is done, press the reboot button in Magisk Manager. Under-the-hood Magisk Manager forces your device to switch to the updated slot, bypassing any possible post-OTA verifications. + +1. After the reboot, your device should be fully updated, and most importantly, Magisk is still installed to the updated system! #### Devices with FlashFire Support -(Includes Pixel family, Nexus family, Samsung devices) (If you are using a device with A/B partitions, I **strongly** recommend you to use the method stated above since it uses the stock OTA installation mechanism and will always work under any circumstances) -The [FlashFire](https://play.google.com/store/apps/details?id=eu.chainfire.flash) app developed by Chainfire is a great app to apply OTAs and preserve root at the same time. However, whether it supports your device/system combination depends on the application itself, and support may change in the future. If you face any issues, please directly [report to Chainfire](https://forum.xda-developers.com/general/paid-software/flashfire-t3075433). +The [FlashFire](https://play.google.com/store/apps/details?id=eu.chainfire.flash) app developed by Chainfire is a great app to apply OTAs and preserve root at the same time. However, there is a very high chance that it does not support your device/system combination, and unfortunately the app is no longer maintained by Chainfire so no additonal compatibility would be added in the future. 1. After restoring the stock boot image, download the OTA (Settings → System → System Updates), **do not press reboot to install.** 1. Open FlashFire, it should detect your OTA zip. Select OK in the popup dialog to let it do its setup. -1. Please use the options shown in the screenshot below. The key point is to disable EverRoot (or it will install SuperSU), and add a new action to flash Magisk zip **after** the OTA update.zip (the update.zip is auto generated in the previous step). +1. Please use the options shown in the screenshot below. The key point is to disable EverRoot (or it will install SuperSU), and add a new action to flash Magisk zip **after** the OTA update.zip (the update.zip should be auto generated in the previous step). -1. Press the big **Flash** button, after a few minutes it should reboot updated with Magisk installed. +1. Press the big **Flash** button, after a few minutes it should reboot and updated with Magisk installed. -#### Other Devices - General Case -Unfortunately, there are no real good ways to apply OTAs on all devices. Also, the tutorial provided below will not preserve Magisk - you will have to manually re-root your device after the upgrade, and this will require PC access. Here I share my personal experience with HTC U11. +#### Legacy "Non A/B" Devices - General Case +Unfortunately, there are no real good ways to apply OTAs on these devices. The following tutorial will not preserve Magisk - you will have to manually re-root your device after the upgrade, and this will require PC access. This is a general "best practice". -1. To properly install OTAs, you should have your stock recovery installed on your device. If you have custom recovery installed, you can restore it from your previous backup, or dumps found online, or factory images provided by OEMs. +1. To properly install OTAs, you must have your stock recovery installed on your device. If you have custom recovery installed, you can restore it from your previous backup, or dumps found online, or factory images provided by OEMs. If you decide to start by installing Magisk without touching your recovery partition, you have a few choices, either way you will end up with a Magisk rooted device, but recovery remains stock untouched: - If supported, use `fastboot boot ` to boot the custom recovery and install Magisk. - - If you have a copy of your stock boot image dump, install Magisk by patching boot image via Magisk Manager, and manually flash it through download mode / fastboot mode / Odin + - If you have a copy of your stock boot image dump, install Magisk by patching boot image via Magisk Manager, and manually flash it through download mode / fastboot mode / Odin. 1. Once your device has stock recovery and stock boot image restored, download the OTA. Optionally, once you have downloaded the OTA update zip, you can find a way to copy the zip out, since you are still rooted. Personally, I extract the stock boot image and recovery image from the OTA zip for future usage (to patch via Magisk Manager or restore stock recovery etc.) 1. Apply and reboot your device. This will use the official stock OTA installation mechanism of your device to upgrade your system. 1. Once it's done you will be left with an upgraded, 100% stock, un-rooted device. You will have to manually flash Magisk back. Consider using the methods stated in step 1. to flash Magisk without touching the recovery partition if you want to receive stock OTAs frequently.