[GUIDE] STEP-BY-STEP Instructions to Install Monthly OTA updates on Rooted Essential - Essential Phone Guides, News, & Discussion

[GUIDE] NOOB-Friendly STEP-BY-STEP Instructions to Install Monthly OTA updates on Rooted Essential PH-1
Introduction: I know there are many threads already posted that answer how to install OTA on rooted devices but unfortunately they get lost in massive threads that are often not NOOB friendly. I do not claim to be an expert but I have spent a long time reading threads and found the method I will detail below the easiest for me to follow on a monthly basis. I will do my best to give credit where credit is due to the original authors but my apologies in advance if I miss anything.
Just to start the prerequisites I have are a Windows 10 PC, Essential PH-1, with Stock OS and stock unlocked Bootloader. I have tried using TWRP in the past but I found this method simpler. I don't know whether my instructions will work for you or not if you already have TWRP installed but I can let one of the experts respond and I will be happy to update the guide based on feedback.
Part 1 - Downloads
Start by downloading the following items and storing them locally on your PC if you don't have them already
Download the latest OTA Monthly build from here: https://www.essential.com/developer/current-builds Note: Just check off that you are looking for "Current Builds" and click "Submit Form" and then click "Download (OTA)" link beneath the newest release you want.
Download the newest stock boot image here from bmg1001's google drive Credit:bmg1001
(FIRST TIME ONLY) Download and install the Windows driver (if you don't already have on your computer) from here: https://storage.googleapis.com/essential-static/Essential-PH1-WindowsDrivers.exe
(FIRST TIME ONLY) Download ADB tool (if you don't have already on your computer) from here: https://developer.android.com/studio/releases/platform-tools.html This link is directly from Essentials site here in their "Before Sideloading" section it is the link entitled "You'll need the latest ADB tool"
To continue you must have developer options USB Debugging enabled which I presume was already done previously if your phone is rooted but if not you must do so before proceeding.
To Enable Developer Options: Settings App> System> About Phone> Scroll Down to Bottom and tap 7 times on the "Build Number"
To Enable USB Debugging: Settings App> Developer Options> USB Debugging (Set to Enabled)
Part 2 - Sideload the OTA Update
DISCLAIMER: This method if done properly should not wipe any of your data, however I take no responsibility and it is always advisable to back up your data before proceeding with any updates if you wish. I will be honest that I have now done this several times and never had any issues.
Unzip the ADB tool (link above in downloads section is for "platform-tools") and save it to a folder easily accesible on your computer (for this demonstration I will use "C:\platform-tools")
Copy the OTA update file to your ADB folder i.e. "C:\platform-tools" and rename it "OTAupdate.zip" (it is not necessary to rename it, just makes this simpler for the guide)
Verify the checksum of the image. I use hashtab which allows you to right click on any file and click properties and see the hashes as a tab in the properties menu. The SHA-256 is listed right under the OTA download link just copy and paste it in to the hashtab to verify
Remove your PIN / Password before sideloading by going to Settings> Security & Location> Screen Lock> Set it to None (this probably isn't necessary I just do it as a precaution)
Plug Essential Phone into computer and make sure that it says USB Debugging Enabled
Open the folder "C:\platform-tools" in Windows File Explorer and hold shift and right click in the window and you select the option "Open Powershell window here" from the context menu (works in Windows 10 can't speak for earlier Windows versions). If you don't see it the first time Shift+right click on a different part of the empty white window and you should see it appear.
Verify your device is properly connected by typing
Code:
adb devices
and you should see your device listed
Type
Code:
adb reboot recovery
Note:If you're unable to use ADB to reboot into recovery, you can use the key combination for your device. While device is off to boot into Recovery mode, press and hold Volume-Up button while pushing Power button to boot.
Your device is now in Recovery mode. An Android logo with red exclamation mark should appear on screen. Hold the Power button, then press the Volume-Up button one time. When the menu appears, select Apply update from ADB.
Run the following command:
Code:
adb devices
Then check that your device shows up with “sideload” next to its name
Run the following command:
Code:
adb sideload OTAupdate.zip
where OTAupdate.zip is the name of the file you downloaded and verified
Once the update finishes, select Reboot system now to reboot your phone
At this point you should have a stock updated essential device but without root. The remainder of this guide will use Magisk to restore your device to root.
Part 3 - Re-root your Device with Magisk
Copy newest boot image from here that you downloaded earlier to a folder directly on your phone. I personally put it in my "Download" folder on my phone so I can find it easily
Open Magisk Manager and click Install>Install>Patch Boot Image
Select the boot image from step 1 and then let Magisk proceed in creating a patched image file
Copy the file "magisk_patched.img" file that Magisk just created from your device back to the computer and put it in the ADB folder "C:\platform-tools"
Plug in phone and open powershell same as before (shift+ right click> Open Powershell window here)
Type
Code:
adb reboot bootloader
to reboot your phone into fastboot
Confirm your phone is in fastboot by typing
Code:
fastboot devices
Then check that your device shows up with “fastboot” next to its name
Execute the command
Code:
fastboot flash boot magisk_patched.img
Restart your phone and you are done! Don't forget to put your phone PIN/Password back if you disabled security in the earlier step.
You should now have a successfully updated phone with full ROOT access with Magisk. I know that this guide seems like a lot of steps but it really goes very quickly, I just tried to be detailed and NOOB-Friendly.
Hope this helps all of my fellow XDA members!! Please share any and all feedback. Thanks!
Full credit goes to this thread for helping me with everything: [GUIDE] Rooting your Essential PH-1

The way I do *updates* is different (not the initial TWRP/ root).
I use the same Essential developer link as in part 1-1. I also have a copy of twrp-installer-mata-3.2.3-0 zip file on my device.
Boot to TWRP, and do a complete nandroid.
Then install the OTA file just like it's any other zip and when it's done, install the twrp-installer-mata-3.2.3-0 zip file. You can simply put them both into the flash queue before starting the flash.
This TWRP installer will install to both slots ensuring that the inactive slot has it installed. Wipe dalvik and then reboot to system which will be in the opposite slot from the one you started at.
The OTA will always flash to the inactive slot and the bootloader will switch to the slot the OTA was flashed to.
The initial boot takes a few minutes. Once I verify the ROM boots correctly, then I reboot to TWRP and flash Magisk. This ensures that Magisk get installed to the same slot that is now active.
I agree it's safer to remove screen pin, so far I have gotten away with never remembering to do that [emoji16]
If the flash fails, the bootloader should just switch you back to the original slot. I would expect that to boot fine, with one exception... The bootloader was changed between 8.1.1 and 9.0. So if you are going between major versions, the original slot will bootloop after the update.
One more note, a pet peeve of mine; when referencing a post that is older, make sure that you review the forums for changes. TWRP might have a required newer release, the methods that once worked may no longer work. If you are not sure or comfortable recovering, then don't be an early adopter. [emoji6]
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

ktmom said:
The way I do *updates* is different (not the initial TWRP/ root).
I use the same Essential developer link as in part 1-1. I also have a copy of twrp-installer-mata-3.2.3-0 zip file on my device.
Boot to TWRP, and do a complete nandroid.
Then install the OTA file just like it's any other zip and when it's done, install the twrp-installer-mata-3.2.3-0 zip file. You can simply put them both into the flash queue before starting the flash.
This TWRP installer will install to both slots ensuring that the inactive slot has it installed. Wipe dalvik and then reboot to system which will be in the opposite slot from the one you started at.
The OTA will always flash to the inactive slot and the bootloader will switch to the slot the OTA was flashed to.
The initial boot takes a few minutes. Once I verify the ROM boots correctly, then I reboot to TWRP and flash Magisk. This ensures that Magisk get installed to the same slot that is now active.
I agree it's safer to remove screen pin, so far I have gotten away with never remembering to do that [emoji16]
If the flash fails, the bootloader should just switch you back to the original slot. I would expect that to boot fine, with one exception... The bootloader was changed between 8.1.1 and 9.0. So if you are going between major versions, the original slot will bootloop after the update.
One more note, a pet peeve of mine; when referencing a post that is older, make sure that you review the forums for changes. TWRP might have a required newer release, the methods that once worked may no longer work. If you are not sure or comfortable recovering, then don't be an early adopter. [emoji6]
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
you know i just finished writing my own guide to do it after i had trouble with the sticky posts. for me, magisk couldnt find the stock boot so i had to pretty much redo it. i did most things with back-to-stock and fastboot. but now i really wanna try your method through twrp. i been using the patched_twrp_magisk_stock.img images which have twrp and magisk in the same image. using your method, in twrp, could i flash the ota, the patched_twrp_magisk_stock.img, switch slots in twrp, flash patched_twrp_magisk_stock.img again, then switch back to the original slot and reboot system? thanks!
this thread has the patched_twrp_magisk_stock.img images
https://forum.xda-developers.com/essential-phone/development/stock-7-1-1-nmj20d-t3701681

@andypiznti
There's no need to manually switch slots. And no reason to flash the TWRP *installer* file twice. The first time it runs, it patches both slots.
IMHO, trying to control slots is what gets people into trouble.
I do pay attention to what slot I'm on before I start though. In TWRP, if you go to the reboot menu, it will tell you. But the way I flash, I stay on the slot I started with. The OTA will always flash to the opposite slot - which should be the inactive slot. Flashing the TWRP *installer* file just once, patches both slots.
Just wipe dalvik (and cache but there is no cache partition so it will error - just ignore the error) then reboot to system like we've done after custom ROMs for years.
The next boot, the bootloader knows to switch to the slot with the newest OS.
After a successful boot, when you return to TWRP, you'll see the slot is the opposite one from when you started. But you didn't need to do any slot switching.
Don't force things. Let the slots take care of themselves.
I also think, there is less likely to be trouble with Magisk and the boot.img, if you boot fully after an update, before returning to recovery to flash Magisk. Remember that both TWRP and Magisk are making changes to the boot.img.
Final thought, unless I seriously misunderstand Magisk, if you rooted using an all-in-one boot.img you won't have a back up of the "stock" boot.img to restore, making the Magisk uninstaller useless. The backup made when installing Magisk is stored on the data partition, not the boot partition. This is why the instructions in BTS tell you to flash the stock boot.img and provide a copy of it.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

The beauty of my method in the OP is you don't need to worry at all about the correct "slots" like you have to with TWRP...

ktmom said:
@andypiznti
I also think, there is less likely to be trouble with Magisk and the boot.img, if you boot fully after an update, before returning to recovery to flash Magisk. Remember that both TWRP and Magisk are making changes to the boot.img.
Final thought, unless I seriously misunderstand Magisk, if you rooted using an all-in-one boot.img you won't have a back up of the "stock" boot.img to restore, making the Magisk uninstaller useless. The backup made when installing Magisk is stored on the data partition, not the boot partition. This is why the instructions in BTS tell you to flash the stock boot.img and provide a copy of it.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
ok that answers a lot. thanks! the guide i made for myself had me flashing the stock image with bts. i was curious about the full boot after an update, i was thinking the same thing in that it might cause problems with magisk, but i also thought twrp would cause problems too. the reason i mentioned switching slots and flashing is the all-in-one img only flashes to one slot at a time, i believe.
heres my guide for reference, its kinda long. but these were the exact steps i followed and was successful. had to flash the img twice, kept rebooting into recovery if i didnt.
Applying OTA for Essential Phone when Magisk doesn't have stock boot
Boot to recovery with Magisk
Back up at least system and boot
Boot to bootloader with TWRP
Extract back to stock (BTS) for CURRENT INSTALLED VERSION, not the update BTS version
Once in bootloader, connect phone->old phone plug, SSD plug
Run flashallnowipe.bat, once bootloader reboots, select Start, unplug phone
Uninstall Magisk like a regular app
Do OTA->settings->advanced->system update
after reboot->reboot while holding volume down until in download/fastboot mode
***REMEMBER!! Flash on the opposite slot of the current slot
***so if im on slot a, flash slot b.
make sure to extract Essential_ADB_and_FASTBOOT.zip in BTS folder then->cmd-here.exe
fastboot getvar current-slot
***
fastboot flash boot_a dec_patched_twrp_magisk_stock.img
fastboot flash boot_b dec_patched_twrp_magisk_stock.img
***Switch to other slot
fastboot --set-active=a
fastboot --set-active=b
***Just to double check, REMEMBER!! Flash on the opposite slot of the current slot
fastboot getvar current-slot
***
fastboot flash boot_a dec_patched_twrp_magisk_stock.img
fastboot flash boot_b dec_patched_twrp_magisk_stock.img
***Switch back to orig slot
fastboot --set-active=a
fastboot --set-active=b
On the phone fastboot menu, select Start, unplug phone
Manager asks if you wanna install it, no, it downloads the wrong one, maybe works now?
Install Magisk Manager->https://github.com/ianmacd/MagiskBuilds
IT HAS TO BE THIS APK, Download any apk version from above github, install
when you open Manager, then download the newest apk, dont update image
Manager and Image update daily, ignore till next month OTA
Click to expand...
Click to collapse

hssxda said:
The beauty of my method in the OP is you don't need to worry at all about the correct "slots" like you have to with TWRP...
Click to expand...
Click to collapse
I don't know what more I could do to make the point it's not necessary to worry about slots in TWRP.
@andypiznti. The all-in-one is Fastboot flashed to either slot one at a time. All of this makes life harder than it needs to be.
My post was suggesting an alternative. Use the OTA, no Fastboot, no PC just have the TWRP installer file I linked so you don't lose TWRP.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

ktmom said:
I don't know what more I could do to make the point it's not necessary to work about slots in TWRP.
Click to expand...
Click to collapse
Well, all of your posts describing your method contains the word "slot" multiple times so it is obviously a relevant concern otherwise you wouldn't have mentioned it. My post did not contain the word even once...
I see no need to use TWRP. What advantage does it have?

ktmom said:
I don't know what more I could do to make the point it's not necessary to worry about slots in TWRP.
@andypiznti. The all-in-one is Fastboot flashed to either slot one at a time. All of this makes life harder than it needs to be.
My post was suggesting an alternative. Use the OTA, no Fastboot, no PC just have the TWRP installer file I linked so you don't lose TWRP.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
oh yes, definitely doing that next time. thanks!! i found this post thats exactly your method in a little less words.
https://forum.xda-developers.com/es...1-1-nmj20d-t3701681/post78194778#post78194778

Jeebus...
We didn't like the other 15 goddamn threads with the same topic...
XDA is cancer

what works for me at the time to flash the patched image was
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
note: i am on pie
thanks for the guide.

Really helped lots, thank you.

January update is out, who might like to patch boot.img with TWRP and Magisk?

kma_29 said:
January update is out, who might like to patch boot.img with TWRP and Magisk?
Click to expand...
Click to collapse
Go to the stock room thread
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

OP, if you want to avoid having to sideload the whole OTA, you can have it done directly by your phone by flashing the stock boot image for the current version that you are one and then updating from the settings (or notification). Then just continue with flashing the rooted boot image for the new update. I feel like that is safer than both TWRP and sideloading the full OTA (in reference to keeping data safe).
https://forum.xda-developers.com/showpost.php?p=76828139&postcount=1264

morphius88 said:
OP, if you want to avoid having to sideload the whole OTA, you can have it done directly by your phone by flashing the stock boot image for the current version that you are one and then updating from the settings (or notification). Then just continue with flashing the rooted boot image for the new update. I feel like that is safer than both TWRP and sideloading the full OTA (in reference to keeping data safe).
https://forum.xda-developers.com/showpost.php?p=76828139&postcount=1264
Click to expand...
Click to collapse
Thanks

@bmg1001 are you still providing the stock boot images on your google drive. I am looking for the Feb stock boot image or can someone tell me how to get it. I tried extracting from the Feb OTA but did not see it listed in that zip

jionny said:
@bmg1001 are you still providing the stock boot images on your google drive. I am looking for the Feb stock boot image or can someone tell me how to get it. I tried extracting from the Feb OTA but did not see it listed in that zip
Click to expand...
Click to collapse
Yep, I have it in the same Google Drive folder where the other month's images are posted.

bmg1001 said:
Yep, I have it in the same Google Drive folder where the other month's images are posted.
Click to expand...
Click to collapse
Sorry chalk that up to me not paying attention. I was looking for it after Jan but its actually the first one listed. Thanks!

bmg1001 said:
Yep, I have it in the same Google Drive folder where the other month's images are posted.
Click to expand...
Click to collapse
Hi one more thing, this is my third time updating and rooting via this method. The last two times worked flawlessly however this time I did update the OTA but when I try to reroot and go to adb devices I see my phone listed then when I reboot recovery it does however when I try fastboot devices my phone does not show and nothing happens, any help will be appreciated

Related

Apply Monthly System Update to Systemless Root ... REALITY CHECK!

Hi everyone
More than a question, I wanted to share some steps I plan to follow to apply the monthly system update and check I am on the right track. I had a Google Pixel 2 for a few months and I am learning more about the model every day.
Previously, I tried to follow different procedures found here on XDA such as applying OTA with boot images temporarily restored but I ended up with a bootloop not event TWRP could fix since all data was encrypted.
Objective:
Update the system to the latest Pixel 2 update (in this case Feb 2018) avoiding bootloops or bricks
Current Status:
Pixel 2 Walleye with Jan 2018 update
Rooted systemlessly with Magisk
No Magisk modules installed
/system modified since I have AdAway and other apps
No BusyBox installed
No Custom Recovery installed
Proposed steps:
Uninstall Magisk completely
Remove root apps from Device Admin (such as Greenify, Tasker, etc.)
Download latest factory image from Google
Extract the following from the image zip:
bootloader.img
radio.img
boot.img
dbto.img
cache.img
system.img
recovery.img​
Restart phone into booloader
Fastboot bootloader.img
Reboot the bootloader
Fastboot the following commands in this order:
radio.img
boot.img
dbto.img
cache.img
system.img
recovery.img​
Reboot phone
Install Magisk by patching boot
Re-run root apps (AdAway, etc.)
Renable root apps as Device Admin (Tasker, Greenify, etc.)
Is the above safe enough to avoid bootloop and also not lose apps and data installed?
I am aware any modifications to /system will be lost.
Have a look, let me know if on track, and if you want, give me your blessing.
Yesterday I used Dueces bootloop recovery script to update without losing anything.
I had magisk + TWRP installed
Download full update not OTA, extract to program tools directory or where you keep your goodies. Pull all factory update in folder with deuces recovery script.
From stk rooted ROM reboot bootloader,
Run dueces script from bootloader
After finished script No to format data
Reboot system when done.
From there you should be good to go, you will need to repatch but image in magisk and all that but i lost no data and had no issues
So I was on 1.171019.019 installed 1.172019.21 from fastboot with script and wiped nothing and lost nothing..
** My directions are probably incomplete so follow his instructions in his OP.
This has been discussed all over the place on the forums but you're over complicating the update process. Here's what you do:
Code:
Download the latest Pixel update
extract the update in your ADB folder on a computer
reboot to bootloader
look for the flash-all.bat and remove the -w at the bottom of that code, Save that file (the -w is what causes the device to be wiped)
run flash-all.bat
once that finishes you can fastboot boot twrp.img
it won't decrypt (Feb update broke TWRP decryption) but go read only and get into ADB Sideload mode
adb sideload kernel.zip
adb sideload magisk.zip
reboot
This is what I've done everytime (minus the adb sideload) and I have had zero issues. No loss of data being the biggest concern. Did this using the march update just yesterday and now I'm good to go.
It is worth saying when you start trying to flash (roms, kernels ect..) and you get a little crazy, Dueces Bootloop Recovery script is 100% something to have on deck if something /does/ go wrong.
nolimit78 said:
adb sideload kernel.zip
Click to expand...
Click to collapse
kernel.zip from where? The OTA? One you saved with TWRP on it?
I currently have TWRP and Magisk (default - nothing changed yet) installed on the February update. Is this going to be a monthly thing - flash the update, reinstall TWRP, reinstall Magisk? Not a complaint, just want to know what I'm doing. (Samsung, for all its faults, was a little easier after 6 years of not even having to look at what I was doing. I'll get comfortable with the Pixel, but this is my first update with TWRP and Magisk installed - it did the February update almost before I could read the screen.)
Rukbat said:
kernel.zip from where? The OTA? One you saved with TWRP on it?
I currently have TWRP and Magisk (default - nothing changed yet) installed on the February update. Is this going to be a monthly thing - flash the update, reinstall TWRP, reinstall Magisk? Not a complaint, just want to know what I'm doing. (Samsung, for all its faults, was a little easier after 6 years of not even having to look at what I was doing. I'll get comfortable with the Pixel, but this is my first update with TWRP and Magisk installed - it did the February update almost before I could read the screen.)
Click to expand...
Click to collapse
The kernel.zip is whatever kernel you'd like to use (flash or elemental) but it's not required. I just rename for shorter commands for ADB Yes, you've hit the nail on the head. If you're going to be stock/rooted, you'll have to do this every month to stay current.
And we're still waiting for Dees_Troy to figure out how to add decryption back to TWRP, so it's reinstall everything - including fingerprints - every month. Oh, well. (Hey, no pressure, Dees_Troy - I appreciate just having TWRP on this thing.)
Rukbat said:
And we're still waiting for Dees_Troy to figure out how to add decryption back to TWRP, so it's reinstall everything - including fingerprints - every month. Oh, well. (Hey, no pressure, Dees_Troy - I appreciate just having TWRP on this thing.)
Click to expand...
Click to collapse
In my process outline, you don't have to remove fingerprints.
To boot to TWRP to handle files that you already copied to the phone? TWRP doesn't decrypt the names any more, does it? So all you see is garbage (encrypted hash, I guess). If I want to restore a backup I have to remove the PIN, which seems to remove the fingerprints. Or are you saying to restore the PIN and the fingerprints are still active?
Rukbat said:
To boot to TWRP to handle files that you already copied to the phone?
Click to expand...
Click to collapse
No, this is only to apply the update and flash a custom kernel and magisk
Rukbat said:
TWRP doesn't decrypt the names any more, does it?
Click to expand...
Click to collapse
No, it sure doesn't. This was caused by the Feb Update
Rukbat said:
If I want to restore a backup I have to remove the PIN, which seems to remove the fingerprints.
Click to expand...
Click to collapse
Yeah, to do anything in TWRP (outside of ADB Sideloading) you'll need to remove the PIN.
And evidently something else. I removed the PIN, updated, and the phone's been sitting on the G screen for half an hour. So I rebooted to the bootloader, locked it, and now I'm flashing 021. I have a bad feeling that I'm going to be stuck.
---------- Post added at 05:09 PM ---------- Previous post was at 04:10 PM ----------
As I feared. So I followed Google's instructions to flash the factory image. It went fine, until I got:
Created filesystem with 11/7389184 inodes and 511894/29553659 blocks
Erase successful, but not automatically formatting.
Can't determine partition type.
FAILED (remote: GetVar Variable Not found)
Click to expand...
Click to collapse
Then it wrote the system, but
writing 'system'...
OKAY [ -0.000s]
sending sparse 'system' (524284 KB)...
FAILED (remote: No such partition.)
Click to expand...
Click to collapse
It never reboots. If I reboot at that point, I get the recovery screen.
If I reboot into the bootloader and lock it, I get the bootloader with "ERROR: LoadImageAndAuth Failed: Load Error" at the bottom.
I was able to load twrp.img and use it to sideload twrp.zip, but that still doesn't get me back to Android. I tried b ooting into A and B and got the same result - TWRP.
What next? Is there a fix, or does this one have to be replaced also?
Rukbat said:
And evidently something else. I removed the PIN, updated, and the phone's been sitting on the G screen for half an hour. So I rebooted to the bootloader, locked it, and now I'm flashing 021. I have a bad feeling that I'm going to be stuck.
---------- Post added at 05:09 PM ---------- Previous post was at 04:10 PM ----------
As I feared. So I followed Google's instructions to flash the factory image. It went fine, until I got:
Then it wrote the system, but
It never reboots. If I reboot at that point, I get the recovery screen.
If I reboot into the bootloader and lock it, I get the bootloader with "ERROR: LoadImageAndAuth Failed: Load Error" at the bottom.
I was able to load twrp.img and use it to sideload twrp.zip, but that still doesn't get me back to Android. I tried b ooting into A and B and got the same result - TWRP.
What next? Is there a fix, or does this one have to be replaced also?
Click to expand...
Click to collapse
Oh my gosh. Stop sending your phone back.
Update your platform-tools. Change cables. Change ports. Use the search function.
Sent from my Pixel 2 using Tapatalk
I'm not exactly new at this. Different cable, every USB port (including a 2.0 port, new download of both Google's driver and adb/fastboot, a new download of the firmware (and the sha256 is correct).
The next thing I'm going to try, as soon as I finish eating, is another computer. If that fails, and I'm pretty sure it will, I'll call Google tech support. Since it happened twice during an OTA, on two different phones, I may be able to get someone who knows how to feed the firmware into a nearly dead phone. I'm just looking for ideas I haven't had, when I post here. I'm about out of ideas. Again.
Evidently some computer manufacturers don't exactly build what they claim to build. My desktop has 2 USB 3.0 ports (which I already knew wouldn't work) and - supposedly - a USB 2.0 port. Flashing the firmware on the "2.0" port didn't work. Evidently it's not 2.0.
So I resurrected an old Windows 8.0 laptop. I think it has 0 cores running at 0MHz - it's SLOW! But it finally flashed the February update. Tomorrow (it's going on midnight here, and the phone is still downloading the last Google backup) I'll update to March.
Madness - but at least I have a working phone, and know how to get it working again if I need to (and have a few lifetimes to do it). And I have another laptop in the closet that actually works. That one gets resurrected next.
So what you're experiencing isn't new or an issue with your phone that you'd need to RMA the device. It's a learning curve because the A/B partitions are a completely different beast compared to older/other Android devices. Use Duece's Bootloop Recovery script to fix your problems. It'll work and you'll be good to go. Just be sure not to wipe. During my testing, I had to figure out all this myself and was /REALLY/ close to RMA'ing my device. But I continued to research and plugging away and found that that script helps users in your situation, as I've been in that very same situation myself.
No, it's a learning curve because, even though the USB ports on the back of the case are labeled 2.0, and have black plastic, they act like 3.0 ports with a Pixel 2. Doing exactly what both I and Google tech support did with the supposed 2.0 ports, on the aging laptop with real 2.0 ports, solved the "problem" that both Google and I were having. The phone was fine, what we were doing was right, the Acer desktop has a documentation error, and that was the only problem. (Even Google didn't seem to be aware of the USB 3.0/Pixel2 incompatibility, which many of the people in the Pixel 2 forums at XDA are.)
Follow the guide in my signature, it works, and you don't have to muck around with removing PINs and fingerprints.
Thanks for paying attention, but what really bothers me is having to remove the fingerprints in order to do a backup or restore in TWRP. I'm used to just booting to it and flashing a backup if I need it for some reason. If only Google would leave the fingerprint file alone when we went to None for the lock screen, just putting the PIN back would bring the fingerprints back. There's really no reason to delete that file. Maybe delete individual prints at the user's discretion (like changing passwords every once in a while), but not delete the whole thing just because I want to back up my current configuration.
What I do is uninstall Magisk. Then do the normal update from the update page in settings. After this I copy Magisk zip file to a usb drive. I boot into twrp using ADB. It doesn't decrypt but that doesn't matter. Use the USB as storage and install Magisk zip file through TWRP. Reboot and you are done updating with Magisk installed.
That sounds like an easy way of doing it, but doesn't the update balk at the patched boot file? Mine balked at something yesterday, which is what started all the mess yesterday. (Or does Magisk have a "remove and replace the boot file" button?)
nolimit78 said:
This has been discussed all over the place on the forums but you're over complicating the update process. Here's what you do:
Code:
Download the latest Pixel update
extract the update in your ADB folder on a computer
reboot to bootloader
look for the flash-all.bat and remove the -w at the bottom of that code, Save that file (the -w is what causes the device to be wiped)
run flash-all.bat
once that finishes you can fastboot boot twrp.img
it won't decrypt (Feb update broke TWRP decryption) but go read only and get into ADB Sideload mode
adb sideload kernel.zip
adb sideload magisk.zip
reboot
This is what I've done everytime (minus the adb sideload) and I have had zero issues. No loss of data being the biggest concern. Did this using the march update just yesterday and now I'm good to go.
It is worth saying when you start trying to flash (roms, kernels ect..) and you get a little crazy, Dueces Bootloop Recovery script is 100% something to have on deck if something /does/ go wrong.
Click to expand...
Click to collapse
Thank you for the feedback!
One question I had for a while: flashing the data.img wipes what? Doesn't it wipe the apps you have installed?

[Guide] Install Magisk on your device, updated to handle OTAs easily

[Update in 1st September 2018] Magisk v17 stable has been released, so the August security update: a new method, more OTA-compliant, is written.
Hi all, this section is quite gaunt, so I'll post my experience on unlocking and rooting my brand new Mi A2 Lite.
I'm not responsible if you make some mistake and accidentally transform your phone in a stone (but it's almost impossible)... <3
How to root
0. You need "debug usb" and "oem unlock" enabled under "developer options" on phone's settings.
1. First, if you don't have already done it, unlock phone's bootloader:
Code:
adb reboot bootloader
fastboot oem unlock
ATTENTION: THIS WILL WIPE YOUR DEVICE, ALL USER DATA WILL BE LOST! And no, when you'll have finish this guide, you can't lock it again (each lock-unlock operation will wipe the device)
2. Download ROM system image from official site. Pay attention to download the corresponding version of your actual OS (look in system settings your current build number).
3. Extract "boot.img" from the just downloaded archive and put somewhere in your device (e.g. in a microSD, just remember where you put it).
4. Download and install Magisk Manager apk.
5. Open Magisk, choosing "yes" when it asks to install Magisk-v*.zip, then choose "patch boot image" and select "boot.img" copied in step 3.
6. At the end of patching process, Magisk will tell you where "patched_boot.img" is been stored, keep a note on it and close.
Now's the updated part, that will make possible to apply OTAs:
7. Copy "patched_boot.img" on your computer, then run this on a terminal:
Code:
adb reboot bootloader
fastboot boot patched_boot.img
fastboot reboot
This will temporarily give you root privileges (until next reboot).
8. Magisk Manager can now make the root permanent: open it and tap "Install", then "direct install (recommended)". This way (instead of flashing directly patched_boot.img) Magisk Manager can remove and reinstall root privileges directly.
9. Just to be sure that your phone doesn't install updates without your acknowledgement, go to Developer Options and disable "Automatic system updates".
Ta-dà! Now you should have Magisk permanently installed (you can check it re-opening Magisk Manager).
-------------------------------------------------------
Time to update? Here's how
If you've followed what is written above, applying an OTA should be quite easy now.
a. Go to Magisk Manager → Uninstall → Restore Images. Do not reboot now or you will have Magisk uninstalled!
b. Now go to Settings → System → System Update and apply OTA. If it fails you've some tweak on system partition that you've forgot to remove, so try to figure it out and retry. Wait for the installation to complete. DO NOT RESTART NOW.
c. Open Magisk Manager again and press Install → Install to Inactive Slot.
d. Reboot and enjoy
-------------------------------------------------------
Troubleshooting
- If your phone seems bootlooping, try to switch it off and on again (sometimes it doesn't start on first boot). If it keeps doing that, donnoh, reflash original "boot.img" and start again!
- For someone seems that Magisk 16 doesn't work well, but since the stable branch has reached 17.0, just use it!
- If you already have rooted your phone in different ways that this one explained here (and you don't have "uninstall" option on Magisk Manager), I suppose that the simpliest way to follow this guide is to reflash factory boot.img and start from the beginning of this post again, but if you figure out alternative ways, post them here!
-------------------------------------------------------
References
https://forum.xda-developers.com/mi-a1/how-to/mi-a1-monthly-updates-t3750419
https://forum.xda-developers.com/showpost.php?p=77448469&postcount=49
https://forum.xda-developers.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654
https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips
Thanks to BubuXP for the efforts that he puts in this thread, helping anyone who's got problem following this guide.
Have a nice day!
If you posted this a couple of hours early, I'd save a couple hours of my life doing other things instead of discovering by myself what you just wrote :laugh:
However, add to your guide to change the update channel in Magisk Manager to "beta" instead of stable, because only starting from 16.7 (the actual beta version) has support to A/B partitions scheme (the one used by our device). When the new stable version of Magisk will be released, that could be removed.
Add also that installing modules isn't possible out of the box, because both Magisk Manager and Android stock lack the unzip binary (I'm searching for a solution).
few minutes has past and Im looking here at endless boot animation:/
so I do fastboot factory flash, did it again and now no issues at all,thanks!
BubuXP said:
If you posted this a couple of hours early, I'd save a couple hours of my life doing other things instead of discovering by myself what you just wrote :laugh:
However, add to your guide to change the update channel in Magisk Manager to "beta" instead of stable, because only starting from 16.7 (the actual beta version) has support to A/B partitions scheme (the one used by our device). When the new stable version of Magisk will be released, that could be removed.
Add also that installing modules isn't possible out of the box, because both Magisk Manager and Android stock lack the unzip binary (I'm searching for a solution).
Click to expand...
Click to collapse
That's weird, (saw also your message in the other thread)I didn't had all these issues and I'm using magisk 16.0 (no beta). I could also install modules out of the box without having to do anything special
Edit : added quote
I had another ROM installed,It was more "light" than this one posted here. Many google app was added after I did flash. My phone should be global version and I buy it from local store. It was ODLMIFF also.
edit:seems that screen cast is not working
kidoucorp said:
That's weird, (saw also your message in the other thread)I didn't had all these issues and I'm using magisk 16.0 (no beta). I could also install modules out of the box without having to do anything special
Edit : added quote
Click to expand...
Click to collapse
That's weird indeed...
I've re-downloaded the fastboot image and I'm flashing it right now, then I will retry patching boot.img
I found an updated 16.7 version in the Pixel 2 XL forum that fixes some weird behaviors other users had., I will try it too.
EDIT 1: I usually do all my operations under Debian Linux. This time I used the Mi Flash tool under Windows, and I patched the boot.img with 16.0.
I don't know what of the two changes fixed the problem, but now it's working without problems (but the first time I tried directly with your boot.img patched with 16.0 and it was not working ).
FYI, sha512 of the old and new fastboot image downloaded were the same, so it was not a problem of defective download.
BubuXP said:
That's weird indeed...
I've re-downloaded the fastboot image and I'm flashing it right now, then I will retry patching boot.img
I found an updated 16.7 version in the Pixel 2 forum that fixes some weird behaviors other users had., I will try it too.
Click to expand...
Click to collapse
Im using 16.0. Also phone sometimes wont boot, stuck at screen with unlocked text or stuck in boot animation. I guess xiaomi is very wrong choice for somebody who want customize his android:laugh:
mik.y said:
Im using 16.0. Also phone sometimes wont boot, stuck at screen with unlocked text or stuck in boot animation. I guess xiaomi is very wrong choice for somebody who want customize his android:laugh:
Click to expand...
Click to collapse
I edited my previous post, just to inform you.
I think those problems arise because the phone is too young, many things have to be fixed by Xiaomi. And also things will get better when the new stable Magisk that will support new Android features will be released.
1st time it bootlooped, I got the screen "Android can't boot, retry or factory reset?". I pressed retry and it booted.
The only bug I'm facing is reboot from the power menu is not working, it never boots (bootloop). Shutdown then start the phone work perfectly. I can live with that
I'm not sure, but apparently I found the culprit.
The only way to make Magisk work flawlessly is following the guide in the first post.
I mean, if I use the patched_boot.img made in another phone it causes always some problems, as if Magisk in the process of patching the boot.img put a signature of the actual phone inside the img and it will work fine only in the same phone that created the patched boot.img
Not only this, but if I flash the phone with the stock ROM via fastboot, and then use the patched_boot.img created previously on the same phone before flashing, it won't work neither (something in the "signature" changes, like it is a new phone).
kidoucorp said:
1st time it bootlooped, I got the screen "Android can't boot, retry or factory reset?". I pressed retry and it booted.
The only bug I'm facing is reboot from the power menu is not working, it never boots (bootloop). Shutdown then start the phone work perfectly. I can live with that
Click to expand...
Click to collapse
Probably using the beta channel with 16.7 could improve your situation. I'm using 16.7 right now, following the OP guide, and it is working great (until now).
BubuXP said:
Probably using the beta channel with 16.7 could improve your situation. I'm using 16.7 right now, following the OP guide, and it is working great (until now).
Click to expand...
Click to collapse
I can confirm that I'm using Magisk stable 16.0, and everything works fine, but I suppose it's because I've flashed booth partition A and B. I've updated the first post anyway, thanks!
kidoucorp said:
1st time it bootlooped, I got the screen "Android can't boot, retry or factory reset?". I pressed retry and it booted.
The only bug I'm facing is reboot from the power menu is not working, it never boots (bootloop). Shutdown then start the phone work perfectly. I can live with that
Click to expand...
Click to collapse
My old Mi A1 does the same too, it's a bit strange but once you know it, you can handle it
It works !!
Device: Mi A2 Lite (4/64GB) global version.
(cpu-z reports: Snapdragon 626 @2.02 GHz)
Using Magisk 16.7 and boot.img from global rom "V9.6.4.0.ODLMIFF (Android O) " (oem rom from xiaomi).
Only difference is the method which I tried and fail initially, was I cmd "adb reboot bootloader" from the PC which doesn't work for me.
It says failed to write boot_a and boot_b.
I had to do the hardware reset to get into fastboot. (pressing vol-down and power button simultaneously).
Once I am in fastboot mode, from the PC cmd execute the following sequence
1. fastboot flash boot_a patched_boot.img
2. fastboot flash boot_b patched_boot.img
3. fastboot reboot
And voila!, it works beautifully. Thanks for all the contributors of this thread
It runs all apps including apps that cannot be rooted. (have to do the "hide" magisk)
So far so good, no issue to be found.
Have a great day people.
eddiechanks said:
Device: Mi A2 Lite (4/64GB) global version.
(cpu-z reports: Snapdragon 626 @2.02 GHz)
Using Magisk 16.7 and boot.img from global rom "V9.6.4.0.ODLMIFF (Android O) " (oem rom from xiaomi).
Only difference is the method which I tried and fail initially, was I cmd "adb reboot bootloader" from the PC which doesn't work for me.
It says failed to write boot_a and boot_b.
I had to do the hardware reset to get into fastboot. (pressing vol-down and power button simultaneously).
Once I am in fastboot mode, from the PC cmd execute the following sequence
1. fastboot flash boot_a patched_boot.img
2. fastboot flash boot_b patched_boot.img
3. fastboot reboot
And voila!, it works beautifully. Thanks for all the contributors of this thread
It runs all apps including apps that cannot be rooted. (have to do the "hide" magisk)
So far so good, no issue to be found.
Have a great day people.
Click to expand...
Click to collapse
Same for me. Just extract the boot.img from the official Xiaomi rom (downloadable from their website), patch that through Magisk manager, and flash the patched .img to boot_a and boot_b using fastboot. Works flawlessly.
Only thing I haven't been able to do is remove the forced encryption. I was able to change the encryption password however using vdc cryptfs.
worked flawlessly, did have to re-install magisk manager after flashing the patched boot images, but all was fine after a quick apk reinstall.
Hi guys,
Sorry for those newbie questions (I come from an old Nexus 5 with Lineage, and I am far from magisk) :
How is going the update ? will it be OTA ? Will it be manual (in this case where do I find the file) ? Do we need to re-root after OS update ?
Thanks in advance !
arnofor said:
Hi guys,
Sorry for those newbie questions (I come from an old Nexus 5 with Lineage, and I am far from magisk) :
How is going the update ? will it be OTA ? Will it be manual (in this case where do I find the file) ? Do we need to re-root after OS update ?
Thanks in advance !
Click to expand...
Click to collapse
The OTA update should be automatic, but I'm not sure 100%
However, after every system update, you have to do the boot patching procedure again but using the boot.img from the new version.
Can I do the unlock part and the rest in a couple of weeks? Without data loss?
ncar123 said:
Can I do the unlock part and the rest in a couple of weeks? Without data loss?
Click to expand...
Click to collapse
You can unlock whenever you want, but every time the bootloader is locked or unlocked, the phone resets its data (but I'm not 100% sure, maybe it's only locking or only unlocking).
But why unlocking now and wait 2 weeks? Couldn't you unlock the phone directly in 2 weeks when you are ready?
BubuXP said:
You can unlock whenever you want, but every time the bootloader is locked or unlocked, the phone resets its data (but I'm not 100% sure, maybe it's only locking or only unlocking).
But why unlocking now and wait 2 weeks? Couldn't you unlock the phone directly in 2 weeks when you are ready?
Click to expand...
Click to collapse
I don't want to setup my phone with my data twice...
ncar123 said:
I don't want to setup my phone with my data twice...
Click to expand...
Click to collapse
So it's ok. Unlock now while you don't have any data in the phone and whenever you want, you can install Magisk later.

How To Guide Rooting the Google Pixel 6a

Rooting the Pixel 6a is just about as easy as any other factory unlocked pixel, but because so many people have had issues with unlocking their bootloaders, I figured I'd post my exact personal steps I took when a Pixel 6a came into my tech shop to be rooted, and I discovered the current bug with Rooting
What You'll Need:
- June 2022 Firmware OTA Update Installed at least: Do this on device. Do Not download the OTA update from google's firmware website.
- ADB/Fastboot/Google Drivers for Windows: I use this to install- ADB 15sec Installer
- Magisk Manager APK: Github - Magisk Github Releases
- Firmware Matching Currently Installed: Google FW page - Google Official Firmware Downloads - you need this for the boot.img file
- A Windows Computer
- A USB-C cable to connect to your phone to the computer
OEM Unlock Bug
With early units sold by Google, they're shipping with a bug where OEM Unlock stays grayed out. Here's the only way I got around this issue
1.) Log out of any Google Account on the device
2.) Connect to Wifi, check for updates without your sim card in the device. There is a bug where it will potentially download the update for your carrier sim
3.) At minimum, you should get the June 2022 security patch update. Run the update and remember which update it is for when you download the firmware to get boot.img
4.) When the update is finished, Factory Reset your device either from settings or Android recovery
5.) Go through Android setup without sim card in, and don't connect to wifi, finish setup without logging into a google account or anything
6.) When setup is done, connect to wifi and put your sim back in.
7.) Pay attention in your notifications for "Preparing your Device" notification.
8.) When that notification pops up, enable Developer options (tap build number a bunch of times)
9.) OEM Unlock should be possible to enable now. Also enable USB Debugging
Pre-Root Setup
1.) Install Magisk Manager from Github
2.) Use 7zip (or any other ZIP opening program) to extract the boot.img from your firmware download from google
-- the boot.img is inside another zip file that's in the download from google. very easy to get
3.) Put the Boot.img on your phones internal storage
4.) Open Magisk Manager, and select your Boot.img from internal storage. Patch the boot.img to make it a rooted boot.img
5.) With your phone connected to the computer, move the magisk_patched.img from sdcard/downloads to your computer
6.) If USB debugging is properly enabled, now you can open CMD and reboot to bootloader with
Code:
adb reboot bootloader
Unlocking the bootloader
1.) With the device connected, OEM Unlock enabled, and booted to bootloader, you can unlock the bootloader with the following command
Code:
fastboot flashing unlock
-- If nothing changes on your phone screen, use Device Manager to make sure the device is recognized via google drivers: vid here on that - Quick Fastboot Drivers Install Tutorial
2.) On your phone, use the volume keys to select Unlock Bootloader, then hit the power button, device should reboot back to bootloader
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
4.) Now you can reboot back into your device and you should be rooted!
Code:
fastboot reboot
Congrats! Now you're bootloader unlocked and rooted! GrapheneOS is already available if you want a degoogled rom, haven't seen another rom pop up yet
all done from there
updating your device when rooted
I do not have a pixel 6a specifically for this right now to confirm this will work, but on every other device with OTA's, this has been my process.
1.) Download your OTA using the system update part of Settings
2.) When it pops up and is ready to restart to finish installing the update, DO NOT CLICK RESTART IN SETTINGS/SYSTEM UPDATE
3.) Go to Magisk Manager, and select Install next to Magisk
4.) Select "Install to Inactive Slot (After OTA)
5.) When its done patching the boot partition, hit restart in Magisk
Your OTA Update is now rooted
To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing!
To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.
Even though it's label as Verizon, it should work for all carriers.
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
jejemc said:
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
Click to expand...
Click to collapse
Correct, though I would probably fastboot boot first just to make sure it boots up ok. When it does you can reboot to recovery and flash it.
these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?
(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)
ctfrommn said:
Correct, though I would probably fastboot boot first just to make sure it boots up ok. When it does you can reboot to recovery and flash it.
Click to expand...
Click to collapse
here it is and does and works perfectly well thank you for everything.
Im starting work on my custom kernel now so hopefully MVK for Bluejay will be ready in the coming days/weeks.
Zaxx32 said:
To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing!
Click to expand...
Click to collapse
As this thread ages, not everyone will have the June 2022 update. That's why I suggested/put the steps in to do it themselves with matching firmware to what their device is on.
benji said:
To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.
Even though it's label as Verizon, it should work for all carriers.
Click to expand...
Click to collapse
This DID NOT work for me. That's why I wrote this up the way I did.
jejemc said:
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
Click to expand...
Click to collapse
If you're bootloader is already unlocked, you just have to flash the patched magisk boot img, correct. I wrote this up for those having issue with not having the ability even if it is an unlocked from google device
frank93 said:
these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?
(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)
Click to expand...
Click to collapse
Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)
KaptinBoxxi said:
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
Click to expand...
Click to collapse
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.
KaptinBoxxi said:
Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)
Click to expand...
Click to collapse
I followed your steps to a T. Still can't unlock. I'm convinced there is a fault with my device itself at this point.
stormcrank said:
I followed your steps to a T. Still can't unlock. I'm convinced there is a fault with my device itself at this point.
Click to expand...
Click to collapse
they will warranty replace if it for sure fails still. Its a silly situation, but mistakes happen
binary**# said:
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.
Click to expand...
Click to collapse
I may not be very active on XDA, but have been rooting and rom'ing devices since the palm pre, first android phone was the droid x. I've never heard of this step, its never been needed. Its an extra pointless step that is just tethered root. You don't need to do it. As long as you don't download a random Boot.img, like the one for some reason attached to a reply on this thread and get it yourself from the firmware matching your device OR flashing Magisk via TWRP/Lineage Recovery with adb sideload, there's no reason to fastboot boot the boot.img.
You may have never run into an issue flashing a boot image but I've built thousands of roms and kernels and have learned the hard way more than once to measure twice, cut once.
That said, as long as you're simply patching a stock boot.img it's likely not an issue.
Followed all steps, on SD2A.220601.003SD2A.220601.003. OEM unlock still greyed
Nice work, Kaptinboxxi. Everything worked fine. How should we handle updates after rooting? Will a security patch break root? If so, what is the best process to root it again?
Voxilli said:
Nice work, Kaptinboxxi. Everything worked fine. How should we handle updates after rooting? Will a security patch break root? If so, what is the best process to root it again?
Click to expand...
Click to collapse
Yes, each update will require reflashing a patched kernel for the new build.
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Lughnasadh said:
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Click to expand...
Click to collapse
Good call...I guess I've never messed with that as I flash so many kernels anyway.
Lughnasadh said:
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Click to expand...
Click to collapse
That's what I've done with my OnePlus 7T for the last three years. Any repercussions for doing it this way versus patching the kernel?

Question "Your device is corrupt" after November Update with Magisk OTA method.

I followed this guide exactly: https://topjohnwu.github.io/Magisk/ota.html
Before starting the guide, I had a pretty new Pixel 7 Pro with the latest version of Magisk successfully installed (with bootloader UNLOCKED) and some small Magisk modules to tweak things (iOS emojis). I made sure to restore boot images and got the "restoration complete" toast message.
I saw the notification for the November update, downloaded and installed it. I did NOT reboot after that. I then went into the Magisk app and tapped "install to inactive slot (after OTA)" and rebooted from within the Magisk app.
My device rebooted, and showed me the bootloader unlocked screen, then showed me the "your device is corrupt" warning and said "press power button to continue". I pressed the power button and my device is now stuck on the Google logo.
Has this happened to anyone else? And is there any way to fix this (preferably without data loss)?
Pritster5 said:
I followed this guide exactly: https://topjohnwu.github.io/Magisk/ota.html
Before starting the guide, I had a pretty new Pixel 7 Pro with the latest version of Magisk successfully installed (with bootloader UNLOCKED) and some small Magisk modules to tweak things (iOS emojis). I made sure to restore boot images and got the "restoration complete" toast message.
I saw the notification for the November update, downloaded and installed it. I did NOT reboot after that. I then went into the Magisk app and tapped "install to inactive slot (after OTA)" and rebooted from within the Magisk app.
My device rebooted, and showed me the bootloader unlocked screen, then showed me the "your device is corrupt" warning and said "press power button to continue". I pressed the power button and my device is now stuck on the Google logo.
Has this happened to anyone else? And is there any way to fix this (preferably without data loss)?
Click to expand...
Click to collapse
That´s a bug within AVB. Unfortunately it can happen on Pixel 6 and 7 devices.
There´s one thing that can clear it:
I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.
fastboot flash init_boot init_boot.img
Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
If it boots already don´t forgot to flash init_boot from november firmware still.
Then download november factory image, extract init_boot.img, flash it via fastboot as well. This might get you out of the loop.
If you want you can use a magisk_patched init_boot.img as well so you´re rooted.
That last step should get you out of the corruption loop, as flashing outdated init_boot and then correct init_boot will somehow clear avb.
I´ll attach patched init_boot.img from november firmware TD1A.221105.001, Nov 2022 for you.
I see. Thank you so much for this info. I will try and report back my results. Has this bug been fixed in newer versions of Magisk or Android? I feel like it's a high priority bug given that it soft-bricks peoples devices.
EDIT: And does this process result in data loss?
Freak07 said:
That´s a bug within AVB. Unfortunately it can happen on Pixel 6 and 7 devices.
There´s one thing that can clear it:
I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.
fastboot flash init_boot init_boot.img
Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
If it boots already don´t forgot to flash init_boot from november firmware still.
Then download november factory image, extract init_boot.img, flash it via fastboot as well. This might get you out of the loop.
If you want you can use a magisk_patched init_boot.img as well so you´re rooted.
That last step should get you out of the corruption loop, as flashing outdated init_boot and then correct init_boot will somehow clear avb.
I´ll attach patched init_boot.img from november firmware TD1A.221105.001, Nov 2022 for you.
Click to expand...
Click to collapse
Glad you're on our forum Freak!
Pritster5 said:
I see. Thank you so much for this info. I will try and report back my results. Has this bug been fixed in newer versions of Magisk or Android? I feel like it's a high priority bug given that it soft-bricks peoples devices.
EDIT: And does this process result in data loss?
Click to expand...
Click to collapse
Remove "-w" from the flashall.bat, I believe that ensures you keep data.
I'm also a bit confused by this step: "flash it via fastboot on your device with nov firmware." Are you saying that I should flash october init_boot.img onto my phone, which already has the Nov firmware installed? Or do I have to merge the Oct init_boot.img into the Nov firmware (full factory image TD1A.221105.001)
Pritster5 said:
I'm also a bit confused by this step: "flash it via fastboot on your device with nov firmware." Are you saying that I should flash october init_boot.img onto my phone, which already has the Nov firmware installed? Or do I have to merge the Oct init_boot.img into the Nov firmware (full factory image TD1A.221105.001)
Click to expand...
Click to collapse
yes, you flash the old outdated init_boot via fastboot on november firmware.
afterwards you flash back the correct one for november. that will hopefully clear the avb bug you´re experiencing.
You flash only this img, not anything else. do precisely the steps I described. you don´t have to flash the full firmware, as you already updated to november if I read your initial post correctly and OTA to november was successful.
Pritster5 said:
I see. Thank you so much for this info. I will try and report back my results. Has this bug been fixed in newer versions of Magisk or Android? I feel like it's a high priority bug given that it soft-bricks peoples devices.
EDIT: And does this process result in data loss?
Click to expand...
Click to collapse
no it has not been fixed.
no, with the steps detailed there´s no data loss.
I wouldn´t recommend updating your phone with the magisk flash to inactive slot method. That´s not working for most people on p6 and p7 devices.
Pain-N-Panic said:
Remove "-w" from the flashall.bat, I believe that ensures you keep data.
Click to expand...
Click to collapse
the method I described doesn´t involve using that script. no data will be lost.
I then went into the Magisk app and tapped "install to inactive slot (after OTA)" and rebooted from within the Magisk app.
Click to expand...
Click to collapse
How do you expect this to work for p7p? The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition.
Update Magisk using the method outlined in the main thread for OTA and Magisk: https://forum.xda-developers.com/t/...-safetynet-all-relevant-links.4502805/page-61
Freak07 said:
yes, you flash the old outdated init_boot via fastboot on november firmware.
afterwards you flash back the correct one for november. that will hopefully clear the avb bug you´re experiencing.
You flash only this img, not anything else. do precisely the steps I described. you don´t have to flash the full firmware, as you already updated to november if I read your initial post correctly and OTA to november was successful.
no it has not been fixed.
no, with the steps detailed there´s no data loss.
I wouldn´t recommend updating your phone with the magisk flash to inactive slot method. That´s not working for most people on p6 and p7 devices.
the method I described doesn´t involve using that script. no data will be lost.
Click to expand...
Click to collapse
devsk said:
How do you expect this to work for p7p? The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition.
Update Magisk using the method outlined in the main thread for OTA and Magisk: https://forum.xda-developers.com/t/...-safetynet-all-relevant-links.4502805/page-61
Click to expand...
Click to collapse
If what @devsk states is true, you also need to flash back stock boot.img from november firmware via fastboot @Pritster5.
fastboot flash boot boot.img
Since magisk can patch init_boot.img´s, I assumed it would account for pixel 7 pro, having ramdisk inside init_boot instead of boot.img. It´s a bad design choice by magisk app to show this option to users on Pixel 7 pro in that case. :/ but even on pixel 6, the forums are full of people running into issues with that method.
devsk said:
How do you expect this to work for p7p? The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition.
Update Magisk using the method outlined in the main thread for OTA and Magisk: https://forum.xda-developers.com/t/...-safetynet-all-relevant-links.4502805/page-61
Click to expand...
Click to collapse
Where can I see what devices are supported for that method? I assumed that the guide worked for anyone with A/B partitioning. It would be helpful if there was a notice of this somewhere on the guide or any other obvious place.
The easiest way to recover is to follow that guide and flash the whole ROM (it will fix both the boot and init_boot partitions). *Make sure* to remove -w from the flash-all.bat or flash-all.sh, whichever one you are using. This part is important. "-w" command line argument wipes your data and you don't want that.
I just updated my p7p using this method this afternoon and it worked fine.
Pritster5 said:
Where can I see what devices are supported for that method? I assumed that the guide worked for anyone with A/B partitioning. It would be helpful if there was a notice of this somewhere on the guide or any other obvious place.
Click to expand...
Click to collapse
That link is specifically for p7p
devsk said:
That link is specifically for p7p
Click to expand...
Click to collapse
Oh I meant where can I see what devices support the Magisk "Install to inactive slot" guide.
You said "The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition."
How are you aware of this? Did you find this out by reading the code itself or was there a notice of this somewhere?
Pritster5 said:
Oh I meant where can I see what devices support the Magisk "Install to inactive slot" guide.
You said "The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition."
How are you aware of this? Did you find this out by reading the code itself or was there a notice of this somewhere?
Click to expand...
Click to collapse
Actually, this got me thinking and I looked at the code. Looks like the magisk code (the bash function find_boot_image) seems to be doing the right thing by treating init_boot ahead of boot partition.
Do you have the logs from that run of "Install to inactive slot"?
devsk said:
Actually, this got me thinking and I looked at the code. Looks like the magisk code (the bash function find_boot_image) seems to be doing the right thing by treating init_boot ahead of boot partition.
Do you have the logs from that run of "Install to inactive slot"?
Click to expand...
Click to collapse
I don't believe so, as I can only connect to my phone via PC over fastboot mode right now, so I'll have to check for logs after fixing my device.
One other question though, the guide you linked mentioned disabling magisk modules before flashing the factory image. I was never able to do that because I used the inactive slot guide which made no mention of it. Will the enabled magisk modules prevent me from using the guide you linked?
I am also unable to do this step as I can't transfer files from my pc to my p7p when I cant access the phone aside from fastboot mode: "Copy the init_boot.img from the PC to the phone's internal storage." Can I skip this step?
EDIT: Should I just use the Android flash tool instead if I don't have access to ADB? Or should I instead just follow Freak07's steps since his steps don't require adb access?
Pritster5 said:
I don't believe so, as I can only connect to my phone via PC over fastboot mode right now, so I'll have to check for logs after fixing my device.
One other question though, the guide you linked mentioned disabling magisk modules before flashing the factory image. I was never able to do that because I used the inactive slot guide which made no mention of it. Will the enabled magisk modules prevent me from using the guide you linked?
I am also unable to do this step as I can't transfer files from my pc to my p7p when I cant access the phone aside from fastboot mode: "Copy the init_boot.img from the PC to the phone's internal storage." Can I skip this step?
Click to expand...
Click to collapse
Just restore your device by flashing the whole ROM. This will get rid of magisk and you should have no problem booting back into the system. You will have lost the root at that point. Once inside, transfer the init_boot.img into /sdcard and run magisk and ask it to patch that. Bring the patched file to your PC, and flash it to init_boot partition like the guide says. At that point, you should be able to boot back into the system and root should be good.
I did not disable Magisk modules and it worked fine. I have magiskhide props, shmiko, systemless hosts, zygisk - lsposed, universal safety net fix.
If you have trouble with Magisk modules, you can recover by booting into Safe Mode (restart and press down volume and keep it pressed). Magisk detects the Safe Mode and disables the modules. Done that many times.
Pritster5 said:
I don't believe so, as I can only connect to my phone via PC over fastboot mode right now, so I'll have to check for logs after fixing my device.
One other question though, the guide you linked mentioned disabling magisk modules before flashing the factory image. I was never able to do that because I used the inactive slot guide which made no mention of it. Will the enabled magisk modules prevent me from using the guide you linked?
I am also unable to do this step as I can't transfer files from my pc to my p7p when I cant access the phone aside from fastboot mode: "Copy the init_boot.img from the PC to the phone's internal storage." Can I skip this step?
EDIT: Should I just use the Android flash tool instead if I don't have access to ADB? Or should I instead just follow Freak07's steps since his steps don't require adb access?
Click to expand...
Click to collapse
in the end it doesn´t matter how you do it.
Flashing the complete firmware with -w removed or using the web flasher might be easier as it´s kind of a one click solution.
However simply flashing entire november firmware, might not get you out of the avb corruption loop. It might but, but it might not depending on what went wrong. If it´s the bug that I think it is, avb gets cleared when flashing an older outdated init_boot.img.
You can try to just flash the entire nov firmware with any of the methods suggested. If it doesn´t clear the avb corruption bug, flash back older init_boot from oct firmware, followed by current init boot as I originally suggested.
Freak07 said:
That´s a bug within AVB. Unfortunately it can happen on Pixel 6 and 7 devices.
There´s one thing that can clear it:
I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.
fastboot flash init_boot init_boot.img
Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
If it boots already don´t forgot to flash init_boot from november firmware still.
Then download november factory image, extract init_boot.img, flash it via fastboot as well. This might get you out of the loop.
If you want you can use a magisk_patched init_boot.img as well so you´re rooted.
That last step should get you out of the corruption loop, as flashing outdated init_boot and then correct init_boot will somehow clear avb.
I´ll attach patched init_boot.img from november firmware TD1A.221105.001, Nov 2022 for you.
Click to expand...
Click to collapse
Ok so I did this part:
"I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.
fastboot flash init_boot init_boot.img
Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
If it boots already don´t forgot to flash init_boot from november firmware still."
And it works, however when I go to "About Phone" the build number is still the October version. Is this expected, given that I flashed the october init_boot.img onto a phone with November firmware? Or did my phone perhaps reboot into the older partition which the phone ran before switching to the inactive slot?
EDIT: Even after flashing the november init_boot.img after temporarily reverting to the october init_boot.img, it's still showing that I have build TD1A.220804.031 installed.
"followed by current init boot as I originally suggested."
Should I reboot back into fastboot mode again to do this?
Thank you guys so much for the help so far btw, I'm already back up and running and just need to finish the steps you mentioned.
@devsk Here are the logs you wanted:

Question Fail safe ota method

I don't wanna risk the on device ota via restoring images through magisk again
Does the following check out?
I'd greatly appreciate if someone, perhaps @V0latyle could look over it, you already helped me a lot the last time.
Download ota, as well as firmware and check if boot.img got updated (or perhaps someone on an updated phone can check but idk how to even check your boot version)
Either patch new boot.img or keep the old one at hand if it didn't get updated
Disable all magisk modules and reboot
Go to magisk -> uninstall -> restore images and reboot
Go in sideload mode and sideload the ota
Reboot to system so the ota can complete
Turn off and boot again from magisk patched boot.img
Direct install through magisk and enable modules
Reboot so modules work and done
All those reboots might not be necessary but I don't know if f.e. magisk modules immediately stop affecting the system after disabling them or if a reboot is required to fully disable them, same with unrooting, even after restoring images the current system has still root so I might need to reboot before sideloading.
I know that technically I don't need to unroot at all for sideloading to work but I really want to make this as safe as it can get.
G5-User7080 said:
I don't wanna risk the on device ota via restoring images through magisk again
Does the following check out?
I'd greatly appreciate if someone, perhaps @V0latyle could look over it, you already helped me a lot the last time.
Download ota, as well as firmware and check if boot.img got updated (or perhaps someone on an updated phone can check but idk how to even check your boot version)
Either patch new boot.img or keep the old one at hand if it didn't get updated
Disable all magisk modules and reboot
Go to magisk -> uninstall -> restore images and reboot
Go in sideload mode and sideload the ota
Reboot to system so the ota can complete
Turn off and boot again from magisk patched boot.img
Direct install through magisk and enable modules
Reboot so modules work and done
All those reboots might not be necessary but I don't know if f.e. magisk modules immediately stop affecting the system after disabling them or if a reboot is required to fully disable them, same with unrooting, even after restoring images the current system has still root so I might need to reboot before sideloading.
I know that technically I don't need to unroot at all for sideloading to work but I really want to make this as safe as it can get.
Click to expand...
Click to collapse
No need to unroot or restore images. You can disable modules if you want. Just sideload the OTA, and live boot the old patched image, then perform Direct Install in Magisk.
By the way, instead of creating a new thread, you could have asked this question in an existing one...
V0latyle said:
By the way, instead of creating a new thread, you could have asked this question in an existing one...
Click to expand...
Click to collapse
Perhaps I could have, I am hoping that this way it might be easier to find for others than having to look somewhere on the 30th post of a thread that is about a bricked device after ota.
V0latyle said:
No need to unroot or restore images. You can disable modules if you want. Just sideload the OTA, and live boot the old patched image, then perform Direct Install in Magisk.
Click to expand...
Click to collapse
mhh I see, I'm just a little scared of the ota process after what happened the last time so I wanna be like extra sure nothing can go wrong.
Doesn't help that I don't really understand what OTA's do exactly..
That I don't have to unroot when flashing factory makes sense as I'm just overwriting boot anyway.
Is an OTA the same thing essentially? Like is it basically a bunch or partitions in a zip that get flashed over whatever is there previously?
Meaning all things that could go wrong or get checked happen through the system update app rather than through the OTA itself?
Also you are saying "unroot or restore images", is that not the same thing?
And let's say boot gets updated and I live boot the older outdated image, does that not matter at all?
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
frank93 said:
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
Click to expand...
Click to collapse
This sounds like the "Quick Method" mentioned here:
https://www.xda-developers.com/how-to-install-ota-updates-keep-root-google-pixel-phone/
You're doing that?
frank93 said:
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
Click to expand...
Click to collapse
As far as I understood sideloading OTA is the most safe and uncomplicated way
media-fort said:
This sounds like the "Quick Method" mentioned here:
https://www.xda-developers.com/how-to-install-ota-updates-keep-root-google-pixel-phone/
You're doing that?
Click to expand...
Click to collapse
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
G5-User7080 said:
Perhaps I could have, I am hoping that this way it might be easier to find for others than having to look somewhere on the 30th post of a thread that is about a bricked device after ota.
Click to expand...
Click to collapse
Well, I had thought there were existing guides in this section, but either I was mistaken or they've been buried.
G5-User7080 said:
mhh I see, I'm just a little scared of the ota process after what happened the last time so I wanna be like extra sure nothing can go wrong.
Doesn't help that I don't really understand what OTA's do exactly..
Click to expand...
Click to collapse
Maybe explaining it could help you. I'll do so in response to your questions below.
G5-User7080 said:
That I don't have to unroot when flashing factory makes sense as I'm just overwriting boot anyway.
Click to expand...
Click to collapse
Exactly.
G5-User7080 said:
Is an OTA the same thing essentially? Like is it basically a bunch or partitions in a zip that get flashed over whatever is there previously?
Click to expand...
Click to collapse
Regardless of whether installed through system update or via sideload, the OTA package always installs to the other slot - if you're currently running on slot A, it installs to slot B, and vice versa. See A/B (Seamless) System Updates
G5-User7080 said:
Meaning all things that could go wrong or get checked happen through the system update app rather than through the OTA itself?
Click to expand...
Click to collapse
OTA through system update doesn't always seem to work for rooted users; some have suggested that it may be necessary to restore images in Magisk to pass verification checks in order for the update to succeed. Others, like me, don't bother with the OTA updates anymore because 1) OTA through system updates just don't seem to work and 2) Magisk patching inactive slot still seems to have issues. I personally prefer to use the factory images, but the OTA method is technically safer.
OTA sideload should always work, and AFAIK it doesn't matter what state your device is in. It overwrites whatever is on the currently inactive slot; there's no need to remove modules or restore images or unroot as the boot image gets overwritten with the new boot image.
G5-User7080 said:
Also you are saying "unroot or restore images", is that not the same thing?
Click to expand...
Click to collapse
No, they aren't.
When your device boots, it loads the contents of the /boot partition into memory - ramdisk and kernel. This remains in memory while the system is running.
Hence, if the boot image has been patched, you'll boot with root.
When you perform "Restore Images" in Magisk, this uses root access to restore the unpatched image to /boot. But, since the patched boot image was already loaded into RAM, you still have root.
If you reboot at this point, you'll lose root because the now unpatched boot image is loaded into memory.
G5-User7080 said:
And let's say boot gets updated and I live boot the older outdated image, does that not matter at all?
Click to expand...
Click to collapse
Yes and no.
After an OTA update, you want to let the system boot with the new boot image. This is because the boot image has a signature that matches the system image; if these don't match, the update engine determines that the update was a failure, and will recycle you back to the original slot. So, the boot image that the system loads after the update has to be the new one. It doesn't matter if it's been patched or not - you could, for example, download the factory image, extract the boot image from it, patch the boot image in Magisk, then sideload the OTA, force your phone to boot into bootloader, and flash the new patched image.
Patching to inactive slot in Magisk is supposed to avoid all this, and can only be used if you update through system. It works like this:
You're rooted on the February release on slot A.
You restore images in Magisk, but do not reboot.
You install the OTA through system updates. This installs to slot B
When it prompts you to reboot to finish the update, instead you go back to Magisk and use Patch Inactive Slot - this uses root access to perform the Magisk patch on the new boot image in /boot_b
You then reboot, and the system switches to slot B, and loads with root because you patched the boot image.
However, this doesn't seem to be working for everyone. Some phones don't even "see" the OTA update is available for some reason.
Therefore, this is the method I recommend you use to install the OTA update:
Download the OTA update for your device from Pixel OTA Images
In Magisk, go to Reboot > Reboot to recovery
Once in recovery mode, hold Power and click Volume Up. Then, select "Apply update from ADB" and connect your phone to your computer.
On your PC, open a command line in your ADB Platform Tools folder, and type adb sideload <path to OTA zip> - to make this easier, just drag and drop the OTA zip into the command window.
Once the update completes, let your phone boot to system. You will not have root, so it won't matter if you didn't disable Magisk modules.
Let the system complete the post-update work (there's a notification with a gear icon) and get stabilized. Wait a few minutes.
Assuming you still have USB debugging enabled, use ADB to reboot to bootloader: adb reboot bootloader or you can just do it manually - reboot your device and hold Volume Down
You can now live boot an older patched boot image: fastboot boot <drag and drop patched boot image>
You should boot with root. Note: if your phone bootloops, see my note below)
In Magisk, go to Install > Direct Install. This uses the "temporary root" of the patched image you've loaded into memory to patch the new boot image
Reboot once more. You should now be on the new boot image with root.
If your phone boot loops, double check to make sure you're still on the latest update. You can check this in Settings > About, but it's also displayed on the notification windowshade under the Quick Settings tiles. Make sure this matches the OTA image you just installed. If it doesn't, this means that your device has recycled back to the "old" slot for some reason, and you'll have to start over.
If you want to play it safe, you can use this guide to extract the new boot.img from the OTA payload. You'd then patch this manually in Magisk, and after installing the update, you'd reboot to bootloader and flash to /boot.
If you still bootloop on the new boot image after patching, you probably need to disable Magisk modules. You can do this via command line:
adb --wait-for-device shell magisk -remove-images
frank93 said:
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
Click to expand...
Click to collapse
Damn, I tried this and it seems that my PC cannot write the image to the Pixel 6a?!
Do I have old ADB drivers or whats the reason for that?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Edit:
Sry, I'm not involved here all the time. Figured it out myself. Reason for the failure were the freakin' platform_tools_r34. Switched to r33 and worked straight away..
https://forum.xda-developers.com/t/...el-7-pro-support-thread.4505287/post-88134573
V0latyle said:
Well, I had thought there were existing guides in this section, but either I was mistaken or they've been buried.
Click to expand...
Click to collapse
Not in the 6a forum as far as I'm aware, there might be more in the Pixel 6 forum, but I've already seen your guide that covers all kinds of methods.
V0latyle said:
the OTA package always installs to the other slot
Click to expand...
Click to collapse
Wouldn't it make sense to restore the unrooted boot partition on the currently active slot given that OTA will switch me to the currently inactive slot?
So that after the OTA procedure I'm in the same situation as now, being on a rooted slot with having the original unrooted slot as sort of "backup".
V0latyle said:
there's no need to remove modules or restore images or unroot as the boot image gets overwritten with the new boot image.
Click to expand...
Click to collapse
I think it was on the magisk ota guide but im not sure, that it said that it's important to disable all system modifying modules before attempting an update.
While all modules I use should by systemless,.. I think?.. I still think it's just easier to disable them all and re-enable them later, just to avoid trouble and make it easier to write in a guide, as in "just disable them and don't bother checking if theyre really all systemless".
V0latyle said:
After an OTA update, you want to let the system boot with the new boot image.
Click to expand...
Click to collapse
Yes, that was my intention, let it boot normally without touching anything to complete the OTA.
Didn't know I would have to wait a few minutes after already being in the system tho to wait for the notification, I'll look out for that.
V0latyle said:
In Magisk, go to Reboot > Reboot to recovery
Once in recovery mode, hold Power and click Volume Up. Then, select "Apply update from ADB" and connect your phone to your computer.
Click to expand...
Click to collapse
Is this equivalent to the way you described in your Pixel 6 guide?
As in doing adb reboot sideload to go to sideload mode, followed by adb sideload ota.zip
V0latyle said:
If your phone boot loops, double check to make sure you're still on the latest update.
Click to expand...
Click to collapse
If it bootloops how would I even get back into system?
Why would it even bootloop, if there is a known cause can't I just avoid whatever is causing it to begin with?
I mean I don't assume I'll bootloop following the steps carefully but this time I'll post and wait for replies before just nuking everything like last time ^^
V0latyle said:
If you want to play it safe, you can use this guide to extract the new boot.img from the OTA payload.
Click to expand...
Click to collapse
Yes, I'd prefer to make it as safe as possible.
Is the boot.img extracted from the OTA the same as the one from the according firmware?
Would be easier to just extract that on PC.
Oh and two more question that came to mind.
When restoring images through magisk it replaces the rooted boot partition with the stock one.
But root only disappears on next reboot.
So can I restore images and then directly do adb reboot sideload followed by doing the OTA?
Meaning I don't need to do one reboot back to system to sort of "complete the unrooting preocedure"?
Is that the same for magisk modules?
If I want to disable them just in case, do I need to reboot once after for them to like get removed from the system or are they instantly disabled the moment I press the "disable module" switch?
G5-User7080 said:
Not in the 6a forum as far as I'm aware, there might be more in the Pixel 6 forum, but I've already seen your guide that covers all kinds of methods.
Wouldn't it make sense to restore the unrooted boot partition on the currently active slot given that OTA will switch me to the currently inactive slot?
So that after the OTA procedure I'm in the same situation as now, being on a rooted slot with having the original unrooted slot as sort of "backup".
Click to expand...
Click to collapse
Not if you're going to sideload the OTA. There's no point to doing so.
G5-User7080 said:
I think it was on the magisk ota guide but im not sure, that it said that it's important to disable all system modifying modules before attempting an update.
While all modules I use should by systemless,.. I think?.. I still think it's just easier to disable them all and re-enable them later, just to avoid trouble and make it easier to write in a guide, as in "just disable them and don't bother checking if theyre really all systemless".
Click to expand...
Click to collapse
Yeah, this is the "safe" option. I just use MHPC + USNF mod + systemless hosts so I don't bother disabling, but those who use Xposed or other more "invasive" system mods might want to.
G5-User7080 said:
Yes, that was my intention, let it boot normally without touching anything to complete the OTA.
Didn't know I would have to wait a few minutes after already being in the system tho to wait for the notification, I'll look out for that.
Click to expand...
Click to collapse
This is because it seems to take a few minutes for the system to "get happy" and decide that all is well, and if you live boot an older boot image before it does so, it will assume the update failed and recycle back to the old slot.
G5-User7080 said:
Is this equivalent to the way you described in your Pixel 6 guide?
As in doing adb reboot sideload to go to sideload mode, followed by adb sideload ota.zip
Click to expand...
Click to collapse
Yep. The commands and the method is exactly the same for all Pixel devices. The only thing that is different are the files. Only the Pixel 7 / 7 Pro are slightly different in that we have to patch init_boot instead of boot.
G5-User7080 said:
If it bootloops how would I even get back into system?
Click to expand...
Click to collapse
Use the command I gave you: adb --wait-for-device shell magisk --remove-modules while booting
G5-User7080 said:
Why would it even bootloop, if there is a known cause can't I just avoid whatever is causing it to begin with?
Click to expand...
Click to collapse
There isn't a known cause, the exception being trying to boot an old boot image without letting the system complete the update post-reboot as described above
G5-User7080 said:
I mean I don't assume I'll bootloop following the steps carefully but this time I'll post and wait for replies before just nuking everything like last time ^^
Yes, I'd prefer to make it as safe as possible.
Is the boot.img extracted from the OTA the same as the one from the according firmware?
Would be easier to just extract that on PC.
Click to expand...
Click to collapse
Yes. It's just packaged differently.
Since Payload Dumper requires Python, I've found it simpler to just use the factory image - although if you're at that point, you may as well just flash the factory image anyway.
G5-User7080 said:
Oh and two more question that came to mind.
When restoring images through magisk it replaces the rooted boot partition with the stock one.
But root only disappears on next reboot.
So can I restore images and then directly do adb reboot sideload followed by doing the OTA?
Meaning I don't need to do one reboot back to system to sort of "complete the unrooting preocedure"?
Click to expand...
Click to collapse
I never suggested you'd need to reboot after restoring images. Once you've restored the original boot image, that's what is in the boot partition. It takes effect immediately. What doesn't take immediate effect is what's currently running in memory, which is why I pointed out that upon a reboot, your device will load the unpatched image because that's what's in the partition. But, as I explained above, there's no point to restoring the original boot image if you're sideloading the OTA. The only time this ever appears to be necessary is when you're taking OTA through system update.
G5-User7080 said:
Is that the same for magisk modules?
If I want to disable them just in case, do I need to reboot once after for them to like get removed from the system or are they instantly disabled the moment I press the "disable module" switch?
Click to expand...
Click to collapse
I am honestly not sure about this one, but since we are talking about OTAs, the point is moot - when the update completes and the phone reboots, it's booting an unpatched boot image, meaning there's no way for the modules to load. It doesn't matter if you've made changes to system, either, because the system partition also has two slots - system_a and system_b
The only thing that MIGHT matter is when you boot the patched image, because if you haven't disabled modules, they will load during boot, and if one of them causes a bootloop for whatever reason....It still shouldn't matter because in this case, the device -should- try to boot the same slot again, and since you never patched the new boot image, it will boot without root.
V0latyle said:
I am honestly not sure about this one, but since we are talking about OTAs, the point is moot - when the update completes and the phone reboots, it's booting an unpatched boot image, meaning there's no way for the modules to load. It doesn't matter if you've made changes to system, either, because the system partition also has two slots - system_a and system_b
Click to expand...
Click to collapse
yea it seems like its the same as restoring images, it disables them but obviously they are already loaded for the current session and probably don't get "unloaded", they just won't load again from the next boot on, so I don't think there would be any need to reboot, except when you want to do something in system that requires modules to be disabled.
So it seems like we'll have to wait til like the 20th for the march update, so I'll just go straight for the april one.
Considering what you said, would this be the correct procedure, just to confirm?
Extract boot.img from factory image and patch it, then move it to pc.
In Magisk app, disable all modules.
On pc do adb reboot sideload and after rebooting in download mode adb sideload ota.zip
Choose "reboot system" from menu or use adb reboot... does that command work in download mode?
Let it reboot, unlock, wait for the update completed notification to appear.
Confirm that adb debugging is still enabled and the version number below quick tiles matches the update, then do adb reboot bootloader.
Live boot the new magisk patched boot.img with fastboot boot patched_boot.img.
Magisk app -> Install -> Direct Install, then re-enable all modules and reboot.
done
Additionally, I'm wondering what all the different "menus" are for.
Like first there is bootloader where you can flash partitions through the fastboot command and enter recovery or boot system.
Then there is the recovery that... doesn't really do anything when it's stock?
Then there is sideload or download mode that is accessed from the recovery.
Then there is adb fastboot, does that bring you to the fastbootd screen? I have no idea what that is for.
G5-User7080 said:
yea it seems like its the same as restoring images, it disables them but obviously they are already loaded for the current session and probably don't get "unloaded", they just won't load again from the next boot on, so I don't think there would be any need to reboot, except when you want to do something in system that requires modules to be disabled.
So it seems like we'll have to wait til like the 20th for the march update, so I'll just go straight for the april one.
Considering what you said, would this be the correct procedure, just to confirm?
Extract boot.img from factory image and patch it, then move it to pc.
In Magisk app, disable all modules.
On pc do adb reboot sideload and after rebooting in download mode adb sideload ota.zip
Choose "reboot system" from menu or use adb reboot... does that command work in download mode?
Click to expand...
Click to collapse
ADB commands work in recovery mode, yes.
G5-User7080 said:
Let it reboot, unlock, wait for the update completed notification to appear.
Confirm that adb debugging is still enabled and the version number below quick tiles matches the update, then do adb reboot bootloader.
Live boot the new magisk patched boot.img with fastboot boot patched_boot.img.
Magisk app -> Install -> Direct Install, then re-enable all modules and reboot.
done
Click to expand...
Click to collapse
If you're going to download the factory image, why not just use Pixel Flasher to perform a factory flash? Contrary to popular belief, flashing the factory image itself does not wipe data. OTA updates are still the "safest" way but I've been using the factory image for a couple years now on my Pixel 5 and have never had a problem.
G5-User7080 said:
Additionally, I'm wondering what all the different "menus" are for.
Like first there is bootloader where you can flash partitions through the fastboot command and enter recovery or boot system.
Then there is the recovery that... doesn't really do anything when it's stock?
Then there is sideload or download mode that is accessed from the recovery.
Then there is adb fastboot, does that bring you to the fastbootd screen? I have no idea what that is for.
Click to expand...
Click to collapse
Bootloader is used for flashing bootloader, modem, and boot.
Recovery mode is a small kernel in of itself that can perform functions that the bootloader can't, and provides a software interface to perform a "safe" recovery should the device stop working - like flashing an OTA.
Sideload mode is part of that recovery software interface - it allows you to serve OTA files over ADB
Fastbootd is "userspace fastboot" that allows advanced flashing functions.
More information on fastbootd
V0latyle said:
If you're going to download the factory image, why not just use Pixel Flasher to perform a factory flash? Contrary to popular belief, flashing the factory image itself does not wipe data. OTA updates are still the "safest" way but I've been using the factory image for a couple years now on my Pixel 5 and have never had a problem.
Click to expand...
Click to collapse
cause I'd need to remove the -w from the update command in the flashall.bat as well as possibly add --skip-reboot
I can see the day coming when I simply forget doing that and wipe my device by accident.
Or when using pixel flasher I might just forget to untick the wipe option.
I want to use a method that ideally I only have to prepare once, say if I could just make a "flash factory without wipe" script that works every time, but due to changing version numbers I have to use the new script every time.
G5-User7080 said:
cause I'd need to remove the -w from the update command in the flashall.bat as well as possibly add --skip-reboot
Click to expand...
Click to collapse
You don't have to use the script. Learn to do the commands manually. You don't have to skip reboot either, but if you want to flash a patched boot image, it helps.
G5-User7080 said:
I can see the day coming when I simply forget doing that and wipe my device by accident.
Or when using pixel flasher I might just forget to untick the wipe option.
Click to expand...
Click to collapse
Pixel Flasher settings are persistent....
G5-User7080 said:
I want to use a method that ideally I only have to prepare once, say if I could just make a "flash factory without wipe" script that works every time, but due to changing version numbers I have to use the new script every time.
Click to expand...
Click to collapse
You seem to misunderstand how flashing the factory image works. You don't have to use the script. Learn to use ADB and fastboot commands manually. You can follow my guide for the 6 Pro here; the commands are all the same.
Otherwise, you can use Pixel Flasher. All you have to do is set it up once, and the settings persist even after updates. This is what I've gone to as a means to simply free myself for other tasks while my phone is updating; I used to do it manually.
frank93 said:
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
Click to expand...
Click to collapse
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
I don't want to brick my device, therefore I've always deleted these Login infos before full flashing process.
But after each full flash, it's always very annoying to add all that info again, for each banking app, for Google pay and so on....
media-fort said:
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
Click to expand...
Click to collapse
i never logged out or deleted anything before flashing. it "feels" like an OTA, i just flash (without wipe) and after the next boot the device is ready to be used.
media-fort said:
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
Click to expand...
Click to collapse
Flashing a full firmware w/o wiping = OTA update. Since an OTA won't delete anything of your settings/data, a full firmware flash w/o wiping will do the same.
All settings, data and apps are stored on /userdata. When saying "without wiping", then it means "do not erase /userdata".
WoKoschekk said:
Flashing a full firmware w/o wiping = OTA update. Since an OTA won't delete anything of your settings/data, a full firmware flash w/o wiping will do the same.
All settings, data and apps are stored on /userdata. When saying "without wiping", then it means "do not erase /userdata".
Click to expand...
Click to collapse
Almost, but not quite.
Flashing the full factory firmware installs it to the currently active slot and can be done regardless of what version you're already on; if you try to flash the system update alone, it'll complain if it doesn't see the right bootloader and radio version but you can use --force to get around that
Flashing the OTA installs it to the currently INACTIVE slot and can only be done when you're on an OLDER version.
V0latyle said:
Almost, but not quite.
Flashing the full factory firmware installs it to the currently active slot and can be done regardless of what version you're already on; if you try to flash the system update alone, it'll complain if it doesn't see the right bootloader and radio version but you can use --force to get around that
Flashing the OTA installs it to the currently INACTIVE slot and can only be done when you're on an OLDER version.
Click to expand...
Click to collapse
yes, that's right. but regarding to the question
media-fort said:
is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
Click to expand...
Click to collapse
it doesn't matter which slot is active.

Categories

Resources