Get March OTA without having to re-install Magisk/TWRP - Google Pixel 3 Questions & Answers

I read some stuff about doing an OTA update with Magisk (v18) on my Pixel 3 (Feb 2019), but I still have a few questions about doing it. I'd rather avoid re-installing TWRP and Magisk from recovery again, and I'd like to be able to do this all without my computer if possible (see planned process below).
1. From what I've read, I should be able to restore a stock boot image to the inactive boot partition (from within Magisk Manager) , then install the Update (both steps 1 and 2), then reinstall Magisk Manager to the inactive boot partition.. And then reboot, and I should have the update, and keep TWRP and Magisk, right? (just looking for confirmation of the process)
2. I never provided a stock image to Magisk when I installed it originally, and I don't have one right now. How do I extract the boot image from the stock image on the Android website?
3. And do I need to indicate to Magisk that I have a boot image, or will it ask me when I go in to restore non-root?
4. Are OTA updates cumulative, or do I need to update the stock boot image each update?
Thanks!

madhattr999 said:
I read some stuff about doing an OTA update with Magisk (v18) on my Pixel 3 (Feb 2019), but I still have a few questions about doing it. I'd rather avoid re-installing TWRP and Magisk from recovery again, and I'd like to be able to do this all without my computer if possible (see planned process below).
1. From what I've read, I should be able to restore a stock boot image to the inactive boot partition (from within Magisk Manager) , then install the Update (both steps 1 and 2), then reinstall Magisk Manager to the inactive boot partition.. And then reboot, and I should have the update, and keep TWRP and Magisk, right? (just looking for confirmation of the process)
2. I never provided a stock image to Magisk when I installed it originally, and I don't have one right now. How do I extract the boot image from the stock image on the Android website?
3. And do I need to indicate to Magisk that I have a boot image, or will it ask me when I go in to restore non-root?
4. Are OTA updates cumulative, or do I need to update the stock boot image each update?
Thanks!
Click to expand...
Click to collapse
Although what you described works for some devices it won't on the pixel. To update and have twrp and root you'll need a pc. If the ota would flash when you have twrp and root, it won't, it would overwrite twrp and the patched boot image. So you're back to needing a pc to get twrp and install magisk.
For your other questions, if you extract the factory image you'll find another zip file in there. That's were the image files are and you need to extract that zip. And, ota's are cumulative so you don't need install previous ones. But specifically to the boot image, a previous months boot image may or may not be the same as the current one, etc.

jd1639 said:
Although what you described works for some devices it won't on the pixel. To update and have twrp and root you'll need a pc. If the ota would flash when you have twrp and root, it won't, it would overwrite twrp and the patched boot image. So you're back to needing a pc to get twrp and install magisk.
Click to expand...
Click to collapse
I'm confused then. Isn't the method I described specifically for a phone with two boot partitions?
The instructions I am trying to reference:
Devices with A/B Partitions
Due to the fact that these devices have two separate partitions, it is possible to have the OTA installed to the inactive slot and have Magisk Manager to install Magisk onto the updated partition. The out-of-the-box OTA installation works seamlessly and Magisk can be preserved after the installation.
After restoring stock boot image, apply OTAs as you normally would (Settings → System → System Update).
Wait for the installation to be fully done (both step 1 and step 2 of the OTA), do not press the restart button!! Instead, go to (Magisk Manager → Install → Install to Inactive Slot) and install Magisk to the slot that the OTA engine just updated.
After installation is done, press the reboot button in Magisk Manager. Under-the-hood Magisk Manager forces your device to switch to the updated slot, bypassing any possible post-OTA verifications.
After the reboot, your device should be fully updated, and most importantly, Magisk is still installed to the updated system!
Click to expand...
Click to collapse

madhattr999 said:
I'm confused then. Isn't the method I described specifically for a phone with two boot partitions?
The instructions I am trying to reference:
Click to expand...
Click to collapse
It is, but it doesn't work on the pixel. Google's security, probably the M chip, but I may be wrong, prevents it from working. In theory, magisk should be able to patch a boot image on your device and you shouldn't need the magisk zip but that doesn't work either. You can certainly try what you're describing but backup at least your data partition with twrp and have it off your device before you try. Get the contents of your internal sdcard to if you have stuff there you don't want to lose.
Most likely restoring the stock boot image and trying to install the ota will just not work, but you never know.

jd1639 said:
It is, but it doesn't work on the pixel. Google's security, probably the M chip, but I may be wrong, prevents it from working. In theory, magisk should be able to patch a boot image on your device and you shouldn't need the magisk zip but that doesn't work either. You can certainly try what you're describing but backup at least your data partition with twrp and have it off your device before you try. Get the contents of your internal sdcard to if you have stuff there you don't want to lose.
Most likely restoring the stock boot image and trying to install the ota will just not work, but you never know.
Click to expand...
Click to collapse
Thanks, I'll back up my files and try that.

Well, as far as I know twrp backups only work for data (with verity and all that). Always bootloop on a vendor or system restore. Back up your data a million times and go for it. Worse thing that happens is back to zero. Wait, you said no computer? Well, put it on a free cloud saving service, have your data backed up out there. Not advertizing for any service in particular, but backing up data is something everyone should be thinking about.
I am about to go for broke on this device for the 4th time. Non boot several times, flashing, flashing, building, flashing. I have the added benefit of figuring out if cell service works as the vendor.img always breaks it. Good times mate.

I might be missing something here, so please clarify if there is a way to "Get March OTA without having to re-install Magisk/TWRP", and how. Wondering about exactly that. Thank you.

madhattr999 said:
I'm confused then. Isn't the method I described specifically for a phone with two boot partitions?
The instructions I am trying to reference:
Click to expand...
Click to collapse
What you have quoted works fine for me. I did both February and March update with this method on my P3 and no problems.
The only thing i noticed is that it takes more than 20 minutes to do step 2 of the instalation (optimizing apps)
But to be on the safe side, please backup.
Another thing: i don't have TWRP recovery, just Magisk root

fronten said:
I might be missing something here, so please clarify if there is a way to "Get March OTA without having to re-install Magisk/TWRP", and how. Wondering about exactly that. Thank you.
Click to expand...
Click to collapse
There is no way to do so. Either side loading the OTA, or fastbooting the factory image, will still require you to install root and twrp. Which, really isn't a big deal at all :good:

Badger50 said:
There is no way to do so. Either side loading the OTA, or fastbooting the factory image, will still require you to install root and twrp. Which, really isn't a big deal at all :good:
Click to expand...
Click to collapse
But the person above you said he was able to do it on both recent updates...

madhattr999 said:
But the person above you said he was able to do it on both recent updates...
Click to expand...
Click to collapse
He doesn't have twrp and if you do have twrp the ota won't work for sure. So you're welcome to try if you're only rooted, no twrp. But patching the boot image and installing it from magisk hasn't worked, but maybe it does now. Let us know.

dracushor87 said:
What you have quoted works fine for me. I did both February and March update with this method on my P3 and no problems.
The only thing i noticed is that it takes more than 20 minutes to do step 2 of the instalation (optimizing apps)
But to be on the safe side, please backup.
Another thing: i don't have TWRP recovery, just Magisk root
Click to expand...
Click to collapse
@dracushor87, can you confirm that the process described by @madhattr999 worked correctly? I have a Pixel 3, rooted with Magisk, without TWRP. I would like to apply the monthly updates as easily as possible: without wiping data, uninstall/reinstall Magisk, etc.
Specifically:
madhattr999 said:
1. From what I've read, I should be able to restore a stock boot image to the inactive boot partition (from within Magisk Manager) , then install the Update (both steps 1 and 2), then reinstall Magisk Manager to the inactive boot partition.. And then reboot, and I should have the update, and keep TWRP and Magisk, right? (just looking for confirmation of the process)
Click to expand...
Click to collapse
I looked through Magisk Manager, and don't see a way to "restore a stock boot image to the inactive boot partition".
In the installed state, I don't see any functions for patching or installing boot images within Magisk Manager.

timg11 said:
@dracushor87, can you confirm that the process described by @madhattr999 worked correctly? I have a Pixel 3, rooted with Magisk, without TWRP. I would like to apply the monthly updates as easily as possible: without wiping data, uninstall/reinstall Magisk, etc.
Specifically:
I looked through Magisk Manager, and don't see a way to "restore a stock boot image to the inactive boot partition".
In the installed state, I don't see any functions for patching or installing boot images within Magisk Manager.
Click to expand...
Click to collapse
Yes, i confirm. Before you start, please check if there is an update available. If there is, restore image, update, reinstall magisk and then reboot. If you reboot without reinstalling magisk, you will lose root. To install on the inactive slot, just click install in magisk manager and then you will be asked what method to use. If what i said is unclear, just requote me

dracushor87 said:
Yes, i confirm. Before you start, please check if there is an update available. If there is, restore image, update, reinstall magisk and then reboot. If you reboot without reinstalling magisk, you will lose root. To install on the inactive slot, just click install in magisk manager and then you will be asked what method to use. If what i said is unclear, just requote me
Click to expand...
Click to collapse
Used this method after the May update finally arrived for me yesterday. Backed up everything just in case, but it worked flawlessly.

Related

[noob] OTA Update procedure with TWRP and Magisk

Hello, I'm still a noob trying to learn, so far with help of this forum I've learned to unlock and root my first android phone, now I'm trying to learn how to properly keep my device updated!
Can someone please give a little rundown to what are the correct steps to update OTA on a rooted twrp device?
I've been browsing the forums a lot but I seem to find a lot of different approaches, or too vague instructions.
It would be greatly appreciated if someone could help me out, step by step, and explain the steps with the commands I need to put in, if there are any.
Thank you
download the ota from here
place it on your phone
go to update on you phone then hit the cog and hit local update
let it up date
reboot to boot loader
fastboot twrp img again
then flash the installer
reboot recovery
then it will boot back in to recovery again
flash root
job done
Hello,
To save you having to fastboot boot TWRP, do the following:
Save the following files to your SDCard:
OTA.zip
Magisk.zip
TWRP.zip
Boot into TWRP
Flash OTA.zip first, then TWRP.zip straight after, then Magisk.zip straight after that, reboot.
@Swatto86 By twrp do you mean TWRP recovery or TWRP installer? I assume that you mean the installer
audinak2 said:
@Swatto86 By twrp do you mean TWRP recovery or TWRP installer? I assume that you mean the installer
Click to expand...
Click to collapse
Sorry yes, put the installer zip on the sdcard
Thank you everyone for the quick replies,
What exactly is it to 'flash' the installer? Is it something I can do from the TWRP screen, just tap on it? Or will I have to put in command prompts?
audinak2 said:
@Swatto86 By twrp do you mean TWRP recovery or TWRP installer? I assume that you mean the installer
Click to expand...
Click to collapse
I have followed this guide https://www.youtube.com/watch?v=Es80k627kTc to unlock/twrp/root, I have a TWRP recovery as far as I know, I'm not sure about 'installer'.
Thanks!
i just download and install the OTA through system updates. Then boot to Trwp recovery and flash magisk . Profit
DampDeceiver said:
Thank you everyone for the quick replies,
What exactly is it to 'flash' the installer? Is it something I can do from the TWRP screen, just tap on it? Or will I have to put in command prompts?
I have followed this guide
to unlock/twrp/root, I have a TWRP recovery as far as I know, I'm not sure about 'installer'.
Thanks!
Click to expand...
Click to collapse
You can flash the installer zip for TWRP through TWRP itself.
Doesn't installing OTA through system settings wipe TWRP? That's why I perform all my updates from TWRP directly.
DampDeceiver said:
Thank you everyone for the quick replies,
What exactly is it to 'flash' the installer? Is it something I can do from the TWRP screen, just tap on it? Or will I have to put in command prompts?
I have followed this guide https://www.youtube.com/watch?v=Es80k627kTc to unlock/twrp/root, I have a TWRP recovery as far as I know, I'm not sure about 'installer'.
Thanks!
Click to expand...
Click to collapse
You have to do twrp/root again after updates. Unlock sticks, but twrp and root don't.
there must be something strange with me then , OTA update doesnt wipe my twrp , i just flash magisk after OTA
Ajaykumar21066 said:
there must be something strange with me then , OTA update doesnt wipe my twrp , i just flash magisk after OTA
Click to expand...
Click to collapse
It prob doesn't overwrite until u reboot so twrp may not have been overwritten on that partition yet, so would make sense, I need to try it out sometime
When you install OTA via system settings and reboot, the slot switches to the inactive one (where the OTA installed to) and boots. This means the previous slot (prior to reboot) still has TWRP installed.
You are probably going direct to recovery after the OTA install without doing a full reboot first.
Swatto is correct. The risk when using twrp is that you must reboot to recovery immediately after flashing the twrp installer zip, or you will boot to the old slot and things will be broken. Rebooting to recovery gets you onto the active, updated slot.
When you reboot to recovery and flash an OTA, you are flashing it to the other slot. The current slot is untouched, while the new active one is completely stock. The twrp installer zip flashes twrp to both slots.
This is the procedure to follow if you want to update via twrp. Personally, I prefer taking the OTA and reinstalling via fastboot just to make sure everything is clean.
lollyjay said:
I have personally tested the following with TWRP already installed and twrp-installer-enchilada-3.2.1-0.zip on your phone:
Download full (not incremental) OOS ROM to your phone and check MD5
Reboot to your installed TWRP
Install the OOS ROM
Do not reboot instead stay in TWRP
Install twrp-installer-enchilada-3.2.1-0.zip
Reboot Recovery
Wipe cache
Reboot System
Click to expand...
Click to collapse
Alright everyone, thanks for all the replies. I have to say even with all your help things were still really confusing for me. I went ahead and ditched TWRP (since I don't really need it anyway), updated OTA through the system, reinstalled magisk before reboot on 2nd slot (the OTA option), and rebooted. And so far all seems fine, I'm on the latest OOS version and I'm still rooted, everything seems to work. Can I do this again in the future and completely overwrite my TWRP installation on my A slot?
I kinda went with TWRP as it's supposed to be more safe for noobs but it ended up making things a lot more difficult to manage.
Thank you
DampDeceiver said:
Alright everyone, thanks for all the replies. I have to say even with all your help things were still really confusing for me. I went ahead and ditched TWRP (since I don't really need it anyway), updated OTA through the system, reinstalled magisk before reboot on 2nd slot (the OTA option), and rebooted. And so far all seems fine, I'm on the latest OOS version and I'm still rooted, everything seems to work. Can I do this again in the future and completely overwrite my TWRP installation on my A slot?
I kinda went with TWRP as it's supposed to be more safe for noobs but it ended up making things a lot more difficult to manage.
Click to expand...
Click to collapse
I have not tried that method as I want twrp, but that is the recommended approach.
I know things have changed with twrp, but it's not that hard once you get used to it. You just have to remember that your phone will switch active slots every time it gets an update or you flash an ota (for example, to go back to stock), so twrp, etc, have to be installed on the other slot before you boot to it. Once you get comfortable with that idea, the rest of it is pretty easy.
Well, I am glad to read this post. Its always interesting how things can be slightly different in every phone manufacturer's setup.
After my lady Huawei device (Honor 6x), I did not want to have to deal with their style of... Control over their devices.
And things seem much easier here, while also being a little confusing right now. I don't fully get the slot a/b stuff yet but it sounds like it's a system to ensure stability on the phone in cases where the newest update could install incorrectly the alternative slot has a backup to ensure the device will function.
Sorta sounds like the dual bios setup on some motherboards. It's good!
Right, so to summarise to ensure I got it right:
1) Downloaded large (1gb+) ota zip from one of these threads, official twrp recovery installing zip, new version of magisk recovery installing zip
2) in recovery install all 3 of those zips in that listed order
3) reboot to recovery again to ensure twrp is still installed
4) profit
Which twrp thread should I take the zip from? There are a few different threads. I shouldn't care about the fastboot version when I already have twrp installed, right?
Either way, it can be much easier than what I had to do on Huawei phones. (currently the easiest phone I used for customisation like this was Nexus 4, but gladly OP6 is getting pretty close to that same level).
Sent from my OnePlus 6 using XDA Labs
You're best off downloading from the official twrp site. If you already have it installed, no need to use the fastboot boot method. You should to reboot to recovery in between flashing twrp and magisk to be sure magisk gets installed on the active slot.
Swatto86 said:
When you install OTA via system settings and reboot, the slot switches to the inactive one (where the OTA installed to) and boots. This means the previous slot (prior to reboot) still has TWRP installed.
You are probably going direct to recovery after the OTA install without doing a full reboot first.
Click to expand...
Click to collapse
Question, more of a scenario really. So if I'm on slot A and have TWRP and Magisk installed, would it be alright to just do a local update and reboot, giving me a perfectly clean install in slot B? Does it work that way? Thanks!
I'm actually using a 6t, but worst case scenario I just use the MSM Download tool, still I wanna get the hang of these confusing A/B devices.

Stock: Install official OTA and keep root

Just learned of this method from a Reddit user - https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
Sharing here.
Neffy27 said:
Just learned of this method from a Reddit user - https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
Sharing here.
Click to expand...
Click to collapse
I also followed this guide a couple days ago. Running OPW28.2 with Magisk 16.0 Still working on getting Xposed to work without bootloop.
Neffy27 said:
Just learned of this method from a Reddit user - https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
Sharing here.
Click to expand...
Click to collapse
Will modifiying build.prop will make error
Did you follow the option for Devices that have A/B partitions?
So basically, all I need to do is go into magisk, uninstall, restore images. Then apply OTA update. Once the update displays "step 2", go back into Magisk and Install to second slot?
I tried this method, but when I hit "Restore Images" it says "Stock backup does not exist!". Is there a way of putting a stock boot.img for my current FW in the proper location for it to recognize it as a backup? I tried looking this up but got no helpful solution.
I think if you installed Magisk via Recovery like I did it won't keep a backup of the boot.img. I think it does that only if you install Magisk outside of Recovery, which requires that you have a copy of the original boot.img.
Just get a copy of the firmware for your version, extract and write back the original boot.img via Fastboot and then update the OTAs (assuming you made.no changes to your system partition). Then reinstall the custom Recovery if you want and then Magisk again.
I have tried flashing just boot.img, but it didn't work. Could be adaway changing hosts file? Anyhow I just end up flashing back to stock
(minus clearing userdata) taking a few OTA's then re-reooting. Have been able to keep my data no issues. Takes a while but it's what it takes.
I could not get this to work either.
https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
OTA could not be applied..
I tried to uninstall Magisk completely, and I boot-looped.

Installing OTA after TWRP + Magisk = fail to boot

I'm at my wit's end here. I know I'm probably missing some critical step, but I haven't been able to install any OTAs since installing TWRP and Magisk. Fortunately, I was able to update to the latest TWRP before trying (the one that has working decryption) and backup Boot, the two Systems, and Data. I cannot stress enough how important this is!.
The OTA installer detects the device is rooted (or unlocked, if magisk isn't installed) and downloads the OTA. It then asks to install (which is does while booted to system, presumably to the side (A or B) that isn't updated), and asks to reboot. After reboot, the system fails to boot, then goes to the original OnePlus recovery (with the Chinese characters).
I seem to remember reading somewhere that I needed to shut the phone down instead of rebooting, but that doesn't seem to help. I want to know the correct procedure for updating, but I also want to better understand what is actually going on. I'm guessing the boot image on the other side gets overwritten by the OTA, which then flips you to that side, but I don't understand why it doesn't boot. Non-patched boot.img, I suppose?
These steps worked for me:
1 install ota
2 flash TWRP_A_B_Retention_Script-Magisk.zip via magisk
3 install magisk on inactive slot
4 reboot
RocketGeeezer said:
These steps worked for me:
1 install ota
2 flash TWRP_A_B_Retention_Script-Magisk.zip via magisk
3 install magisk on inactive slot
4 reboot
Click to expand...
Click to collapse
Awesome. I had not even heard of the retention script, but it sounds like exactly what I'm missing.
As for step 3, how do you install Magisk on the inactive slot?
Flapjack said:
Awesome. I had not even heard of the retention script, but it sounds like exactly what I'm missing.
As for step 3, how do you install Magisk on the inactive slot?
Click to expand...
Click to collapse
Open magisk, click the first install option and download that zip. Then a box with four options should appear. Click the last option to install on another slot.
whatthekj said:
Open magisk, click the first install option and download that zip. Then a box with four options should appear. Click the last option to install on another slot.
Click to expand...
Click to collapse
Thanks! Trying now!
Flapjack said:
Thanks! Trying now!
Click to expand...
Click to collapse
No problem. Let me know if you have any issues.
Well, it's different (booting to TWRP instead of stock recovery), but it still didn't work. It booted through the "warning...unlocked bootloader" screen twice, then went to TWRP, though without encryption. I was able to switch the boot slot and get into system again (just as it was before the flash), but I don't know what I did wrong.
The only thing different I did was use the tools under EX Kernel Manager to flash the TWRP retention script, as I couldn't find where Magisk could do that.
**EDIT**
Now when I try to do the OTA, I get a "System update installation failed".
I cleared the cache and tried it again, this time doing the retention zip from inside Magisk > Modules > Add (+ sign) option, which is what I'm assuming you did.
It did the exact same thing. After step four, I rebooted, and it went straight into recovery (without the option to decrypt).
I think you have to root your phone again If you have the chinese twrp you can do it via twrp. Otherwise put tj magisk installer on a USB stick
RocketGeeezer said:
I think you have to root your phone again If you have the chinese twrp you can do it via twrp. Otherwise put tj magisk installer on a USB stick
Click to expand...
Click to collapse
I can install/uninstall Magisk all day long, now that I've put TWRP 3.3.1-30 on. Even after a failed update, where it fails to ask to decrypt, I can still sideload via USB and install it (even though I can't see the internal storage).
Flapjack said:
I can install/uninstall Magisk all day long, now that I've put TWRP 3.3.1-30 on. Even after a failed update, where it fails to ask to decrypt, I can still sideload via USB and install it (even though I can't see the internal storage).
Click to expand...
Click to collapse
Can you lflash the ota image again? And after that twrp and after that magisk again. After that reboot to system again. This worked on my pixel. Not shure if this works on the 7 pro...
Maybe do some research first. There is also a unbrick thread
RocketGeeezer said:
Can you lflash the ota image again? And after that twrp and after that magisk again. After that reboot to system again. This worked on my pixel. Not shure if this works on the 7 pro...
Click to expand...
Click to collapse
I've tried that... several times. I wish it worked.
Maybe do some research first. There is also a unbrick thread
Click to expand...
Click to collapse
I've been doing a lot of research. There are some pretty in-depth threads on reddit how the A/B treble system works. Nothing I didn't already know. It's certainly different than pre-treble, but not rocket science... something is wrong with the phone. I would just like to know what I did wrong in the first place so I don't do it again.
Fortunately, I still have a bootable system with root on my B partition, so I was able to run TB and backup everything, along with all my pictures and such. I'll be restoring it to stock and just going from there. Looks like I don't have any other choice.
Flapjack said:
I've tried that... several times. I wish it worked.
I've been doing a lot of research. There are some pretty in-depth threads on reddit how the A/B treble system works. Nothing I didn't already know. It's certainly different than pre-treble, but not rocket science... something is wrong with the phone. I would just like to know what I did wrong in the first place so I don't do it again.
Fortunately, I still have a bootable system with root on my B partition, so I was able to run TB and backup everything, along with all my pictures and such. I'll be restoring it to stock and just going from there. Looks like I don't have any other choice.
Click to expand...
Click to collapse
Okay I updated just like we do with our pixels when we flash a custom ROM. TW RP flash your ota.zip,TWRP zip, reboot to recovery that will switch slots , because your update just flashed to the other slot, then flash magisk then reboot. That's how I did this last update. Oh and it's got to be the full ota from what I read anyways.

[Guide] Update and Retain Root

*Note* Some people have had success with this, while some others have not. You do this at your own risk.
Prerequisites:
Magisk Manager might need to be unhidden based on reports from some users.
Magisk needs to have a backup of stock boot.img.
Preserve AVB 2.0/dm-verity must be enabled. (Have gotten mixed reports on this it might or might not be needed)
Check the following post if you don't meet the prerequisites
https://forum.xda-developers.com/showpost.php?p=81186247&postcount=73
Update Process
When phone detects update
1. Disable any desired Magisk modules, ex. Edxposed (I usually disable all modules just to be safe)
2. Reboot
3. In Magisk, select Uninstall, press Restore Images
4. Do NOT Reboot
5. Install OTA Update via Settings -> System -> System Updates
6. When prompted to reboot, Do NOT Reboot
7. In Magisk Manager press Install
8. Select Install to Inactive Slot
9. Reboot
10. Enable the Magisk modules one by one
In case of bootloop after enabling a module there are 2 ways that I know of on how to retain root and fix bootloop.
One requires ADB
While phone is stuck in bootloop, connect phone to PC and run this commands via ADB.
adb wait-for-device shell magisk --remove-modules
adb reboot
This will remove all modules and you should be able to boot.
The second way is via fastboot. More information in this thread.
https://forum.xda-developers.com/pixel-4-xl/themes/magisk-modules-disabler-booting-magisk-t3990557
Some information that might help some people.
eg1122 said:
I know some users flash patched boot.img that someone else patched, thus bypassing the creation of a backup. I think choosing or not choosing to preserve avb 2.0/dm-verity also affects if phone will take OTA. I always preserve mine and always patch my own boot.img so I haven't ran into any issues. I'll just have to wait and see what happens on my end once I get the update. This reminds me of some issues some people where getting early on when rooting. Some people had to flash the patched boot.img to both a/b slots and some people didn't. Having both slots with a patched boot will also break the restoring of stock boot.img as Magisk only restores the active slot.
Click to expand...
Click to collapse
If you do it this way you'll be using the patched boot image from the previous update and not the current one.
airmaxx23 said:
If you do it this way you'll be using the patched boot image from the previous update and not the current one.
Click to expand...
Click to collapse
No it doesn't. When you select install to inactive slot it patches the newly installed boot.img that has been installed to the inactive slot. Only reason phone promts you to reboot after an update is to switch slots.
For whatever reason, whenever I would try to do Uninstall - Restore images (in step 3 of the OP), I would get a toast error saying "Stock backup does not exist"
I'm not sure why the expected backup files hadn't been created. I suspect it has to do with the process of manually patching the boot image whilst initially rooting, as suggested in this Git issue.
Anyway, I was ultimately able to work around this, and was eventually able to get Uninstall - Restore images to work.
I wrote about my workaround method here.
pdfruth said:
For whatever reason, whenever I would try to do Uninstall - Restore images (in step 3 of the OP), I would get a toast error saying "Stock backup does not exist"
I'm not sure why the expected backup files hadn't been created. I suspect it has to do with the process of manually patching the boot image whilst initially rooting, as suggested in this Git issue.
Anyway, I was ultimately able to work around this, and was eventually able to get Uninstall - Restore images to work.
I wrote about my workaround method here.
Click to expand...
Click to collapse
Yeah, there needs to be a backed up stock boot img for this to work. Being able to restore images the way stated in the issue would solve this as you could just restore a stock boot.img then continue doing the steps.
So does this work for every update? Just do the steps and it works? Im a complete noob when it comes to this stuff i just follow the write ups and pray!
DemonicMurderer said:
So does this work for every update? Just do the steps and it works? Im a complete noob when it comes to this stuff i just follow the write ups and pray!
Click to expand...
Click to collapse
Yes, it has worked for me all the time. These are the exact steps recommended by topjohnwu, I just made them more readibly available to users. Here is a link to his tutorial.
https://topjohnwu.github.io/Magisk/tutorials.html#ota-installation
This work for the Verizon Pixel 4 XL???
SAMCR02018 said:
This work for the Verizon Pixel 4 XL???
Click to expand...
Click to collapse
Why would you need to since your not rooted with a locked bootloader? Just take the OTA.
Badger50 said:
Why would you need to since your not rooted with a locked bootloader? Just take the OTA.
Click to expand...
Click to collapse
Ok the can the Verizon version get the BL unlocked?
SAMCR02018 said:
Ok the can the Verizon version get the BL unlocked?
Click to expand...
Click to collapse
Nope. Unless you got lucky and they sold you a google version by mistake.
SAMCR02018 said:
Ok the can the Verizon version get the BL unlocked?
Click to expand...
Click to collapse
There is a write up for that.
Does anybody know if this also work with a custom kernel? I thought removing root and let magisk install old (boot) image should reinstall stock boot.img (if magisk first was installed through fastboot with stock kernel). Then i can take ota, patch inactive slot with magisk and then reboot. After reboot i can install custom kernel again througj ex kernel manager app. Does anybody know if this works?
Donric13 said:
Does anybody know if this also work with a custom kernel? I thought removing root and let magisk install old (boot) image should reinstall stock boot.img (if magisk first was installed through fastboot with stock kernel). Then i can take ota, patch inactive slot with magisk and then reboot. After reboot i can install custom kernel again througj ex kernel manager app. Does anybody know if this works?
Click to expand...
Click to collapse
Yes this method works with custom kernel. Magisk removed custom kernel when it restores stock boot.img
When does the dec patch come out, on the 5th?
I just started the process then realized it wasn't out yet so I haven't rebooted. When I go to the step of installing to the inactive slot I get a warning that you should only do this after the ota update - does anyone know if I'll be OK to go ahead with it even though I haven't done the ota yet?
in_dmand said:
When does the dec patch come out, on the 5th?
I just started the process then realized it wasn't out yet so I haven't rebooted. When I go to the step of installing to the inactive slot I get a warning that you should only do this after the ota update - does anyone know if I'll be OK to go ahead with it even though I haven't done the ota yet?
Click to expand...
Click to collapse
I wouldn't do it until the Dec ota comes out and that may be later today or sometime this week. Which is weird since all the other Pixels got it but hey it's Google
in_dmand said:
When does the dec patch come out, on the 5th?
I just started the process then realized it wasn't out yet so I haven't rebooted. When I go to the step of installing to the inactive slot I get a warning that you should only do this after the ota update - does anyone know if I'll be OK to go ahead with it even though I haven't done the ota yet?
Click to expand...
Click to collapse
Since it's not out yet, just do a direct install in Magisk to re-install it
Thanks for this guide !
Does anyone know how to update and maintain root for manually updating using OTA files ? Usually the update takes a long time to reach my phone, so I update using OTA files.
mkpansare said:
Thanks for this guide !
Does anyone know how to update and maintain root for manually updating using OTA files ? Usually the update takes a long time to reach my phone, so I update using OTA files.
Click to expand...
Click to collapse
The other way I update is using full factory images. Once you download the zip, extract it and find and open (via Notepad++ or similar advanced text editor) the flash-all.bat or flash-all.sh (depends on your system), find this line
fastboot -w update
replace with
fastboot update
Basically remove the -w, this will prevent a factory reset (wipe) on your device. Once it is done you will need to patch new boot.img via magisk and flash the newly patched boot.img via fastboot.
Hope this helps!
ps. I recommend to always disable Magisk Modules before updating as they could cause FC
eg1122 said:
Since it's not out yet, just do a direct install in Magisk to re-install it
Click to expand...
Click to collapse
Thanks that worked perfect... Was gonna be a long week without adblocker and lmt pie lol

Question OTA problems, update options and full factory flash

So for some reason the February update doesn't show up for my in system updates.
To update manually, is it better to download the ota from Google's site and flash that or the newest firmware and flash system?
G5-User7080 said:
So for some reason the February update doesn't show up for my in system updates.
To update manually, is it better to download the ota from Google's site and flash that or the newest firmware and flash system?
Click to expand...
Click to collapse
The safest way to update is by sideloading the OTA.
I assume your bootloader is not unlocked; if I am correct, flashing the factory image is not an option.
V0latyle said:
The safest way to update is by sideloading the OTA.
I assume your bootloader is not unlocked; if I am correct, flashing the factory image is not an option.
Click to expand...
Click to collapse
Ah sorry for the lack of details.
I'm unlocked and rooted and pass safetynet / play attestation with safetynet-fix-mod by DisplaX
I found your guide about updating etc in the Pixel 6 forum, and since I didn't know if I could just take feb 06 OTA or if I had to flash all previous ones too I just went with the factory image method.
I updated with the same version as I'm running to see if it would offer me to OTA then et voila it does
After I finished updating and did fastboot boot magisk-patched-boot-image.img it did offer me to OTA even tho I failed safety-net / play attestation (probably since I didnt do magisk direct install yet and was just booting the rooted image)
Which made me wonder,.. are you supposed to uninstall magisk before you even click on "system update"?
I thought you just check for updates first and when it shows one you then uninstall magisk.
G5-User7080 said:
Ah sorry for the lack of details.
I'm unlocked and rooted and pass safetynet / play attestation with safetynet-fix-mod by DisplaX
I found your guide about updating etc in the Pixel 6 forum, and since I didn't know if I could just take feb 06 OTA or if I had to flash all previous ones too I just went with the factory image method.
Click to expand...
Click to collapse
Current updates have all the updates and fixes from previous releases
G5-User7080 said:
I updated with the same version as I'm running to see if it would offer me to OTA then et voila it does
After I finished updating and did fastboot boot magisk-patched-boot-image.img it did offer me to OTA even tho I failed safety-net / play attestation (probably since I didnt do magisk direct install yet and was just booting the rooted image)
Which made me wonder,.. are you supposed to uninstall magisk before you even click on "system update"?
I thought you just check for updates first and when it shows one you then uninstall magisk.
Click to expand...
Click to collapse
Automatic OTA is troublesome when rooted. You don't need to perform a complete uninstall in Magisk; just restore images before you take the update, and make sure that you go back into Magisk and patch the inactive slot before you reboot.
V0latyle said:
Current updates have all the updates and fixes from previous releases
Automatic OTA is troublesome when rooted. You don't need to perform a complete uninstall in Magisk; just restore images before you take the update, and make sure that you go back into Magisk and patch the inactive slot before you reboot.
Click to expand...
Click to collapse
yes, that restore original images thing is what I meant, I'm just sticking to the OTA guide from Magisk, thats why I booted the patched boot img and then direct installed through magisk too instead of just flashing it.
Just since I've never done an OTA update before Idk if it shows that updates are available with magisk installed.
Like, if the "restore images" before OTA refers to before I even click on Settings -> System update to check if theres an upate available or if I can like let it download first and then restore it before installation or smth.
It did show it for me now but that was directly after rebooting from updating with factory images, booting rooted boot image but it was before I even direct installed root through magisk.
@V0latyle
mhh alright... I'm never doing OTA's again.
restored original boot.img through magisk, let the ota do its thine, instead of restart I went to magisk again and did "install to inactive slot" then reboot from magisk.
Except that it just showed "This device is corrupted" and when I pressed continue I was staring at a google logo and nothing happened.
So in the end I had to use android flash tool and wipe my phone cause normal fastboot firmware install didn't work.
Now its working and rooted again but the "This device is corrupted" message doesn't go away.
I even relocked the bootloader through android flash tool before I unlocked it and rooted like normal, but it's still there.
Is that like an addition from the last update? Now whenever I reboot there are 2 screens I have to click away,.. the normal unlocked warning and the corrupted screen.
G5-User7080 said:
@V0latyle
mhh alright... I'm never doing OTA's again.
restored original boot.img through magisk, let the ota do its thine, instead of restart I went to magisk again and did "install to inactive slot" then reboot from magisk.
Except that it just showed "This device is corrupted" and when I pressed continue I was staring at a google logo and nothing happened.
So in the end I had to use android flash tool and wipe my phone cause normal fastboot firmware install didn't work.
Click to expand...
Click to collapse
Shouldn't have had to do that. If this happens just reflash the boot image using ADB. If that doesn't work...
G5-User7080 said:
Now its working and rooted again but the "This device is corrupted" message doesn't go away.
Click to expand...
Click to collapse
Try sideloading the OTA. It appears that the "patch inactive slot" method in Magisk isn't working for everyone. Nothing is actually corrupt, the OTA update engine just isn't happy about something. Either way, wiping data shouldn't be necessary.
G5-User7080 said:
I even relocked the bootloader through android flash tool before I unlocked it and rooted like normal, but it's still there.
Click to expand...
Click to collapse
Don't EVER do this unless everything is 100% stock and the device has been fully wiped.
G5-User7080 said:
Is that like an addition from the last update? Now whenever I reboot there are 2 screens I have to click away,.. the normal unlocked warning and the corrupted screen.
Click to expand...
Click to collapse
Nope, both screens are part of the Android Boot Flow.
Since the inactive slot method didn't work, I suggest sideloading the OTA in the future. Do not interrupt the process or attempt to flash anything. Let the update complete normally and boot; you won't have root. Assuming you already have a Magisk patched boot image handy (it doesn't have to be current), you can then reboot to bootloader and live boot the patched image, then perform Direct Install in Magisk.
V0latyle said:
Shouldn't have had to do that. If this happens just reflash the boot image using ADB. If that doesn't work...
Click to expand...
Click to collapse
welp.. I tried flashing matching (so newest) boot, didnt work
V0latyle said:
Try sideloading the OTA. It appears that the "patch inactive slot" method in Magisk isn't working for everyone. Nothing is actually corrupt, the OTA update engine just isn't happy about something. Either way, wiping data shouldn't be necessary.
Click to expand...
Click to collapse
you mean now? like after im factory reset & rooted I should sideload the same OTA again which I'm on right now?
V0latyle said:
Don't EVER do this unless everything is 100% stock and the device has been fully wiped.
Click to expand...
Click to collapse
Isn't that what android flash tool does?
wiping my device and install stock?
either way I wasnt running a custom rom and of course I don't relock it after I'm rooted.
V0latyle said:
Since the inactive slot method didn't work, I suggest sideloading the OTA in the future. Do not interrupt the process or attempt to flash anything. Let the update complete normally and boot; you won't have root. Assuming you already have a Magisk patched boot image handy (it doesn't have to be current), you can then reboot to bootloader and live boot the patched image, then perform Direct Install in Magisk.
Click to expand...
Click to collapse
So right now I should leave everything as is including the corrupted message, right?
Then when the next OTA comes I do nothing, keep root, no uninstall or restore through magisk, and I just download the newest OTA from google, and do the fastboot sideload thing?
It'll work even though my boot.img is rooted?
And then the OTA will remove root, I live boot my existing (eventually outdated) magisk patchet boot.img, then direct install as usual?
V0latyle said:
Nothing is actually corrupt, the OTA update engine just isn't happy about something.
Click to expand...
Click to collapse
This is slightly frustrating,... thanks for telling my my device is corrupted and making me think its actually bricked... nice going google.
I'm gonna have so much fun doing all the device settings again, cause for some reason restoring google backup doesn't do that.
How would I not hate OTA's after this lol
G5-User7080 said:
welp.. I tried flashing matching (so newest) boot, didnt work
you mean now? like after im factory reset & rooted I should sideload the same OTA again which I'm on right now?
Click to expand...
Click to collapse
Yes. Sorry if it's confusing. The OTA update process can be a bit...sensitive.
G5-User7080 said:
Isn't that what android flash tool does?
wiping my device and install stock?
Click to expand...
Click to collapse
Yes, but only if Wipe device is checked
G5-User7080 said:
So right now I should leave everything as is including the corrupted message, right?
Click to expand...
Click to collapse
Just sideload the OTA. It won't wipe anything and it can't possibly hurt anything.
G5-User7080 said:
Then when the next OTA comes I do nothing, keep root, no uninstall or restore through magisk, and I just download the newest OTA from google, and do the fastboot sideload thing?
It'll work even though my boot.img is rooted?
Click to expand...
Click to collapse
Yes - when you update via system, it checks images for integrity before updating. Sideloading the OTA skips this and just overwrites the images. Doesn't affect user data.
G5-User7080 said:
And then the OTA will remove root, I live boot my existing (eventually outdated) magisk patchet boot.img, then direct install as usual?
Click to expand...
Click to collapse
Yep.
G5-User7080 said:
This is slightly frustrating,... thanks for telling my my device is corrupted and making me think its actually bricked... nice going google.
I'm gonna have so much fun doing all the device settings again, cause for some reason restoring google backup doesn't do that.
How would I not hate OTA's after this lol
Click to expand...
Click to collapse
I can definitely understand the frustration. Suggestion: before you go nuclear next time and wipe your data, post here and see if someone might have a solution. I have a strong suspicion that simply sideloading the OTA would have cleared the corrupted message, you wouldn't have had to wipe data, and you could have just re-rooted. As the great Hitchhiker's Guide to the Galaxy tells us, "Don't Panic!"
Sideloading went without issue, message still there though, but at this point idec anymore, thanks for the help!
V0latyle said:
Just sideload the OTA. It won't wipe anything and it can't possibly hurt anything.
Click to expand...
Click to collapse
G5-User7080 said:
Sideloading went without issue, message still there though, but at this point idec anymore, thanks for the help!
Click to expand...
Click to collapse
The corrupt message is?
Hmm. Sideload again. Reason being is the OTA always installs to the inactive slot, then switches to that slot. If you install the OTA twice, it installs to both slots. Example: you're on slot A. Install OTA -> slot B becomes active, Slot A hasn't been updated. Install OTA again, -> Slot A becomes active.
Just to make sure - you're using Magisk 25.2, yes?
Latest release, yes.
No worky, was on slot a before, so it did ota and switched to b, b wasnt rooted, I rooted it through magisk, did the ota again, so it switched back to a, rebooted, a wasnt rooted as expected and the message was still there.
just to confirm that it actually switched and didnt like ota 2 times without switching, I switched back to b and it was rooted.
Can only guess it only works if the ota actually installs anything, i mean im already on february 5th on both slots.
So I'll try again next month.
G5-User7080 said:
Latest release, yes.
No worky, was on slot a before, so it did ota and switched to b, b wasnt rooted, I rooted it through magisk, did the ota again, so it switched back to a, rebooted, a wasnt rooted as expected and the message was still there.
just to confirm that it actually switched and didnt like ota 2 times without switching, I switched back to b and it was rooted.
Can only guess it only works if the ota actually installs anything, i mean im already on february 5th on both slots.
So I'll try again next month.
Click to expand...
Click to collapse
The message should disappear when you update the OS next month.
G5-User7080 said:
So for some reason the February update doesn't show up for my in system updates.
To update manually, is it better to download the ota from Google's site and flash that or the newest firmware and flash system?
Click to expand...
Click to collapse
what works best for me (!) is downloading the whole factory image, extracting boot.img, patching it using magisk, transferring it back to the pc, and there editing flash-all.bat so it doesn’t wipe data (!) and adding one line to flash the new boot.img directly at the end. reboot to bootloader, run flash-all, done.
Just use PixelFlasher. It will take care of everything, including Magisk patching the boot image. Makes updates using the factory images painless, takes about 5 minutes total.
G5-User7080 said:
hi, umm so this isn't really something for any thread, I just have some questions.
Is it possible to force a full factory flash?
Cause I assume running flash-all.bat from the factory image or using android flash tool does not do that, as it only uses the fastboot update command.
Well, Idk what exactly fastboot update does, but from my old phone I remember that the script to flash stock contains a lot of flash commands for every partition, e.g. fastboot flash boot, fastboot flash system, etc.
So maybe that warning would go away after actually flashing the entire rom over it.
Also while data was wiped at least 2 times, there are three apps that I accidentally disabled a few days ago, and or some reason I couldnt re-enable them, and the weird thing is they are still disabled..
Then for some reason when I restored the google backup after the wipe it didn't apply my settings and only downloaded my apps.
And now I found another thing, sometimes my screen doesnt turn off after the set timeout, only when charging tho, but stay awake in dev settings isnt on..
Additionally the battery level is inconsistent and suddenly jumps up or down a few percent, but the kernel reported level (measured with ACCA) stays consistent, so its not really an issue.
I'll try resetting all app permissions and if that doesnt work all settings i guess, but I really have no clue what mightve caused this.
Especially since none of those happened before wipe / OTA and I only re-installed my apps, loaded their settings from backups and clicked through the settings app.
No new modules or any root quirks.
I'm glad its just my phone, I only really use it for social media and and umm music ig so its not really that much work to set up again, only really annoying thing is to click through everything in settings cause theres no way to back that up meh.
Click to expand...
Click to collapse
@G5-User7080 I'm bringing this to public as discussed in PM.
Yes, you can force a full factory flash. Yes, the flash-all script and the Android Flash Tool both do this - they flash bootloader, radio, and all OS partitions. If you want to be really thorough, you can check the "Force flash all partitions" checkbox, this also requires a data wipe.
I'm not sure why system apps would remain disabled following a data wipe.
The Google One backup isn't able to back up everything. It cannot back up application data, and it does not back up all system settings.
Regarding the screen, I've noticed the opposite with my Pixel 5. I have "Stay Awake" turned off, but despite having my screen timeout set for 1 minute, it turns off and locks after about 15 seconds.
Battery...Not sure what to tell you.
Consumer electronics are cantankerous beasts indeed and fraught with gremlins.
V0latyle said:
@G5-User7080 I'm bringing this to public as discussed in PM.
Yes, you can force a full factory flash. Yes, the flash-all script and the Android Flash Tool both do this - they flash bootloader, radio, and all OS partitions. If you want to be really thorough, you can check the "Force flash all partitions" checkbox, this also requires a data wipe.
I'm not sure why system apps would remain disabled following a data wipe.
The Google One backup isn't able to back up everything. It cannot back up application data, and it does not back up all system settings.
Regarding the screen, I've noticed the opposite with my Pixel 5. I have "Stay Awake" turned off, but despite having my screen timeout set for 1 minute, it turns off and locks after about 15 seconds.
Battery...Not sure what to tell you.
Consumer electronics are cantankerous beasts indeed and fraught with gremlins.
Click to expand...
Click to collapse
I couldnt think of any other way that some apps retain their disabled state, as well as why would the corrupted message stay even after full stock / full OTA on both slots.
Only thing I can think of is that fastboot update does not overwrite partitions that are already the same version.
Do you think enforcing all partitions flash would get rid of the corrupted warning as well?
As for the google one backup,.. it said it would restore settings, even if its not all of them,.. i dont think it restored any.
sound, display, permissions, gestures, gboard, etc, was all different.
G5-User7080 said:
I couldnt think of any other way that some apps retain their disabled state, as well as why would the corrupted message stay even after full stock / full OTA on both slots.
Only thing I can think of is that fastboot update does not overwrite partitions that are already the same version.
Click to expand...
Click to collapse
Pretty sure it does. I could be wrong.
G5-User7080 said:
Do you think enforcing all partitions flash would get rid of the corrupted warning as well?
Click to expand...
Click to collapse
In theory, yes. Google hasn't exactly released any in depth documentation for the Android Flash Tool. Note that force flashing all partitions will include a data wipe but it's worth a try
G5-User7080 said:
As for the google one backup,.. it said it would restore settings, even if its not all of them,.. i dont think it restored any.
sound, display, permissions, gestures, gboard, etc, was all different.
Click to expand...
Click to collapse
Only thing I can think of is you might have selected a backup that was incomplete or something. Google One takes "snapshots" every once in a while, including after you've signed into Google on your device.
Otherwise, the backup just didn't restore completely?
G5-User7080 said:
Only thing I can think of is that fastboot update does not overwrite partitions that are already the same version.
Click to expand...
Click to collapse
Fastboot does but I don't think Android Flash Tool does unless you select "Force Flash Partitions".
I'm pretty sure the information part of "Force Flash Partitions" says "Flash all partitions that are part of the build even if they are up to date (e.g. bootloader, radio) as well as force a wipe".
At least this language leaves me to believe that that Android Flash Tool won't overwrite partitions that are already up-to-date unless you select "Force Flash Partitions".

Categories

Resources