yashsingh1/xdaforums huggingface dataset:
[Google Pixel 6] V0latyle:
Magisk Stable is now at version 24.1, so I will no longer be providing any Magisk updates.

You can use any version of Magisk now - Stable, Beta, or Canary. as long as it is 23016 or newer.

Once again, if you want to switch versions of Maagisk, it is HIGHLY RECOMMENDED that you "Complete Uninstall" within Magisk before installing the new version. Multiple instances of Magisk can break root.

If you simply want to update Magisk, the best way to do so is from within the app.

Once the February update is out, I will perform some testing with installing to inactive slot, and if it works, I will update this guide.

Given the low activity on this thread, I will probably close it if everything goes well with the next update.

Thank you all for your testing and contributions.
[Google Pixel 6] awesomeo3000:
I followed the instructions, but I am unable to take OTA updates. It just says "installation problem." Then when I tried repeating the steps for SQ1D.220105.007 factory image, it gets stuck on the "G" screen at boot, so I had to revert back to the patched SD1A.210817.036.A8 boot.img. I also tried reflashing the original unpatched SD1A.210817.036.A8 boot.img to take the OTA, and that still says "installation problem."
[Google Pixel 6] awesomeo3000:
I was about to try the Android Flash Tool, but I noticed that it says it will lock the bootloader as part of the process, and there's no option to uncheck that. I also don't see anything that looks like a "Skip reboot" box. I thought that if we lock the bootloader while the phone is rooted, it gets bricked? Here's a screenshot of what I see in the AFT.
[Google Pixel 6] capntrips:
Before clicking "Install Build", click the pencil icon to see the flashing options.
[Google Pixel 6] V0latyle:
If you try the factory update method, extract and patch the new boot image. You are using Magisk 24.0, correct?

You missed a step. There's a little pencil icon you have to click when you're selecting the build. That opens the options menu where you can select "Lock bootloader", "Wipe data", "Force flash all partitions", etc. There is no skip reboot option; to do that you have to manually flash via ADB.
[Google Pixel 6] awesomeo3000:
I am using Magisk 24.1. I got it to work by downloading the latest OTA and using your OTA sideload instructions, then recreated the master root image and reflashed. All this got my root back and I started with a fresh wipe.

Any ideas why the regular OTA download wasn't working? If it worked as expected, I wouldn't have to wipe the phone every time, right? If I'm able to just download the OTA from Settings, Updates, and then boot the master root image, all apps and configs on the phone stays preserved?

And good call on the AFT. If I uncheck the wipe data and lock bootloader, will that mess anything up for the updates? I really don't want to wipe every time.
[Google Pixel 6] V0latyle:
You should never have to wipe your phone. Automatic OTA is iffy with a patched boot image. You can try "Restore Boot Image" in Magisk, then download OTA, then select "Install to inactive slot" before rebooting.

Or, you can sideload the OTA, let it boot, reboot to bootloader, temp boot a previously patched image, and perform Direct Install in Magisk.

Nope.

The way I prefer to update is by flashing the factory zip. We will see what happens with the February update to see if OTA root really is fixed in Magisk.
[Google Pixel 6] capntrips:
The OTA from System Update is a delta OTA, so it compares the hashes of the partitions in your active slot to those expected of a completely stock system. If you are rooted, you'll first need to restore your boot partition. If you're on older builds of Android and Magisk, you may need to restore your vbmeta partition. One person claimed their bootloader and radio partitions being out of sync prevented them from taking the OTA.

You can filter your logcat for update_engine to see what partition is preventing you from updating, but if you're going to plug into a computer to check that, you may as well just flash the build manually.

For more detail on taking an OTA, see Magisk's OTA upgrade guide for devices with A/B partitions:

OTA Upgrade Guides

The Magic Mask for Android

topjohnwu.github.io

The note and linked tweet at the top of that page are now out of date, as of build 23017.
[Google Pixel 6] awesomeo3000:
I considered flashing the factory zip, but didn't want to mess with the bootloader and radio since that's in the brick zone.
[Google Pixel 6] gazdajezda:
Is this method succesfully tested with Android 12? The most simplest one.
[Google Pixel 6] Nimueh:
I've posted "my" easiest way Thursday, and someone posted theirs as a response to mine.
[Google Pixel 6] V0latyle:
Simply follow the directions exactly as written and you won't have any problems.

I'm not sure, but per @capntrips post above, it makes sense. More detailed instructions:

Prior to downloading OTA, open Magisk, tap Uninstall, tap Restore Boot Images. Do not reboot.

Manually start the OTA download: Settings > System > System update > Check for update or Download and install

When prompted to reboot to complete the update, do not reboot. Open Magisk, tap Install in the Magisk section, select "Install to Inactive Slot (After OTA)", tap Let's Go. Allow it to reboot your device when prompted.

You should reboot into updated system with root.
[Google Pixel 6] gazdajezda:
Ok, i guess we will know for sure soon. I started it, now downloading update... If i not came back in an half an hour, it was a failure 😁
[Google Pixel 6] V0latyle:
Don't worry, if the OTA fails the device will simply reboot back into the non-updated slot.

If root fails, you'll be updated but just without root.
[Google Pixel 6] gazdajezda:
Just a little bit... Instaling updates now.
[Google Pixel 6] gazdajezda:
Gosh... On 2/3 of Optimizing your device...
[Google Pixel 6] gazdajezda:
I type this from computer :( It finished and after that i install Magisk to other (inactive) slot and reboot. It's been stuck on rainbow G with line sponning form left to right for some 15 minutes now. I think it won't boot. What can i do now?
[Google Pixel 6] gazdajezda:
I managed to boot it, aparently from other slot with old unpatched boot image so update to latest version was not succesfull. I will root it back now, but i'm afraid that it will again start downloading / installing it. I have disabled this option "Developer options / Automatic system updates" IS disabled. But it already show that updates are ready and i think it will start downloadaing it / installing after as soon i will turn on Wifi. Ahhh...

I used Magisk 24101, is that version ok?
[Google Pixel 6] manjaroid:
To update from Canary 24101 to Stable 24.1 it's not clear to me if just switching channels is enough. Uninstall first?
[Google Pixel 6] V0latyle:
Yes - but do it from within the app. Select Complete Uninstall. Magisk will restore your boot image, remove itself, then reboot your device. After it does so, install Magisk Stable. From here, you can either manually re-patch the factory boot image with Stable, or you can live boot a previously patched boot image (it won't matter if it was patched with Canary) for temporary root, then perform Direct Install within Magisk.
[Google Pixel 6] manjaroid:
Got it. Think I'll wait for the next OTA. In any case, your time and instructions are much appreciated!
[Google Pixel 6] proac:
Do I need to restore the boot image first and then execute Complete Uninstall? Or directly select Complete Uninstall, magisk will automatically restore the boot image? thank you
[Google Pixel 6] V0latyle:
Just Complete Uninstall, Magisk will restore the boot image.
[Google Pixel 6] halcykon:
I'm having a weird bootloop issue that I can't find an answer for...

If I simply boot the magisk-patched boot.img (./fastboot boot), it will reboot, go into "Preparing for Ram dump", then boot normally; as if I did not just tell it to boot the patched version. (I'm guessing this means that something about the patched version that is causing issues)

If I flash boot the magisk-patched boot.img, I will enter bootloop. It will flash the Google logo, then flash "Preparing for Ram dump" in red.

I'm not sure what I can do here.

I've tried using both Magisk stable 24.1 and Magisk Canary to patch the boot.img

I tried both verified boot and disabling it
[Google Pixel 6] V0latyle:
None of that is normal. Are you on the stock firmware? Are you sure you're using the correct image for you device? Are your Platform Tools up to date?
[Google Pixel 6] halcykon:
Hmm.

- I've been flashing with the lastest public stable version on Android Flash Tool

(SQ1D.220105.007 (8030436))

- I have been using Oriole Factory Image

12.0.0 (SD1A.210817.015.A4, Oct 2021)

- I downloaded platform tools yesterday

r32.0.0-darwin

Maybe it's the wrong image? I just realized the latest updates are listed on the bottom. Should I be using OTA? Does it matter which carrier version it's in? (Mine was from the Google store though so I would imagine it's not tied to a carrier).

Typing this out, it could be because I have flashed a 01/2022 stock version and am patching an 10/2021 version...
[Google Pixel 6] V0latyle:
Most likely. The December update for the P6 platform broke a few things, including Magisk patching, so Canary 23016 and newer has a fix. I don't know if newer versions of Magisk handle the "old" P6 image properly. The problem with using an older verison of Magisk is it doesn't preserve the boot image header, so the device won't boot unless verity/verification are disabled.

Your best bet is to patch the latest update, don't bother trying to use anything older.

Here is the January factory image.
[Google Pixel 6] halcykon:
Solved it! This was the issue. I needed to download the latest factory image. Thanks @V0latyle !
[Google Pixel 6] c19932:
Hey guys I have a general question.

I am using Android Flash tool to update. If I checked "Force Flash all Partitions" and uncheck "wipe device", would it still wipe my data partition? the description of force flashing all partitions implies that it would force wipe all parititions. Thanks!
[Google Pixel 6] V0latyle:
Yes. Generally the only time you'd need to force flash all partitions is if you're coming back to stock from a custom ROM that repartitioned your device...or if something got corrupted.
[Google Pixel 6] dilruk:
Have you tried the Automatic OTA and install yo inactive slot yet? Just t got the February update notification. Not sure how best to continue with it since I'm rooted.
[Google Pixel 6] V0latyle:
No...I'm currently trying to recover my wife's device because she didn't listen to me, and rebooted it when prompted.
[Google Pixel 6] dilruk:
Oh that's unfortunate. Will wait for some feedback from you.

TIA
[Google Pixel 6] airtower:
I took a shot at this earlier. Restored images from Magisk, took the OTA and let it fully install, installed Magisk to inactive slot, and rebooted.

First reboot, no update. Flashed again to the inactive partition (log still indicated stock boot image) and rebooted - oddly magisk didnt reboot automatically, I had to set it off manually. Device then would not boot and would just load to a screen allowing me to try again, or factory reset.

I changed the boot slot from a to b and the device is back up, but still no OTA. Any idea where I might have gone wrong? Using newest canary.
[Google Pixel 6] V0latyle:
Well, I learned what NOT to do...

Her Pixel 5a updated and rebooted; I then attempted to switch to the previous slot and boot in hopes I could restart the OTA process. Failed to boot. Dirty flashed factory image on that slot, still no boot (no valid boot slot). Switched back to updated slot, still no boot. Dirty flashed January factory image to both slots, still no boot.

What ended up recovering the device was sideloading the OTA. No idea why.

Allowed update to complete, then rebooted to bootloader, live booted patched image, used Direct Install in Magisk.

My Pixel 5 insisted it was up to date despite being on the January firmware so I dirty flashed the February factory image.

Sorry I wasn't able to test the inactive slot root.
[Google Pixel 6] dilruk:
Hmm

I'm confused on how to continue. Should I restore images and take the OTA?
[Google Pixel 6] capntrips:
I managed to take the February update using the latest canary, fwiw.

I know of two things that will prevent the update from completing after a reboot, clicking restart inside of System Update or rebooting before the Optimizing Apps step completes.

Also, I always have to click the reboot button after flashing to the inactive slot. I've never seen it reboot automatically.
[Google Pixel 6] tom1807:
Worked for me perfectly that way.

Took ages until the "Optimizing your device" was finished, didn't reboot, patched with Magisk, rebooted and device booted without issues.

Root was preserved, Netflix still shows I am on Widevine L1 - HDR 10 - HEVC

Cheers

Tom
[Google Pixel 6] jackowy:
Did the same (but Pixel 5). Exact same behavior as on your end.

Did you check the build number (ye I think you did… ;-) ) just to be sure?
[Google Pixel 6] tom1807:
Honestly, no, I didn't, I assumed it would be updated. :D

But now I checked, Build Number is SQ1D.220205.003

Cheers

Tom
[Google Pixel 6] V0latyle:
It wasn't the OTA that caused the problem.

Here's what you should do:

Restore boot image in Magisk

Download the OTA, DO NOT REBOOT when prompted

Go back into Magisk and install to inactive slot; Magisk will reboot your device

You should reboot into the February update with root

Note: you MUST use Magisk 24. I don't remember what version of Canary incorporated the inactive slot feature.
[Google Pixel 6] dilruk:
I did exactly this but it rebooted to the same Jan update with root. I think I panicked and tried complete uninstall in magisk and I got a boot failure. Then I did a factory image flash to February update and still got a boot failure. With no hope I switched the boot partition and viola.. I'm on February update but without root now. Not sure what went wrong and not sure whether I should root back. Just don't want to lose all my data.

Trying to figure out what I should do next.
[Google Pixel 6] V0latyle:
Yeah, you don't want to perform complete uninstall, especially if you just installed the OTA. What you essentially did was restore the January boot image after installing the OTA, so when the system rebooted, it saw January kernel and February system, and went "WTF LOL"

If this happens again, don't worry about switching slots - just boot into recovery and sideload the OTA. I don't know why sideloading the OTA works but factory flashing doesn't when there's a boot issue.

Since you already downloaded the February factory image, extract the boot image from that, patch it, and flash it.
[Google Pixel 6] airtower:
FWIW the outcome was the same for me, although I did NOT completely uninstall Magisk. When it rebooted back to rooted January, I installed to inactive and rebooted again but the second time I got a boot failure.
[Google Pixel 6] dilruk:
LoL I get it now. Thanks man! Appreciate it. I think I almost got screwed. Will flash the patched image now.
[Google Pixel 6] V0latyle:
It helps to understand how the A/B update process works.

Assuming system is on slot A, the OTA is downloaded and installed to slot B. System then instructs bootloader to load slot B on reboot.

If loading slot B is unsuccessful for any reason, system will mark that slot "unsuccessful boot" and reboot to the original slot (in this case, slot A). If you try to reboot to slot B, you'll still get a boot failure.

So, this is what you should have done after being reverted to rooted January:

Restore boot image (again)

Initialize OTA download (again)

When OTA process requests a reboot, go into Magisk and install to inactive slot

Device should reboot into updated slot with root
[Google Pixel 6] airtower:
Is there way to reset the updater? I don't have the option to restart the OTA from scratch, only the option to reboot. I haven't tried it there, but reboot through the power menu just takes me back to rooted January.
[Google Pixel 6] V0latyle:
What happens when you go to Settings > System > System Update > Check for updates?

You can also download and sideload the OTA, but you'd have to use a payload unpacker to extract the boot image, so for the time and bandwidth spent downloading a large file you might as well use the factory image.
[Google Pixel 6] airtower:
Just gives me the option to "Restart Now". Same thing you get if you'd downloaded the OTA and let the system optimize.

I was planning on just patching and flashing the full factory image later this week, but getting a hold of a PC with platform tools is challenging for me at the moment.
[Google Pixel 6] V0latyle:
Okay. Open Magisk, perform Install to Inactive Slot, then go back to the update menu and select Reboot Now.
[Google Pixel 6] airtower:
Restart failed, but it then gave me an option to restart installation. This of course failed as my boot image is altered, but it seems I'm to the "original" state.
[Google Pixel 6] dilruk:
All of this is really confusing. My previous OnePlus was the phone with least hassle when it comes to keeping up with root and OTAs. Atleast from my experience
[Google Pixel 6] V0latyle:
Did you restore your boot image in Magisk?
[Google Pixel 6] Galaxea:
I followed this exactly and OTA still said "Can't install..."

I then did a full uninstall of Magisk (which triggered a reboot) and now I am in a bootloop to the GOOGLE logo and then it restarts again. Any ideas on what to do next please?
[Google Pixel 6] airtower:
No, not in a situation right now where I can risk getting stuck with a boot failure again. I may try and run the procedure again tonight, but no reason to expect the outcome to be any different as the steps I followed are the ones specified in the OP. I'll probably just flash the whole image tomorrow.
[Google Pixel 6] V0latyle:
Sideload the OTA.

The OTA should succeed, and the worst that will happen is you'll be without root.
[Google Pixel 6] airtower:
Even with restored boot, the OTA now fails to install. Factory flash it is.
[Google Pixel 6] V0latyle:
That's frustrating. Sorry man. This crap can never just be simple and easy
[Google Pixel 6] Galaxea:
I can't get into Recovery mode to do OTA as it bootloops when I select Recovery mode.

How do I force it to boot to other slot, or do you have another suggestion please?
[Google Pixel 6] V0latyle:
Without a PC, there's nothing else you can do.

You can change slots via platform tools:

fastboot --set-active= <a or b>

You could also try reflashing the factory boot image, but at that point I would suggest you simply sideload the OTA.
[Google Pixel 6] Galaxea:
I am now at the "your device is corrupt" prompt.

Please let me know the steps to flash factory boot image (or anything else that I need to do).

I have the latest OTA and factory image downloaded.

I did this last month when the January patch caused the same issue, but I can't for the life of me remember the steps exactly! Thanks.
[Google Pixel 6] V0latyle:
In the OP, follow the instructions for "Initial Root", but instead of patching the boot image, just flash it. Then, use fastboot continue to try to boot.

If that's not successful, follow the instrutions to update using the factory image, but skip the root part for now. Or, use Android Flash Tool.

If THAT doesn't work, sideload the OTA.
[Google Pixel 6] capntrips:
Those without access to a PC, if you have a second rooted phone, you can still use the flash tool. You may be able to do the other methods in a similar way, but I didn't test those.

I tested it by installing the ADB and Fastboot module and running su and adb start-server in Termux on a Pixel 6, directly connecting it to a PIxel 5a, and setting USB to be controlled by the 5a. With that configuration, I was able to flash the latest firmware to the 5a from the 6.

It gives a wrong browser warning in Chrome, but I was able click Continue Anyway. During some of the reboots, I had to set USB control back to the 5a and reselect it from the list, and the UI was obviously intended to be used on a larger screen, but it worked.

Edit: I got so wrapped up in getting the flash tool to work, I forgot about root. I was able to download the factory image and extract the boot.img from it on the 5a, patch it with Magisk, then in Termux on the 6 with the 5a connected and in control of USB, I ran adb pull /sdcard/Download/magisk_patched-24102_xxxxx.img, adb reboot bootloader, and fastboot boot magisk_patched-24102_xxxxx.img. Then I direct installed Magisk from the Magisk app when the 5a booted.
[Google Pixel 6] Galaxea:
Thanks for your help.

The Android Flash Tool was the only one that worked.

I have re-rooted again, but since moving to the Feb update (even before rooting) my phone will freeze (even power button doesn't switch off the screen) every 5 minutes. I either have to reboot or it reboots automatically.

I hope that I am the only one with this issue.

I will try to re-flash the JAN factory image again now to see if it fixes anything.

Whilst I was typing this I see it switched itself off completely!

Do you think all my attempts today to fix it caused the issue? Surely flashing the whole factory image from AFT would have overwritten anything I would have flashed earlier??

Update: It is useless now. Keeps hanging... then rebooting itself a few minutes later.
[Google Pixel 6] V0latyle:
I think your best bet is to do a complete clean install using Android Flash Tool, and force flash all partitions. Unfortunately this will wipe data, but it's the only way to get a truly clean installation.
[Google Pixel 6] Galaxea:
I ended up doing a factory reset and it seems to be fine now (back on Jan update).

I am doing the OTA before I root this time. Taking forever to install the Feb update...
[Google Pixel 6] V0latyle:
Yeah, it took a long time on my wife's phone too.
[Google Pixel 6] Admiral2145:
I downloaded the January zip and extracted boot image... Where do I place it so magisk will uninstall and restore stock image?
[Google Pixel 6] airtower:
Dumb question, but those having weird issues with the update not applying, do you have automatic system updates DISABLED in developer settings? The way that option is worded has me wondering if it's messing with the active partition setting during reboot
[Google Pixel 6] V0latyle:
Magisk does it automatically, you don't have to put the image anywhere.
[Google Pixel 6] Admiral2145:
Says stock backup does not exist... How do I fix that?
[Google Pixel 6] V0latyle:
Odd.

Download January factory image, extract boot image. Patch boot image.

Flash the unpatched boot image, then boot the patched image.

Download and install the OTA. DO NOT REBOOT.

When prompted to reboot, perform Install to Inactive Slot in Magisk.
[Google Pixel 6] :
Hey, I have tried following the instructions for installing OTA with root. I restore magisk image successful, then go to system update and make it download, after downloading it immediately says "Couldn't Update" "Installation Failed". Now I have installed magisk back using the direct method instead of the inactive slot. And now I'm don't know how to proceed with the update.
[Google Pixel 6] miss:
followed the method, magisk restore image/update ota, don't reboot/open magisk, install magisk on non-active partition(after ota), and reboot. i reboot with root, but in phone info it still shows build 007. the phone says i have an update pending. I don't know what to do
[Google Pixel 6] Galaxea:
After wiping and letting the Jan version do the Feb OTA the way it was intended (unrooted) my phone now only trickle charges using the official Google charger.

I am going to follow your suggestion and flash via AFT with force flash option. Hope this doesn't take 5 hours like it did yesterday...lol
[Google Pixel 6] V0latyle:
Since a lot of folks are having issues with the OTA update, I recommend everyone stick to the methods we know will work for sure - either OTA sideload or dirty flash factory image. In both cases you'll need to manually patch the boot image.