How to Install OTA Updates on Rooted Android Devices using Magisk [Without Losing Root]

How to Install OTA Updates on Rooted Android Devices using Magisk

An OTA update has arrived, but you cannot install it because your Android device is rooted? Well, that’s a known downside of rooting Android. In this guide, you will learn how to install OTA updates on rooted Android devices using Magisk. By using the method provided in this guide, you will also be able to retain root and TWRP after installing the OTA update. Before we get any further, let us take a quick look at what OTA updates are and how they work.


Table of Contents

What is an OTA Update?

An OTA Update a.k.a an Over-the-Air Update is a wireless method of receiving and installing updates to an Android device’s software.

It is remotely pushed by the device manufacturer (Also known as the ‘OEM’) and is the easiest and most effective way to update an Android device’s software to the latest available version. Once an OTA update arrives, it is either automatically installed or prompts the user to manually download and install it.

So, how does one install an OTA update on a rooted Android device? You will know more about it in the next section. Read ahead.

Why You Can’t Install OTA Updates on Rooted Android Devices Automatically?

Rooting an Android device is great, it gives the user tremendous control over the device’s software and allows making any sort of modifications to it. However, it comes with its own drawbacks. The biggest one is losing the ability to take automatic OTA (over-the-air) updates. And users (Generally who are new to the scene) often tend to overlook this factor when they root their Android device.

Why you can't install OTA updates on rooted Android devices

In Android 5.0 and above, Google introduced the concept of block-based OTAs. This new mechanism does certain pre-OTA block checks to verify the integrity of the device’s software. In layman terms, once the installation begins, the device partitions (like system, boot, vendor, dtbo, etc) are checked for modifications like Root, TWRP, etc. And if detected, the OTA update will fail to install.

Magisk Root, A/B Partitions, and OTA Updates

But thanks to Magisk, you can easily install OTA updates on rooted Android devices without losing root. For those who don’t know, Magisk is a Universal Systemless Interface that allows you to make modifications to your Android device’s software systemless-ly, that is, without altering the /system partition.

Not just that, it has also developed to be the most prominent modern-day rooting solution for Android using MagiskSU. Want to know more about how it came into existence? Then there’s no better way but to hear out the story directly from its creatortopjohnwu.

The developer devised two different methods to install Magisk and root Android devices:

  1. The first method follows the traditional process of installing a custom recovery (TWRP, OrangeFox, etc) and then using it to flash the Magisk installer zip (root package). But since you will install a custom recovery during this method, it makes it even harder to take OTA updates. So, to regain the ability to take automatic OTA updates or install them manually, you would require to first uninstall/remove root and other modifications applied to the software. And further, restore the stock Android recovery on your device.
  2. The second method was introduced when Google first released the Google Pixel devices in 2016. These devices came with dual A/B partition system to support seamless updates and removed the recovery partition from the devices completely. So, the first method failed rigorously. This new method involves patching the stock boot image using Magisk and then flashing the patched boot image via Fastboot.

The best part about rooting your Android device with Magisk is that it gives you the ability to install OTA updates easily. So, follow the instructions below on how to do it.

Note: If you’re upgrading from Android 10 to Android 11, make sure that you update to Magisk 21.0 or the latest Magisk Canary release. v20.4 and lower do not support Android 11.

How to Install OTA Updates on Rooted Android Devices?

Now, since most new OEM Android devices come with the A/B partition scheme, OTA updates are seamlessly installed to the inactive slot. When you root using Magisk, it is only installed to the currently active slot of your Android device. And thus, the inactive slot/partitions stay untouched.

When an OTA arrives, you can simply restore the stock boot image from within Magisk Manager, then install the OTA update to the inactive slot. And finally, right before you reboot your phone, you can install Magisk to the inactive slot to preserve root after the update.


Still, sounds a bit confusing? Don’t worry, the instructions below will take you through the complete process in detail. For your convenience, we have split the instructions into 5 different steps so that you can understand exactly what you’re doing.

Step 1: Disable Automatic System Updates in Settings

In Android 8.0 Oreo (and above), Google introduced a new automatic updates policy that downloads and installs OTA updates as soon as they are available.

Although this is great for an average Android user, but not for those who have rooted their devices. In order to update your rooted Android phone, you must first prevent the system from automatically installing updates without your acknowledgment.

Simply follow the steps below to disable Automatic System Updates in Android:

  1. Go to the Settings menu on your Android device.
  2. Navigate through the settings and select the About phone menu.
  3. Scroll down to the bottom and find the Build number section.
    • Note: In the case of some OEM devices, the Build Number section could be nested further in the Settings menu. For example, in Samsung Galaxy devices, you will need to go to Settings → About phone → Software information.
  4. Now, continuously tap on the ‘Build number’ section for five (5) times to enable ‘Developer options‘ on your device.
    Install OTA Updates on Rooted Android Devices - Enable Developer Options
  5. Once enabled, go to Settings → System → Developer options.
  6. Scroll down and turn off the Automatic system updates toggle.
    Install OTA Updates on Rooted Android Devices - Disable Automatic System Updates

Step 2: Restore Stock Boot Image When an OTA is Available

Now your Android device is rooted and an OTA update notification has arrived. When an OTA update is available, you will need to restore the stock boot image (and dtbo, if applicable) and uninstall Magisk from the current slot.

To do so, go to the app drawer and launch the ‘Magisk Manager‘ app. Then tap on the UNINSTALL button and select the RESTORE IMAGES option. You should now see the “Restoration done!” message on the screen.

Do not! Absolutely do not reboot your phone now, or else Magisk will be uninstalled completely.

Step 3: Install the OTA Update on your Rooted Android Device

Now, with the stock boot image restored, you can freely install the OTA update on your rooted Android device. Simply go to the device Settings → System → System update, and press the ‘Download and Install‘ button.

Install the OTA update on your Rooted Android device

Once the installation finishes, you shall be prompted to reboot your phone. DO NOT REBOOT YOUR DEVICE YET! Simply move ahead to the next step.

Step 4 [Optional]: Retain TWRP Recovery after OTA Installation

This is an optional step and only to followed if you installed Magisk using TWRP recovery (Method 1). It will allow you to retain TWRP recovery after installing the OTA update.

For this, you will need to download and install “TWRP A/B Retention Script” (by XDA Recognized Developer osm0sis) from within Magisk Manager. To do so, follow the steps below:

  1. Go to the app drawer and launch the Magisk Manager app.
  2. Tap on the menu icon (3-horizontal lines) on the top-left of the app’s window.
    Download TWRP A/B Retention Script from Magisk Manager
  3. Select ‘Downloads‘.
  4. Now search the modules repository for “TWRP A/B Retention Script“.
    Install TWRP A/B Retention Script
  5. Next, tap on the download icon and select the Install option.

The script should now be installed on your phone. There’s nothing more you’d need to do for this now. The script will do its job and preserve TWRP after the OTA installation finishes.

Step 5: Preserve Magisk Root after OTA Installation

The final step to install Magisk to the inactive slot. This will preserve root after the OTA installation is finished and the device is rebooted into the updated OS.

  1. Open Magisk Manager.
    Install Magisk to Inactive Slot - Tap on the Install button
  2. Tap on the ‘INSTALL‘ button and select the ‘INSTALL‘ option.
  3. Select ‘Install to Inactive Slot (After OTA)‘ when prompted to choose the installation method.
    Install Magisk to Inactive Slot in Magisk Manager
  4. Finally, tap on ‘YES‘ to confirm when the warning message appears on the screen.
  5. Magisk will now be installed on the inactive slot.
    Install Magisk to Inactive Slot - Reboot your device
  6. Once the process finishes, tap on the ‘Reboot‘ button.

Magisk Manager will now force-switch your Android device to the inactive slot where the OTA update was installed. This will help prevent any post-OTA verifications that the system might have carried.

That’s it! You have just successfully installed an OTA update on your Android device rooted with Magisk. So when the next time an OTA update arrives, you can follow the same instructions to upgrade your device, and that too without losing root.

If you have any questions regarding the instructions/procedure listed here, feel free to let us know. We shall try to help you to the best of our knowledge. Make sure that you mention your device’s name (model number if applicable) and the software build number installed. This will allow us to help you quickly and more efficiently.

(Source: Official Magisk documentation)


    1. Yes, it should. Encryption should not have any effect on the installation. If your device already has encryption disabled, Magisk will obey that and keep the flag disabled.

  1. Hey, so I have a rooted OnePlus 7 that is running oxygenos 10.3.8 I recently got the android 11 update in settings app. Will this method work for me to go from 10.3.8 to 11?

    1. Yes, Aryan. The core method stays the same regardless if it’s a minor (monthly security update) or a major Android version upgrade.

  2. Hi, What to do on Magisk V22.0? It does not give me the option “install to inactive slot” there is only “select and Patch a file” or “Direct Install”.

    1. That’s odd. I can see the “Install to Inactive Slot (after OTA)” option on both my OnePlus 8, as well as the Pixel 3 XL.

      Which device do you have?

    2. I have a Pixel 3a. My App package is com.topjohnwu.magisk version is 22.0. Is that the same that you have?

    3. Yes, that’s exactly what I am using. This is odd, especially because my Pixel 3 still has that option and the 3a isn’t much different in terms of the software setup.

      Have you tried re-rooting from scratch? Like, uninstall Magisk completely, then reflash the factory image (with or without erasing data, your choice), and finally re-root again.

  3. Hi Dhananjay! How are you? I need your advice again. Look, after the major update in android 11, is the first time that I can’t restore the stock image in order to apply the February update in EU Rom via OTA. A message says that this image doesn’t exist! I flashed again all the Rom (except data…) according your guide, I rooted again flashing the patched img but I got the same message again. I can’t get the update. I must wait to find the new fastboot build to flash it and to reroot the phone with the new patched img. Have you any other solution?

    1. Fanis, good to see you here again.

      Well, that’s really a strange issue. Someone else with the OnePlus 8 reported something similar as well. I am not entirely sure of the cause. The only time Magisk doesn’t take a backup if the /boot partition is modified in any way.

      Anyways, I would suggest doing a full upgrade using the Fastboot ROM. It’s the Mi A3 EU variant that you have, am I right?

    2. It’s ok now my friend and thanks for your quick response! I see that your site has been better than ever! At last I did all from the beginning. I uninstalled all the modules, then the Magisk and in the end I flashed all from the beginning and I rooted it again. Then I restored (yes!) the stock image and I applied the February OTA update. I reinstalled all the modules and so on…

    3. My pleasure, Fanis. And thanks for the appreciation. I am trying to make it better every passing day.

      I still couldn’t figure out why exactly Magisk wouldn’t create a backup of the stock boot image. The only time it might fail is if the /boot partition was modified in any way. Anyways, good to know that you were able to resolve it.

  4. Thank you for the clarification, but I have a big problem trying to update on my rooted OnePlus 8 Pro. When I click to RESTORE IMAGES in Magisk Manager I get the error message “Stock backup does not exist.” So I did a Complete Uninstall in Magisk Manager and my phone was stuck in a bootloop and would not reboot. The only way I could get it to reboot was to go in the fastboot mode and use the platform tools to install root the phone again.

    I then did a factory reset and again rooted the phone per your instructions. However, the same problem recurred: I again received the “Stock backup does not exist” message and if I uninstall Magisk the phone won’t boot up. So I am stuck with either a rooted phone that I can’t update. Any suggestions?

    1. Hi again, Jason. That’s odd and I personally have never experienced it in years of rooting. I just updated my OnePlus 8 to OOS using the very same method without any hiccups.

      Anyways, please let me know the OxygenOS version that’s currently installed on your OnePlus 8 Pro. Also, let me know if it’s the Global, European, or Indian variant.

    2. Apparently, somehow the backup boot image Magisk uses was missing. That’s why I have never been able to successfully apply an OTA without losing root which was no big deal since it is easy to re-root. However, this was the first time the phone went into a bootloop after uninstalling Magisk.

      Fortunately, I was able to fix the problem thanks to your guide on how to restore OnePlus 8 Pro back to stock OxygenOS. I used the fastboot command to install the stock boot imagine for global. Now my phone was able to reboot so I used Magisk to root again. After that I was finally able to successfully use this guide since the RESTORE IMAGE in Magisk was working. Don’t know what I would do without your guides. Thanks again.

    3. That’s fantastic. It’s really good to know that my guides are helpful. Kudos, Jason!

    4. I did that , I reflash except data the Rom, but the message came again. Do you suggest me a factory reset?

    5. After flashing the latest ROM via Mi Flash, you need to re-root again (i.e. Patch the boot image, and then flash it through the fastboot flash boot command).

      Then try restoring the boot image and see if it works now.

    6. I don’t use the mi flash tool,I use your guide with the flash all except data script. It’s ok? But you must know that before to write you, I tried what you suggest me without result…

    7. Yes, it’s one and the same thing. The Mi Flash Tool executes the same scripts, but is more UX friendly with the UI, instead of the CLI.

      That’s odd. It still didn’t work? You now have the February update installed or the January update?

  5. Thanks for your reply, but I am still not clear if your tutorial will work for incremental updates. The Oxygen Updater app states that “if you have an unlocked bootloader, then you should always pick the full update as update method.” Oxygen OS global is ready as an OTA download, but since it is only incremental and not full update I was concerned that I would lose root if downloaded and installed it using your method.

    1. Okay. Let me try and break it down. There are two things you could do in the case of OnePlus when it comes to Step #3 of this tutorial:

      1) Take the OTA via the in-built update mechanism. If your phone’s bootloader is unlocked and/or is rooted, the device will always download full OTA updates.
      2) Download the incremental/full OTA and install it via the Local Upgrade option.

      I suppose you’re downloading the OTA via the Oxygen Updater app. This means you have the choice to download either the incremental or the full OTA package. And you could use any of the two.

      The app suggests the full update because it’s the safest option. Why? I answered that in my previous reply to you.

      Short answer: Yes, you can do with incremental updates, given that you have not mounted or altered the /system or /vendor partitions manually.

      My suggestion: Use the full OTA update.

      In either case, you will not lose root. Just make sure that you DO NOT REBOOT the phone after installing the OTA until you have installed Magisk to the inactive slot.

  6. Thank you for your useful guides. Will your guide to keep root work with an incremental OTA? The Oxygen Updated app states that you should only install a full OTA on rooted devices.

    1. My pleasure, Jason. Yes, that’s exactly what this tutorial is for. Full OTAs do not conduct block-level checks to verify if any device partitions have been modified. And that’s where step #2 comes into play, it restores the stock boot to achieve this.

  7. Doesn’t work on A11 at least on my Op8T… Unfortunately, have to lock the bootloader to take the OTA.

    1. Matt, what error did you face? I just updated my OP8 from OOS (A11) to OOS using the same method a few days ago, so I can confirm that it works.

      Could you please provide more info? Like what error did you face and which part during the guide exactly?

    2. I’m facing the same issue. Tried the OTA both over Wi-Fi and local update. Fails at 82%. Same happens when I boot with the original boot image. I’m assuming a relock/unlock will mean the device is wiped again? Maybe I’ll just wait for a full OTA to update…

    3. Have you tried installing the full OTA via the Local Upgrade option?

      If it’s the OnePlus 8T, you can get the latest OTA from the OP8T OxygenOS repository.

      And yes, relocking and unlocking will erase all the data.

    4. Yes, the OTA packages for the Global variant of the complete OP8 series could not be captured like others. They are directly made available at the official support page.

      Anyways, have you tried using Oxygen Updater to check if you could download the OOS full OTA for your Global OP8T?

    5. Yes, I checked the OnePlus support page already. I think you’ll have to wait until the full OTA package can be captured. I will update the repo as soon as I have the link.

    6. Full OTA is available!

      I downloaded the OTA, restored stock boot image in Magisk, applied update through system local update, installed Magisk to inactive slot before reboot. Rebooted with no issues. 🙂

  8. Dear sir, I am Using OnePlus 6 Mobile. And Presently I am on android 9.0.9 and I rooted My mobile using TWRP Flash. My present Magisk version is 21.4 AB-Yes, Ramdisk-Yes,SAR-yes. I Rooted my phone almost 1and half year back in between I done OTA update as Same process apart that TWRP A/B install.
    My question is As previously I Had a problem or I heard that OTA update to android 10 is not possible using magisk . because magisk don’t support android 10. And I have experience that my Phone was soft brick while doing May be OTA update ( I don’t remember reason for soft brick that time )
    Can Now OTA Update My Phone Using Magisk 21.4
    From 9.0.0 To 10.3.8 and Do I need to download TWRP A/B Module via Magisk. ?

    1. Hi Keshav. Thank you for the details, but I will need a bit more context to give you a proper answer.

      Do you currently have TWRP installed on your OnePlus 6 or is it rooted with Magisk without TWRP?

      Just so you know, Magisk has supported Android 10 for a long time now and even supports Android 11 with v21+.

      As far as I can tell, the brick could have been caused because Magisk didn’t support Android 10 at the time you attempted the update to Android 10.

      Anyways, let me know if you have TWRP installed or if your phone just rooted with Magisk.

  9. Hello
    Once again I come back to you to inform you that I have just updated my One Plus 8 Pro OTA smartphone to the OxygenOS version. I was alerted by the Oxygen Updater app.
    The ZIP file (3.07 GB):
    The update was carried out perfectly by strictly following your tutorial above.
    The device is still rooted and is working perfectly fine.
    This message is particularly intended for all your readers …
    Best regards,
    see you soon…

    1. Jean, it’s good to see you sticking around. I am sure it will be useful for OP8 Pro users who visit this page.

      Even I updated my OnePlus 8 to OxygenOS yesterday with Magisk and all is working fine.

    2. Hello, I have a magisk rooted One plus 7pro. I have now and rood 10.4…. Until now for the minor updates I applied these steps
      1. Disable magisk modules
      2. Local update (NO REBOOT)
      3. Go to magisk and install it to the Inactive Slot and..
      4..install Twrp A/B
      5. REBOOT
      With this method I never patched anything and worked perfectly., I wonder if it’s going to work with Android 11 update as well or do I have to do anything extra?
      Thank you in advance

  10. I have a tecno F1 running on mediatek that I have routed using magisk to flash the boot image, and after applying the steps to update the OTA, I got to step 5 my version (the last version) of magisk that I have there is no option install to inactive slot after OTA … so I don’t know what to do at this level

  11. I have a different version of the magisk manager (the very latest) and it does not show the “install to inactive slot” option. I tried to use default installation and it does some kind of boot image patching but when I restart, it always restarts back to the old slot and the system update is not applied… Do you have any advice for me? I did the following steps:
    install system update
    install magisk

  12. for Dhananjay Bhardwaj
    Good evening
    The OTA update went perfectly by following your tutorial step by step above.
    Indeed, updating the image is absolutely not necessary.
    You just have to be careful not to restart the smartphone before the end of the various steps …
    The new system OxygenOS version is:
    Thanks a lot for your help.
    Good night.
    Best regards.

    1. Good to know it worked and you’re most welcome. These same instructions were also there in the OnePlus 8 series rooting tutorial itself.

      Yes, the boot image is only required when rooting and not when updating the software.

      And like you said, the device shouldn’t be restarted before Magisk is installed to the inactive slot. Not like restarting after installing the OTA will break anything. It will just boot into the updated software but WITHOUT MAGISK ROOT. So, one will need to re-root again by patching the boot image and all.

  13. @ Dhananjay Bhardwaj
    Hello again
    Thank you for your quick feedback.
    Indeed, I installed Magisk on my One + 8 Pro and my device is therefore rooted.
    I was just wondering if the “boot” file already installed and which was used for the upgrade to OxygenOS 2.0.2 should also be updated.
    I will therefore follow your tutorial above the comments and the indications that you sent me in your answer and everything should be fine.
    Thanks again, best regards.

    1. You’re welcome. The boot image is generally only needed when rooting the phone initially.

      When it comes down to OTA updates, Magisk automatically picks up and patches the stock boot image of the software update installed to the inactive slot.

      Let me know how it goes.

  14. Hello and Happy New Year to everyone
    An update to Oxygen 3.0.3 has just been offered to me with the Oxygen Updater application: version 15.E.33_0TA_0330_all_2012102330
    Please tell me in advance if the “Image” file that is currently installed on the One Plus 8 Pro (rooted with Magisk 21.2 and Manager 8.0.5 installed) can be used or if a new image needs to be extracted from the Zip file of OTA?
    Best regards

    1. A happy new year to you too!

      The boot image must always be extracted from the existing firmware (that is in your case right now).

      My question: Why do you need to extract the boot image at all? If you have Magisk installed, you can install the update without having to go through that trouble at all.

      Here’s what you should do to achieve this:

      1) Go to Magisk Manager > Uninstall and select ‘Restore Images’
      2) Install the OOS update via the Local Upgrade option (Settings > System updates and press the cogwheel icon)
      3) After the installation finishes, it will prompt you to reboot the phone (DO NOT REBOOT YET)
      4) Go back to Magisk Manager, press ‘Install’ and select ‘Install to Inactive Slot’

      Once this is done, reboot the phone. Your OnePlus 8 Pro should boot into the updated OxygenOS software with Magisk root still present.

  15. Hello…hoping to get some insight. I’ve been rooted since November and that is also the last Google update I took on my Pixel 3. Suddenly today it took the Dec 5 update (I’m January!) and now Magisk modules are gone and appears not rooted. Boot loader is unlocked. I have options to install Magisk and the Manager but no changes if download and apply patch

    1. That’s really odd. I was able to successfully update my P3XL from December 2020 to January 2021 patch without any problems. So it seems like your device just ran into an unusual problem this time.

      I would suggest downloading the December 2020 factory image from here, extract the boot image from it, patch it with Magisk v21.2 (now available on the stable channel) and flash the resultant patched boot via the fastboot flash boot command.

    2. That worked thank you. Patched Boot.img and loaded via fastboot flash boot (full path to file name and then fastboot reboot as you suggested and had it all back. Thanks again.

  16. can you help me, how about downgrade the OS from Android 10 to 9 when your phone still rooted (my phone ASUS ZS630KL)

    1. Hi Andre, do you also have TWRP installed on your Zenfone 6 or is it just rooted with Magisk (without TWRP)?

      The plan of action is to first uninstall Magisk completely by going to ‘Magisk Manager’ > ‘Uninstall’ and choose the option to completely remove Magisk. After this, your phone will restart. Once it does, download the Android 9 Pie downgrade ROM package from Asus’ support page and install that via the in-built updater.

      Let me know what software build number is installed so that I can point you to the correct downgrade package.

  17. Hey mate, I do not have any sort of root installed but I do have a unlocked bootloader and twrp installed (based on the guide on your website). How can I install OTA updates with only that.
    BTW.. Your articles are written on point and also helped me gain a lot of knowledge in regard to rooting of android and the processes involved..

    1. Hi Adithya, may I know the device in question? The process depends on the device configuration. And are you certain that you do not have Magisk installed on your device?

      Thank you for such kind words, my friend. These mean a lot.

    2. Hi again, Adithya. You could flash the latest recovery ROM package to your Mi A3 directly via TWRP. Right after flashing that, you will also need to flash the TWRP installer ZIP and Magisk ZIP (if you want to root as well) files and then finally reboot the phone.

      In doing so, you will have the updated software and retain TWRP + root.

      This guide is aimed at users who already have rooted their phone with Magisk. Since it’s not the case here, you could do as I suggested above.

      EDIT: I do maintain a repository for all Mi A3 software updates. You can download the latest Recovery-flashable ROM from there. The links are fetched directly from Xiaomi’s Firmware Updater Servers.

  18. Good evening
    I need your advice again …
    I think I have to go back to the factory settings for my 1 + P8 because of a problem that I cannot solve: I can no longer use the TITANIUM application after various attempts to restore to working order: uninstall, reinstall, restore the application with Dr Fone …
    This application was still working yesterday but I have probably done something that is not correct. When I launch the app, it closes immediately. It is not one of the applications that have root access with Magisik.
    I would just like to know how to do this: do a “factory” install or reflash the current version of Oxygen OS with your guide listed above?
    Thank you for your advice.

  19. Hi, is this method gonna work for a Xiaomi Redmi Note 9 Pro? I can’t find any infos about that.
    Btw, great blog!

    1. I am not sure if the Note 9 Pro supports A/B partition system. This tutorial supports devices that have A/B scheme. You could confirm that using the instructions here.

      Do you have TWRP installed on your Note 9 Pro or is it just rooted with Magisk using the patched boot method?

      And thank you for the kind words.

    2. Can confirm, if someone comes here wondering, that the Xiaomi Redmi Note 9 Pro does not indeed support A/B partitions.

    3. Thanks for confirming, Alex. In case you have TWRP installed, you can just flash the latest MIUI recovery ROM through it, followed by the Magisk installer ZIP package. This should allow you to update your Redmi Note 9 Pro to the latest software/build version while preserving root.

  20. Hello
    I have just performed the OTA update (reported yesterday by the “Oxygen Updater application) for the Oxygen OS version by following your tutorial above (by not following point n ° 4 since I does not have TWRP.
    Everything went perfectly well and the 1+ P8 is fully operational with Magisk 211 and Manager 8.0.3 also working.
    Thank you again for your very precious help …

    1. Just saw your latest comment now, Jean. I am glad it worked and your OP8 Pro is now successfully updated to OxygenOS while still rooted with Magisk.

      Even I got the update today and got my OnePlus 8 to the latest OOS version.

      And, you’re most welcome!

  21. Hello…
    I have been warned of a new version of OxygenOS 10.2.2 (
    Before setting it up, can you confirm that I can follow your tutorial above and still perform this procedure in the future for new versions?
    I would like to avoid doing “stupid things” and continue to enjoy Magisk 211 and Manager 8.0.3
    Thank you for your information and your help !!

    1. Yes, you can follow the same instructions to update every time a new update is rolled out.

  22. Dear Dhananjay,

    thank you for your excellent tutorials!

    Yesterday I followed this instruction for my OnePlus 8 Pro, worked like a charm! Today I got an OTA Update notification for Android 11 and checked with your website for instructions. Thanks for the hint, that TWRP isn’t yet updated for Android 11. Since I want to keep TWRP, I’ll wait patiently for TWRP and your new instructions to update my phone.

    Keep up those greats tutorials! I might be a Systemadministrator for over 20 years, but only on Windows. Linux is not my world, so I always struggle with that stuff. Thanks to your instructions, it’s very easy for me 🙂

    Cheers kimon

    1. Yes, TWRP isn’t updated for Android 11 yet. While there are has been some significant progress more recently, but it’s far from an actual release. So you might have to be a little more patient. I am keeping a tab on the progress and if anything’s released, I will update the post.

      And I couldn’t thank you enough for the kind words you have said for me and the tutorials. Gave me a sense of accomplishment there.

  23. hey man thanks for the tutorial, very nice, i did it what you say but i got an error “ keeps stopping”. any idea how to fix this. thanks

    1. Cris, thank you for the kind words. May I know which phone is it? Did you see this error after installing the OTA? If so, did the OTA and Magisk installation (to inactive slot) went smoothly without any errors?

  24. Hello
    I am coming back to you to ask you if there is a procedure described in one of your different killers to install TWRP on a Pro 8 with OxygenOS 11 stable ( with also Magisk 211 (21100) and Manager 8.0.3 (314 ) (14) installed?
    Point 4 of your present tutorial is based on a version of Magisk Manager that is not the one installed on my 1+ P8
    Thanks for your help again …

    1. Jean, at the moment, TWRP is not updated for Android 11. Once it is, I will be updating this particular tutorial.

      Point #4 is completely optional and only applies if you have TWRP already installed on your phone. The screenshots show the old UI of the Magisk Manager app, prior to V8.0.0. I will update it ASAP.

  25. Hey! Thanks for creating this guide… Will this work on a Samsung A315G? Im not sure if it has A/B Partition, so can you check it for me? Thanks so much!

    1. Tommy, you can check if your Galaxy A31 supports A/B (seamless) updates by following the instructions on this page.

  26. Please consider updating the very beginning of this article with info regarding Android 11. (e.g. Don’t try it with Magisk Stable, etc.)

    Perhaps something with resources regarding new versions of Android/Magisk and where to double check if it’ll even work before trying.

    1. Yes, I did consider that. Android 11 support is currently only offered by Magisk Canary. In a few days, Magisk v21 will be out with Android 11 support. Anyhow, adding the said info seems like a very good idea in the meantime.

  27. I tried to Uninstall from magisk but got backup not found.
    My devices is infinix s4(x626b) with build number

    1. Do you have a copy of the stock boot image for “X626B-H623JKN-P-191014V280”? This will be the boot image you initially patched in Magisk Manager while installing Magisk.

    2. Am not sure. But I still have something like recovery.img in my file manager.

  28. Android 11 beta is out now. Will this method still work for Android 11 on a OnePlus 8 Pro? Also, it is my understanding that TWRP Recovery does not work (at least not yet) with Android 11. Therefore, should one not go through the step for retaining TWRP with the Android/Oxygen 11 update?

    1. Hey Jason. It will depend on your current configuration. Android 11 stable/beta is only supported by the latest Magisk canary versions and not by the stable Magisk release. Furthermore, if you’re moving from stable OOS to OOS 11 Beta, I would suggest making a clean install because of the nature of beta software. Like any other Android OEM, OnePlus tends to add its own patches at kernel level, which may or may not work with even Magisk Canary out-of-the-box. So, the choice is up to you. Just make sure that you install and use the latest version of Magisk Canary before you attempt. You can get Magisk Manager Canary from Github.

      As for TWRP, yes, the step is completely optional and need not to be followed if you’re not using TWRP in the first place.

      I hope this helps.

  29. Hi Dhananjay

    I use a Samsung M30 mobile
    I have rooted it (TWRP/Magisk) installed in it..

    Can I use this method to do OTA update without Data Loss / TWRP loss / Magisk loss

    1. Pradeep, I don’t think the Galaxy M30 supports A/B partitions.

  30. Hey,

    I have a rooted Mi A2 android 10 with the backup doesn’t exist problem, I don’t know how it was rooted, can you make a coprehensive guide that explains step by step what I have to do now to get OTA?


    1. What’s the build number of the Android 10 firmware installed on your Mi A2? Let me know.

      You can check this under ‘Settings’ > ‘About phone’.

    2. Does your Mi A2 have TWRP installed as well? Or is it just rooted with Magisk alone?

  31. G’day Dhananjay,

    Thanks for this exposition, which I found when Googling for ‘updating a rooted Android phone’. I recently purchased a UmiDigi A7 Pro (with Android10), and rooted it using Magisk and a (then latest) boot.img.

    Being a very new model, there are still bugs being fixed by UmiDigi, so I wish to sometimes update the firmware to their latest. I understand your instructions, but would like to ask a few questions before trying your method…

    1. Is there any quick way to determine whether my phone uses the A/B partition system? (I have FX File Explorer with the root add-on.)
    2. If I update using your method, will all my current apps and settings be preserved as they are, or will I lose them like you do when you flash a new ROM image?

    Many thanks,

    1. Daniel, I already covered a tutorial on how to check if your phone supports A/B partitions. But if you already have Magisk installed, and updated Magisk Manager to v8.0.0+, then just open the app and it’d show you if your phone has A/B partitioning or not. You will find this info under the “Magisk” card at the top.

      As for your data, it will all be preserved. However, do take a backup beforehand to safeguard your data from any odd situations.

  32. Hello.

    Do this work on a h96 pro plus android tv box? It have android 7.1.1 and it would be nice to get a bigger and better android on the tv box.

    My tv box is NOT rooted but i can root it in no time.

    1. Hi Mike. The important part is getting the firmware update, without root if possible.

      I did find a few threads on the topic that should be worth going to:
      1) FreakTab
      2) XDA: 1 & 2

      From what I could gather, the TV box is not registered with Google’s CTS, which makes it really hard to get firmware updates.

    1. Hi Clement. No, this method will not work on your Mi 8 because it does not support A/B partition system. Do you have TWRP installed on your phone? or did you root the phone using the patched boot image method?

      We might still be able to install the update, just using a different method.

  33. Hi, I am using redmi k20 and rooted with TWRP. Can I just flash stock recovery.img and install OTA? Will erase my data or unroot the device?

    1. Hi. I would suggest flashing both recovery and boot images. The latter for just in case. Yes, this will unroot the phone, you will need to flash TWRP and Magisk again.

      I think it’s best to flash the MIUI recovery ROM of the update via TWRP itself, followed by the vbmeta patcher and Magisk ZIP files. This will preserve both root and TWRP after the update. Take this page as a reference for the files.

    1. Hi. I am afraid no. That’s because the Poco F1 doesn’t support seamless updates (AB partition system).

      May I know if your phone is just rooted via Magisk or does it also have TWRP recovery installed?

  34. Excuse me, i’m still very new to this world😅. So i want to ask about when i am able to reboot (restart now) the update software?

    I mean i see nothing about pressing -restart now- through step 1-5, the only restart i see was on step 5 which meant to reinstall the magisk and not to update the software

    1. Hi Malvin. The software is installed right after step #3. If you restart right after that, your phone will be updated, but you will lose root.

      That’s why you need to follow through step #5, flash Magisk to the inactive slot (where the new software update has been installed), and only then reboot the phone.

  35. Even after I followed your steps, the same error poped up ‘couldn’t install system update, tap to learn more’
    Mi A1

    1. Hi Bimal. It’s because the OTA has detected some sort of modification in the corresponding boot, system, or vendor partitions of the phone.

      Did you perform any sorts of manual modifications to the phone’s system partition earlier? May be edited the build.prop or deleted system apps? Also, did you install Xposed Framework earlier or have it currently installed?

  36. Hey. Thanks for your guides! They’ve been really helpful.

    I just got a new phone and I’ve been reading your guides in advance before rooting. Can I still get OTAs with the second method (not using TWRP) provided in this guide with Xiaomi Redmi Note 8 Pro? Guides on other sites all either state that I need TWRP or won’t be able to get OTAs at all. It operates on Android 9 Pie and MIUI 11. I’d much rather use the non-TWRP method because it seems easier and more convenient but I’m not sure if I can. Sorry if the question is dumb, I’m not too good with software

    1. I am happy that my guides have been helpful!

      No, the question makes absolute sense. The thing is, that the Redmi Note 8 Pro doesn’t have a second slot to install the OTA or Magisk to, after updating. That’s why it will not work on the phone.

      The good thing with Xiaomi is that you can flash the latest OTA updates directly via TWRP. For devices with an A-only system, TWRP is a very good tool to have. You can use it to take backups of the complete OS, use it to flash custom ROMs (if you plan to try them), and much more.

      If you have any more questions regarding the phone or related things, please feel free to comment.

    2. Thank you for the quick response.

      You said that you can flash new OTAs directly via TWRP. Does that mean I won’t have to unroot/soft reset to get a new OTA? Or do I have to unroot first? If yes, is unrooting and then rooting again a big hassle to do or is it simpler (for example I hear SuperSU has a simple unroot/reroot option)? And should I use Magisk for rooting?

      Also am I supposed to transfer complete OS backups to my computer or something? And about custom ROMs, what kind of features are available with those?

      Sorry if that’s a lot of questions at the same time, I’m new to this kind of stuff.

    3. Hi again J. I can understand it could be a lot of things to consume at once.

      By install OTAs, I meant manually installing the full ROM/firmware file. Once an update is released, you can grab its full ROM file and flash it via TWRP.

      There will be no need to unroot. But when you flash the ROM package, root will be gone. In that case, every time you flash an update (full ROM), simply flash the latest Magisk installer ZIP file right after that and finally reboot the phone.

      In doing so, you will have the update installed and root still preserved. Don’t use SuperSU at all. It has been depreciated and only good for rooting older Android phones. Magisk is what you should opt for.

      Once you have TWRP installed, it makes sense to take a complete backup of the OS via TWRP itself and transfer it to your PC. This backup will come in handy if you want to revert from a custom ROM back to stock ROM.

      My personal suggestion would be to try this stuff first and only then move on to custom ROMs. If not, it will all be confusing to take at once, like I said earlier.

      If you have any more questions, please feel free to let me know.

    4. Hi dev, it turned out that my phone don’t have A/B system, but my phone is not Xiaomi.
      Are there any chances i still can install OTA update via TWRP without any potential brick?

  37. Hi Dhananjay, very good step-by-step guide but i still encounter one problem: After restoring stock boot image via Magisk and returning to OTA dialogue and tapping “Download and install” i still get the message “Couldn’t update – Installation problem”.

    Switching back to Magisk boot image no problem, root access again gained.

    Device is Mi A3 currently running Android 10, Build QKQ1.190910.002V11.0.11.0.QFQMIXM, Device is rooted with Magisk 20.4 (20400), MagiskManager 7.5.1. TWRP permanently installed.

    Any ideas what might go wrong?

    1. Hi Volker. Thanks for the kind words.

      The error will show up on the screen if the system detects any kind of modification on the currently inactive slot (where the OTA will be installed too). I have faced the same problem with my Pixel 3 XL in the past. The easier fix will be to find out the firmware build number installed on the inactive slot and then flash the system, boot, and vendor partitions of the same firmware to the phone’s inactive slot.

    2. Thanks for the swift reply! One more question – hope it’s not annoying: How do i check Buildnumber on inactive slot?


    1. Hi Jye, the method will not work for the K20 Pro since it doesn’t support A/B partitions.

      May I know if you have TWRP installed on your K20 Pro?

  38. Awesome tutorial but could you let me know if this works for Xiaomi Redmi Note 7 before I try it?

    1. Hi George. Thanks for the appreciation. The tutorial only works for devices that support seamless updates (A/B partition system). The Redmi Note 7 has A-only partition, and so this method won’t work on it, unfortunately.

      Anyhow, there are still methods to update your phone while it’s rooted. May I know if your phone is just rooted or has TWRP installed as well?

  39. Hi
    I lost Samsung apps (Samsung pass, health,etc) and software updates when I rooted my galaxy s8 (SM-G950FD) using magisk.
    Is there any way to be able to use these services again? I’m willing to lose the root benefits if it was the only way, but from what read new Samsung devices lose these services once Knox is corrupted by rooting.
    I need your kind help solving this issue for me.
    Please note that I’m not an expert. I only follow step-by-step guides when rooting.
    Thanks in advance

    1. Also, when I tried to follow the guide above it didn’t work for me and I get this massage:
      Failed to update software. Your phone’s operating system has been modified in unauthorized way.

    2. Hi again. Unfortunately, it doesn’t work in the case of Galaxy devices as they still do not support A/B seamless updates.

      The quickest way to update is download the latest firmware for your Galaxy S8 using Frija Tool and then flash it via Odin using the instructions here. Once done, you can install TWRP and re-root your phone.

    3. Hi Majid. That’s the major downside with Samsung. Features like Samsung Pass, Pay, Secure Folder, and Health rely on the KNOX counter.

      Since you flashed a custom binary (Magisk, TWRP, etc), it has been tripped and cannot be undone.

  40. Hi, this method works only for ota or does it work also for full update? I want to switch from stable oxygenos 10.3.2 to open beta 6 (oneplus 6t device) and I have to install the full update of open beta 6, I don’t think it works with incremental update. Will this method work in this case? Thank you.

    1. Hi MBogdan. Switching from Stable to Open Beta would require you to flash the full OTA file via the local upgrade option in the settings menu. Theoretically, it should work.

      The only change you have to do while following the steps in this guide is during Step #3. When at that step, simply flash the Open Beta full update file via the Local Upgrade option and then DO NOT reboot the phone. Then follow the rest of the instructions in step #5 and you should be good.

  41. OK – except for when I to to Settings to install the update, it only gives me a “Restart now” option – no “Download and install”….

    1. Hi Scot, it means that the update was automatically downloaded and installed. That’s why I mentioned disabling automatic updates in Step #1. In your case, I believe the update was downloaded and installed even before you started following the instructions.

    2. Dhanjay bro pls I need your help , I can’t explain here here this is my no pls contact me via whatsapp iam in need of your help

    3. Hi Harish. Please try and describe your question/issue here so that I can keep a track of it and be as responsive as possible. If it’s really urgent, you can drop me an email through the link in the author box.

  42. Will this method work for me
    I rooted my device using the rooting tool given by XDA DEVELOPERS which automatically installs twrp and magisk.

    Please help me can I install OTA updates as in the second method without any flashing


    please help me saying whether my MAGISK MANAGER taken a backup
    So I can install OTA updates by restoring the images

    1. Hi Jaya Krishna. I personally do not trust one-click root tools, because when you use them, you practically have not idea what it actually does on the backend. And so, you will have not idea how things work when it comes to rooting, etc.

      The only way to know if it works or not is by trying to follow the OTA update method, during which you will try restoring the stock boot image. If it doesn’t work, Magisk will notify you that it doesn’t have a backup of the boot image.

      My personal suggestion would be to restore the stock firmware, which means, install the update manually. And then re-root your phone manually.

      If you want, I can cover a full guide for it on the blog.

    2. Thanks for the offer but i know the rooting my Redmi Note 7 by patching the stock boot image so the OTA works perfectly I think but I have a doubt whether this step will work or not
      (Select ‘Install to Inactive Slot (After OTA))
      As REDMI NOTE 7 doesn’t have a/b partition.please answer me whether the step works or not

    3. And one more thing would you recommend me to UPDATE TO ANDROID 10 or not,as I see there is much security which is even effecting magisk with safety net check and other what would would you recommend stick to 9 or update to Android 10

    4. Hi again, Jaya Krishna. The option will only work on A/B devices. Since the Note 7 doesn’t support that, there’s no other slot for Magisk to install and thus it can’t be used.

      If Android 10 is stable enough (which it should be), I think upgrading your phone would be a good idea.

      As for Magisk and SafetyNet, it won’t be possible anymore because Google has recently implemented hardware-based attestation for SafetyNet, as opposed to the software-based attestation that Magisk could bypass earlier.

      Magisk creator John Wu posted about this on March 11 on Twitter:

  43. Hi Dhananjay
    The security patch update is coming, I start following your quide,but when I tap to restore the image it says there isn’t security copy and I can’t continue! What’s wrong with me?

    1. Hi Fanis. This happens mostly in two cases:
      1) If you flashed Magisk via TWRP when TWRP is permanently installed. Magisk may detect a modified boot image and will not take a backup.
      2) Or, if you flashed a pre-patched boot image. Magisk only takes backup of the stock boot image when you patch it by yourself using the Magisk Manager application.

  44. Just did everything outlined, double checked myself on each & every step but it bricked my phone!! On re-boot it goes to the fastboot menu & that’s the end of that. I have spent about 16 hours with every fastboot & ADB command, TWRP flash, …. & nothing. I have ordered a new phone but would love to get my original Moto g7 power working

    1. Hi Fred. Sorry that you had to go through such an ordeal. To recover your phone, you have to restore the stock firmware.

      There’s a guide on XDA-Developers for this. Please check it out here.

      If you need any help with it, please let me know.

  45. Is there any way to update Nokia 6? I don’t have that option “Install to Inactive Slot (After OTA)” after press install. Is there any way?

    1. Hi Krzysztof, if it doesn’t show that option, it probably means that your phone doesn’t support seamless updates (A/B partitions). May I know if your phone has TWRP recovery installed as well?

  46. Hi, great guide. I have the following problem. My Xiaomi Mi 8 (normal, not lite nor pro) has been recently updated with the latest Miui 11 on Android 10 by OTA. It was a mistake because before i updated it, it was already rooted but i tapped the update option by inertia. I really hate this new version because its too slow in some games so i want to downgrade it.

    My problem is that i already rooted it with this updated android with twrp/magisk/smali and i expended a whole day to do it, and if posssible i dont want to do it again, BUT i want to downgrade my Android to the previous version. Is it possibe to “flash” it with the previous rom without loosing twrp/magisk/smali? THanks

    1. Hi Jose. I am afraid, but whenever you flash the stock ROM/firmware, you TWRP/Magisk and any other modifications will be overwritten because the system and boot partitions are overwritten as well.

      Now, over to the downgrading part. You will need to make sure that your Android 10 ROM’s rollback index matches with that of Android Pie. On your part, you have to check the former by following the instructions in this post. While you’re there, also give a read to the entire post to understand what the rollback index is and how it works.

      On my end, I will download the Android Pie based MIUI ROM and check the rollback index of that.

      If the index matches, then downgrading would be possible. If not, then it wouldn’t be possible to downgrade at all.

  47. Hi Dhananjay
    I have realme 5 pro that will receive update android 10 and Realme UI, currently my OS is Color OS.6 android ver.9

    Can I use this method to update my phone?
    If this work does this method required me to backup all my data?

    1. Hi Dioriorio. Yes, you can use the method to update your phone from ColorOS 6 to RealmeUI with Android 10.

      Just make sure that the OTA package is compatible. Although if it isn’t, the recovery will abort it even before it starts flashing.

      Do let me know how it goes.

  48. Hey Dhananjay. I’m using App2SD which is granted superuser rights. Does this need to be uninstalled in order to successfully apply the updates? OTA is trying to install Android 9, but keeps failing around 19% of the download. Really appreciate your knowledge here!

    1. Hi Robert. The fact that Apps2SD gains superuser permission isn’t a problem. I have used Apps2SD in past, probably when Android Froyo was around.

      As far as I recall it is used to move installed apps (and their data) to the external SD card, right?

      If you have only moved and linked the third-party apps that you installed, then it shouldn’t be a problem. Have you moved any of the pre-installed system apps using Apps2SD?

      Also, please let me know which phone is it?

    2. Hi Dhananjay. Yes, I rooted the phone so I could run App2SD as superuser and link apps to external memory. My phone was running out of internal memory, so this gave me back substantial space. I only moved 3rd party apps to SD, the only ones questionable would be google home and google keep, but still downloaded them from play store. After using Magisk to uninstall/restore images completes, I start the download of the OTA (which is Android 9). It stops downloading at 19% and says unsuccessful. Should I try moving apps back to internal memory, uninstall App2SD and try the OTA update again? Thanks so much for the help!

    3. Hi again Robert. Thanks for the more elaborative explanation of the situation you’re in.

      Yes, please try that. Apart from Apps2SD, did you perform any other sort of modifications to the /system partition? Like editing the build.prop file or something else?

  49. I did all these things u mentioned above ,but after rebooting my phone stuck in android one logo, what should i do

    1. Hi Rajesh. Please let me know your device’s name, model number, and the software build number that was installed on it prior to performing this method?

    1. Hi Sna. Did you patch the stock boot image using Magisk Manager by yourself? Or, did you use a pre-patched boot image provided by someone?

  50. Thank you! It worked like a charm. I’ve been waiting to receive an ota update to be able to test updating without losing root.. Magisk really is something else.

    1. Hi. Glad you were able to update your rooted phone through the instructions. And indeed, Magisk really is a wonderful tool.

  51. Can you please better explain (step by step) what to do when “Stock backup does not exist”?

    1. Hi SbAgOots, you will need to manually restore the stock boot image (matching the software version installed on your phone).

  52. Nice guide. But Google keeps complicating things more and more each day. They swear it’s for a better security, but thats just false; it’s for the control; they don’t want to loose control over the devices and their users, thats why they have never liked ROMs too much.
    Security? Bah!. I work for a bank, and the computers that handle databases, private and confidential data, all of them run Red Hat or CentOS with GRUB, if I don’t recall wrong, and the typical Linux boot partition scheme. And as my company, other millions of companies, governments, law forces, armies, spy agencies, cibersecurity companies, etc, etc, demonstrate every day that no “fancy” psichodelic configurations are needed to have the highest standards in cibersecurity. Just follow the standards, dont reinvent the wheel, Google!

    What appears clearer and clearer to me is that consumers who want to be free to use their devices as they want, and not being spied, tracked, profiled, etc, need a real Linux phone like those by Librem or Pine. They are still in a too early stage and cant be compared even with middle range mainstream devices, but they are the guys to follow. We should support them and think in buying one of their devices in 2-3 years, when hopefully their hardware will be better and the software will be more polished and adapted to mobile devices.
    The load of cr*p that we have to put up with from Google and other software makers is each day more unsupportable. We do need a really free, libre, operating system which doesnt make conscious people’s life harder.

    1. Hi Joao. I really appreciate your response and your thought on the matter.

      Yes, Google makes things harder for users who want complete control over their devices by installing ROMs of their choice, gaining root permissions, etc. I wouldn’t personally buy the whole “security” thing either, but we have to abide by it if we want to continue using their platform. I think that’s fair enough.

      I also liked how you pointed out about the Linux phones. Would you mind sharing a URL for them? I would love to take a look.

  53. Hi
    In Step 2, when I try to uninstall Magisk and restore images, I get a message that tells me that the backup of the boot stock image does not exist, so I cannot move forward in the process. What do I have to do?

    1. Hi Isidre. Please share your device name and the software version installed on it.

      Did you use a pre-patched Magisk boot image to root your phone? Or did you manually patch the stock boot by yourself?

  54. Hi, I have a pixel 4XL android 10 rooted with magisk
    I tried to do this method but even after restoring image with magisk and going to OTA updates
    It says installation failed

    Any help? Or ideas?

    1. Hi. That’s most probably because there’s some sort of modification done to the system, vendor, or other partitions.

      Did you perform any other modifications to the phone? Like removing/editing a system file?

    2. Thanks, Gurjot for taking the time and effort to help others around here. I really appreciate it.

  55. Hello Dhananjay,

    i have a little problem here and hope you can help me.

    I have rooted a Xiaomi Redmi Note 8 Pro via TWRP and have installed the Magisk App. Now i am trying to install the new OTA update without losing root and TWRP. Sadly i can’t use the “install to inactive slot” option of Magisk, because it is an A-only device and in Magisk this option isn’t available. In a previous post you said, in this case you have to restore the stock boot and recovery images first. Can you give me a little instruction how i can do that to keep root existing after the OTA update?

    Thanks in advance.

    1. Hi Patrik, with A-only devices, you cannot automate the root-persistence after an update. You will need to do everything manually, by hand.

      Before I guide you any further, please let me know what version/build number of the stock firmware is your Note 8 Pro running?

  56. Hi
    When I try to install the module in magisk for TWRP, I have the error “falshable on A/B slot devices only”

    1. Hi Vincent. Please let me know your device name.

      It seems like you’re using a device with A-only partition scheme. In such a case, you wouldn’t be able to use this method to install the OTA update.

  57. Hi dhananjay, could you help me? I can’t find any root app that could root my phone. My phone is find x, android 9. All of those root app always failed.

    1. Hi Dozer. Please know that one-click root solutions or apps are no more a thing now.

      Some users on this XDA thread have actually managed to install TWRP on the phone. It’s a good place to start reading.

      Of course, you will need to unlock the bootloader first. If you face any issues, please let me know through the comments.

  58. its ridiculous how they claim my device is LESS secure because its rooted.. yet its perfectly ok for them to make my device even LESS Secure by denying rooted devices security patches…

    1. Hi Christopher. I can understand. But manufacturers and Google can only support official stuff to an extent, that is, unless a user chooses to modify the software (Rooting, TWRP, etc). They cannot support OTA updates on such devices, because they cannot determine the level of modification on a particular device.

      That’s where the developer community comes in, and with sophisticated solutions like Magisk, you can now install OTA even on rooted devices. Trust me, I still remember restoring stock boot, recovery, etc images before Magisk came (for OTA updates) and it was damn hectic every month. Magisk has surely made it significantly easy to perform the process without the need for a PC to restore any images.

  59. Hi Dhananjay,
    I tried to follow this tutorial to install the December 2019 update on Mi A1 which was rooted with magisk and TWRP installed permanently. But maybe there was a mistake I made, which is downloading the OTA update and installing it automatically as before it was rooted. The result is that the installation of the update failed. Then I tried to do from step 1 to step 3, and when the installation failed again. Then what steps should I take now? Any advice for me? thanks.

    1. Hi Ricky. There’s definitely some modification that you are possibly looking over. If you have TWRP installed, then just head to this post, download the TWRP-flashable zip file of the latest software update and follow the instructions to flash it.

      Since you’re using Magisk + TWRP, and Mi A1 already has nice development support, you can always refer to that post for the latest software versions, then download the TWRP flashable zip, and repeat the procedure every month when a new update arrives.

  60. I have updated the build prop, so I imagine this will not work for me? Any recommendations for instructions on how to update a rooted Pixel 3 on July 2019 update to Android 10? Thank you.

  61. I rooted months ago and updated the build prop file, so I suspect my phone will fail the system check. How can I update to 10 and reroot? Do I have to do this manually by using my computer and adb again? It has been a while since I have done this, so I would appreciate pointing me to the correct guide if that is necessary once again. Google pixel 3, with July security update. Thanks for your help and terrific website.

    1. Hi Briansurg. Given the state of your device. I think it would be best if you cut the incremental updates and move directly to Android 10 and then re-root your device.

      To start off, install the Android platform-tools (ADB and Fastboot) on your PC. Here’s a quick guide for that. You just have to download the latest tools package and extract it to a suitable location on your PC’s drive.

      Once that is done, let me know so that I can guide you further.

  62. Hi,
    Did everything till step 4. But modules repository for “TWRP A/B Retention Script“ failed bcoz i have orangefox recovery. There is no module for orangefox! .How do i move forward or undo the steps & get my recovery back ?

    1. Hi Gaurav. In that case, I suggest you skip Step #4. Once you’re done installing the OTA and rebooted your phone, you can go ahead and install OrangeFox again.

  63. Having a problem updating as well. I followed the rooting guide here:

    Restore Images succeeds but OTA still fails. The only root apps I’ve got on my phone are Titanium Backup, BusyBox, Trimmer, Root Checker and Magisk. Haven’t done any other system alterations to my knowledge. I don’t need TWRP retention scripts as I’m not installing it permanently anyway.

    Could one of the more recent OTAs have broken this process?

    Is it possible to just sideload the OTA update if I can’t get this working? Where does Mi A2 Lite download the file to?

    Thanks! Love you work!

    1. Hi Andrew. As per the details you have provided, I don’t think any of those apps could trigger a fault with OTA installation.

      At this point, I would suggest you flash the update manually. You can do so by downloading the V10.0.15.0 fastboot image from this link and use the “flash all except storage” script to install the firmware. Please make sure that you take a full backup of all your data beforehand.

      And yes, sideloading the OTA isn’t possible because the stock recovery on the device doesn’t allow it.

  64. i just tried, i rooted with method 1, but at the time to download and install the OTA it always failed to install.

    1. Hi Camilo. Did you follow the instructions as stated? Like installing the TWRP retention module and using the “Restore Images” button in Magisk Manager?

      If you did do it correctly, then I am sure that there’s some modification done to the system, that’s causing this. Did you edit the “build.prop” or any other file for that matter on the /system partition?

    2. thanks for your reply, i have 2 scripts here “/data/adb/service.d” and both of them with following permissions (0775), anything beyond that, i havent touch the “build.prop”

    3. Then you must delete them first. Any kind of modifications to the /system partition will prevent the OTA from installing.

  65. Thanks for the tutorial
    When I was trying to uninstall then I clicked on restore boot image but instead of me to see restoration done the phone just reboot?

    The root is still there

    What would I do?
    Please kindly assist

    1. Hi Seun. Did you flash a pre-patched boot image to root your phone? Please provide more details like your device name, model number, Android version, and build number installed on it?

    2. I got the error “unable to detect target image” when I tried to install magisk in inactive slot after OTA. Am using Infinix note 5

    3. Eluyera, this means that either you’re using a boot image from another device, or it’s extracted from an incremental OTA (and not a full OTA).

      May I know the device name, model number, and Android version running on it?

  66. Thanks for the fantastic tutorial, Dhananjay!

    Unfortunately I had brain fade after a distraction and missed the “DO NOT REBOOT YOUR DEVICE YET!” instruction. I did patch the boot image, the phone is up on Android 10, everything is fine except I lost root (Magisk). Magisk Manager is installed but when I click to install Magisk I get: Select Method – Download Zip only or Select and Patch a file. I have the magisk_patched.img file on the phone and computer.

    Is the solution to connect to computer and fastboot flash magisk_patched.img or what do I need to do?

    Thanks in advance…

    1. I did “connect to computer and fastboot flash magisk_patched.img” and now have Magisk working. Sorry to waste anyone’s time!

    2. Hi again, Ken. You didn’t waste anyone’s time. If the magisk_patched.img was of the currently installed firmware, then it’s great!

    3. Hi Ken. Don’t worry, it’s all good since the OTA installed just fine and only root was lost. Since the phone has been updated, you will need to re-patch the stock boot image of the new firmware that you updated to, and then flash the resultant magisk_patched.img file via fastboot.

      BTW, please let me know the device name, model number, Android version, and the build number installed on your phone.

    4. Sorry Dhananjay, didn’t look back here earlier.

      Pixel 3, Android 10, Build QP1A.191005.007

      All is well, but just discovered that phone lost root after a reboot. I see the instructions to preserve root after the OTA installation, will that work after flashing the images?

      Sure hope we get TWRP back soon!

    5. Hi again, Ken. By “after flashing the images”, do you mean install the OTA, or flashing the factory image?

      Yeah, TWRP lead developer dees_troy is working on it. It’s hard because Android 10 introduced a new implementation of system-as-root with 2-stage-init.

    6. Flashing the factory image. I’ve been doing monthly updates this way for several months on Android 9 and have it down pat!

      Don’t stay up all night over this!

    7. In that case, you will need to re-root first using Magisk.

      You can use Method 2 in this guide. As for the boot image, you can get by extracting it from the corresponding factory image from here.

      Once you have rooted your device again with Magisk, the OTA installation instructions laid above will work again and will allow you to update your phone without losing root.

    1. Yes, of course.

      Preserving root/TWRP is only possible for A/B devices.

      With A-only devices, you will need to restore the stock boot and recovery images first.

      Could you please let me know the exact situation your device is in? I mean the current software version installed, rooted via Magisk or SuperSU, have TWRP installed or not?

  67. Just oustanding. You are an appreciated fellow in the world, and rightly so. Thanks much, and keep it up!

    1. Hi GLIBG10B. Thank you for such kind words. I am glad that the tutorial is proving itself helpful for the readers of my blog. Highly appreciate it.

    1. Hi Hambisch. That’s because you didn’t patch the stock boot image on-device using Magisk Manager yourself, and probably used a patched image from someone else.

      In such a case, simply download the stock boot image (corresponding to the software version installed on your phone), then flash it using fastboot.

      Please let me know your device name, model number, and the software build number installed on it right now?

    2. Hi can you do a more detailed explanation of what to do if you try to restore images but it says stock backup does not exist? I currently have 10.0.0 (QP1A.190711.020, Sep 2019) installed on my Pixel 2xl and am trying to update to 10.0.0 (QP1A.191005.007.A1, Oct 2019) I do not have TWRP installed, just rooted with magisk. I tried flashing both boot images but neither worked. Should i have done somthing prior or just put the phone into fastboot mode? If it did work correctly then what would my next step be? I still have the same message from magisk.

    3. Hi Trevor. Did you flash a pre-patched image provided by someone else on the web? You didn’t self-patch the stock boot image via Magisk Manager did you?

  68. Concise, direct, beautiful. Thanks!!
    Do we know whether Android 10 will interfere with this easy method during the next OTA?

    1. Hi Steve. Thanks for the appreciation.

      As for your question; since Magisk now fully supports Android 10 (except for A-only devices with System-as-root like Galaxy S10 series, Note 10 series, etc), this method will work without any issues.

      For A-only devices with System-as-root, according to developer topjohnwu, the next stable Magisk version will fully support them as well.

  69. Very well written as always Dhananjay. I’m using this method of the last 2 OTA updates and it’s working fine. The only difference is I don’t have TWRP so I skipped step #4.

    1. Hi again, Kevin! Thanks for the kind words. I am glad it proved helpful to you.

      I thought it would be good idea to unify the instructions for users who have followed either of the two installation methods (Either flashing the Magisk zip using TWRP, or flashing the patched boot image).

      If you see any scope of improvements or have any suggestions, do let me know.

    2. Hey mate running TWRP and Magisk on stock S9+ and this device is only a (A-only partition)? So my question is what should i do as I’m expecting the android 10 update and would love to check if i have received it yet.

Leave a Reply

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