yashsingh1/xdaforums huggingface dataset:
[Google Pixel 4 XL Guides, News, & Discussion] HailNibbler:
Huh, interesting. I patched my own image and didn't have a backed up boot.img, but now it seems Magisk has created a new one (perhaps it was just wiped when I was rooting the phone). I have dm-verity turned off. I'll see if it works when the next OTA arrives, otherwise I'll start playing around with dm-verity.
[Google Pixel 4 XL Guides, News, & Discussion] GlitchMob:
Got it. Thank you
[Google Pixel 4 XL Guides, News, & Discussion] troymz1:
Anyone familiar with flash-all.sh on a pixel slate? I have linux apps installed and get fastboot and adb commands working through terminal using ./adb and ./fastboot. But no matter what command I try flash-all doesnt work. Am I missing something?

Edit: I try ./flash-all.sh and I get permission denied. Even with sudo.

Edit 2: I've figured out my permission issue. I found a way to run ./flash-all.sh.. but when it gets to the point to boot to userspace fastboot I get the green android with red exclamation! Please help!
[Google Pixel 4 XL Guides, News, & Discussion] dimm0k:
with regard to Magisk's "Preserve AVB 2.0/dm-verity" option unchecked on a Google Pixel 4, am I missing anything? I'm still a bit confused on what this option does with regard to this specific device. is it too late to use this option for the next system update if I rooted and updated to December with this option off?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
If you patch the stock boot img again with Magisk with dm-verity on you can flash that to preserve it.
[Google Pixel 4 XL Guides, News, & Discussion] Badger50:
It preserves root basically when you patch your boot images and start flashing other kernels, and prevents you from getting the dtbo message that your dtbo image has been patched. Going forward, check of the dm-verity box, then patch your boot.image. here's a little more info on the topic.

https://www.kynetics.com/docs/2018/introduction-to-dm-verity-on-android/
[Google Pixel 4 XL Guides, News, & Discussion] Donric13:
I have archlinux. There i have to run fastboot command with sudo. Flash all.sh has several fastboot commands.... This works only if i runnit all as root. Then i first run sudo su and then the flash all.sh (without sudo because i am root). Also keep attention to use the actual platforms tool. The red green thing i can't explain.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Well, I got impatient and manually updated. So I didn't get a chance to test the update method.
[Google Pixel 4 XL Guides, News, & Discussion] GlitchMob:
Really sorry for the questions.

So I should download factory image, in my case it is 10.0.0 (QD1A.190821.007.A3, Nov 2019), then extract. once extracted, edit "flash-all.bat" and remove "-w" from fastboot update. However, I'm not clear on the following steps:

"Once it is done you will need to patch new boot.img via magisk and flash the newly patched boot.img via fastboot."

All i've done at this point is edit the bat file, so I'm not sure how the next step happens in terms of patching the boot.img. Do I rezip the factory image and reflash after editing the bat file?

Is there a tutorial I can follow to better understand?

Thanks for the help.
[Google Pixel 4 XL Guides, News, & Discussion] Donric13:
I think this thread has all information about that

https://xdaforums.com/pixel-4-xl/how-to/root-pixel-4-xl-unlocked-google-store-t3989033

Extract the image..... .zip and then you will find the boot.img to patch.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Sorry, I did this thread geared at rooted users so I was very vague with the root process. That and the other root threads that exist. But basically, after editing the file you need to connect phone to PC, enter bootloader and double click the flash-all.bat. once it finishing updating. Extract the boot.img from the files you download it, place it in phone storage, and patch it with magisk. In magisk click install then click Select & Patch a File. Choose the boot.img you just placed in phone storage. Magisk will create a patched boot.img in the same directory as the one you placed in phone. You will need to place that new file on your PC, enter phone into bootloader and flash the new boot.img via fastboot. If you need more info the post above this has a link with much more detailed thread on how to root.
[Google Pixel 4 XL Guides, News, & Discussion] GlitchMob:
Really appreciate you writing this up. I will give it a shot tonight. Oh, and I'm already rooted. Thank you!
[Google Pixel 4 XL Guides, News, & Discussion] Some_Ghost:
so we cannot just download the update and before rebooting it go into magisk and install to the other slot?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
It should be possible, it's been done before. Some people have been having issues and I did a manual flash on mine so didn't get to test this time around.
[Google Pixel 4 XL Guides, News, & Discussion] Some_Ghost:
I will try it with next update
[Google Pixel 4 XL Guides, News, & Discussion] GlitchMob:
I might be confused, but I'm not looking for root. My issue is that I do not have a stock boot.img backup so Magisk cant find it which is preventing me from getting the OTA (since I will lose root).
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
I just tried this and magisk created a backup of stock boot.img

Download matching firmware that you are currently on from Google

https://developers.google.com/android/images

Extract the zip

Extract the stock boot.img and place in phone storage

Open magisk and press Install -> Select and Patch a File

Select the stock boot.img you just dropped in storage.

Magisk will detect it as stock and make a backup

Now you should have a stock boot.img to restore to take ota

Optional steps to enable Preserve AVB 2.0/dm-verity

When patching the boot.mg to create a backup make sure that Preserve AVB 2.0/dm-verity is enabled. Then you will need to flash the patches boot.img to enable the option.

**If you are unable to create a boot.img backup make one manually following the following steps**
[Google Pixel 4 XL Guides, News, & Discussion] Blade22222:
Updated as per instructions in the op to December update and worked like a charm. Thanks for the guide eg1122.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Awesome!! Quick question did you have preserve avb 2.0/dm-verity selected when you were on November update?
[Google Pixel 4 XL Guides, News, & Discussion] Blade22222:
No. Just Uninstalled took the update then rooted the other slot.
[Google Pixel 4 XL Guides, News, & Discussion] bluedog220:
For this (OP) process to work , do we need to wait for the phone to detect OTA? Still sitting here waiting on the December update.

Thanks
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Yes, I got impatient and manually flashed the full factory images without the -w and patched new boot.img with magisk
[Google Pixel 4 XL Guides, News, & Discussion] bluedog220:
Im starting to get there too hah! Thanks for the reply and instructions.
[Google Pixel 4 XL Guides, News, & Discussion] MikeMulligan:
Ok so managed to do this, but only after getting Magisk to make a new backup by patching the stock boot.img.

My question is, now, for next time, won't my backup boot.img be a couple versions old? Or is it safe to have magisk uninstall and restore that one every time I do an OTA update flow? Does the boot.img change with different versions in a way that will break this process?
[Google Pixel 4 XL Guides, News, & Discussion] Spartan117H3:
My phone keeps saying there's no backup of the stock image. I tried installing and patching the boot image where it says backing it up but it still won't work. I tried turning on Preserve AVB but that doesn't do anything either.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
It is my understanding that when you apply OTA and install to inactive slot, Magisk will create a backup of the new boot.img since it detects it as a stock boot.img
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
If you turn on preserve avb while patching the stock boot.img and you currently don't have it preserved then you need to flash the patches img that you just created. Once you reboot you should have preserve checked. As far as magisk not detecting the backup, I'm not sure what is happening. I'm sure there is a folder somewhere where the boot.img is backed up. Not sure on the location, if anyone knows feel free to add to this, best bet would be to check that location to see if a backup is indeed located there.
[Google Pixel 4 XL Guides, News, & Discussion] Spartan117H3:
I just turned on Preserve AVB, then patched the stock boot.img again. It worked and allowed me to take the OTA.

But now my face unlock doesn't work/it doesn't recognize me. I also can't delete face unlock because it doesn't recognize my face (I'm not sure why my pin unlock doesn't bypass the need to also recognize my face). Is it because the boot.img I backed up was from an older version and restored after the OTA? I was looking at the factory images and there's no boot.img for the December patch. How do I fix my stuff?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Maybe a bad download? I'd try downloading the zip again.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
You need to patch the December boot.img and flash. I believe flashing the November boot.img on December update breaks face unlock. You can find the factory images here

https://developers.google.com/android/images

The boot.img is in the zip inside the zip. You might have download the ota zip instead of the full factory zip.
[Google Pixel 4 XL Guides, News, & Discussion] Spartan117H3:
Yeah I did download the December OTA instead of the factory zip, I usually download the factory zip but I probably clicked the OTA page from googling the images.

EX Kernel actually breaks face unlock too with the December patch, so I had to get rid of that.
[Google Pixel 4 XL Guides, News, & Discussion] bluedog220:
I tried several factory zips (november and December) and nothing worked....until I read one of the guides here and flashed the December Boot.img to all slots and then flashed the factory images and it worked!

Having a pixel and using a Pixelbook with Chrome OS you'd think everything would be so smooth... seems like everytime I update/upgrade or "tinker" I royally mess something up lol.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Well I'm glad you got it sorted.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Yeah, I'm on stock kernel until ex gets updated.
[Google Pixel 4 XL Guides, News, & Discussion] MohamedRaafat:
I followed the exact same steps but magisk still can't detect stock boot when I try to uninstall so any suggestions ?

Can't I add it manually ? And where ?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
I don't know about adding manually, but you could try to flash stock boot.img, delete magisk data via settings, patch stock boot.img, to create a backup and then flash it to get root access. After that you could go through the steps to see if you can take ota. Might be easier to just sideload the ota or flash full zip without the -w
[Google Pixel 4 XL Guides, News, & Discussion] MohamedRaafat:
It finally worked a couple of minutes later when I restored the original magisk package name in the settings as I changed it because an app detected root with magisk hide on. So magisk was unable to detect the stock boot.img because of enabling that option in settings. Please add that to your guide as I think no one thought about this. How to sideload otas btw ?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Google has pretty good instructions for OTA sideload

https://developers.google.com/android/ota

I'll amend the OP
[Google Pixel 4 XL Guides, News, & Discussion] GrimEcho:
Yes -- I created a guide for doing this and posted it earlier (didn't know this guide already existed).

See https://xdaforums.com/pixel-4-xl/how-to/guide-alternative-method-applying-ota-t4023175

The first section will show you how to manually add the backup boot image.

---------- Post added at 07:20 AM ---------- Previous post was at 07:12 AM ----------

I made a guide that was similar to yours and have instructions for manually adding the backup stock boot image. It is easy. Full steps at: https://xdaforums.com/pixel-4-xl/how-to/guide-alternative-method-applying-ota-t4023175.

The backup file that Magisk looks for is in the /data directory. The file is named stock_boot_<hash>.img.gz. Magisk looks for these images based on the SHA1 hash stored in /sbin/.magisk/config. You can obtain the stock boot image, gzip it, then copy it to the phone (or do it all on the phone if you have the tools installed). You can either name the file using the existing hash in the Magisk config file, or change the Magisk config file to whatever hash you want. It looks like no actual verification is being performed, but I'm not positive.

You are welcome to add this information to your guide if you'd like.
[Google Pixel 4 XL Guides, News, & Discussion] JpJam:
So I have followed the guide and I am able to restore images however when I go to the OTA I get two errors "Installation problem" and then "Installation will continue when device isn't being used. To install now, tap resume" any ideas why I'm getting these errors?

I have unhidden magisk manager

Uninstalled modules and reboot

I reinstalled magisk after the failed attempts (direct install) so not sure if that messed it up
[Google Pixel 4 XL Guides, News, & Discussion] mydjtl:
Did everything yesterday and I thought it worked then today I noticed I couldnt download any apps. Tried everything to fix it then noticed under updates that update never finished. Trying again now.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Not sure why you are getting errors, restoring stock boot.img, and having dm-verity checked should allow you to update.
[Google Pixel 4 XL Guides, News, & Discussion] wks960803:
I've tried OTA update coral Jan-2020 patch and failed

my version: QQ1B.191205.012.A1

magisk version (edxposed): 20.1(20101)

my process as follow:

1. disabled all module

2. uninstall magisk (restore images)

3. download OTA (said failed)

4. uninstall magisk (complete uninstall)

failed, log attached

- Copying zip to temp directory
- Installing uninstall.zip
1566+0 records in
1566+0 records out
1603584 bytes (1.5MB) copied, 0.001779 seconds, 859.6MB/s
1045+1 records in
1045+1 records out
1070668 bytes (1.0MB) copied, 0.001427 seconds, 715.5MB/s
Archive: /data/user/0/com.IcqD.oEQC.xsx3QC/cache/flash/install.zip
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: arm/magiskboot
inflating: chromeos/futility
inflating: chromeos/kernel.keyblock
inflating: chromeos/kernel_data_key.vbprivk
inflating: util_functions.sh
inflating: x86/magiskboot
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
************************
Magisk Uninstaller
************************
- Current boot slot: _a
- Device is system-as-root
- Device platform: arm64
- Found target image:
- Unpacking boot image
open: failed with 2: No such file or directory
! Unsupported/Unknown image format
! Installation failed

5. unhide magisk manager and repeat above steps again

6. still failed to unroot/apply OTA update

please tell me if I missed some steps
[Google Pixel 4 XL Guides, News, & Discussion] airmaxx23:
Unfortunately this didn't work for me, the OTA fails to install.
[Google Pixel 4 XL Guides, News, & Discussion] molohov:
+1 on this with the January OTA after restoring images through Magisk

First screen: Installation paused. "Installation will continue when device isn't being used. To install now, tap Resume." Hit resume.

Next screen: Installing security update. Downloading and installing update. Once progress bar finishes...

Next screen: Couldn't update: installation problem
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Yeah I'm getting the same on my end. I ended up downloading the full january factory image. I pulled the january stock boot.img and patched it with magisk via "Select and Patch a File" option. I then renamed the magisk boot.img to boot.img and dropped it in the zip. I then removed the -w from the flash-all file. And then I flashed the factory images.

Basically it went like this

1. Download full factory image (in my case qq1b.200105.004)

2. Extract zip

3. Extract the stock boot.img from the other zip (in my case image-coral-qq1b.200105.004.zip)

4. Place stock boot.img in phone storage

5. Using Magisk, patch the stock boot.img via "Select and Patch a File"

6. Rename magisk_patched.img to boot.img and drop it in the image zip, replacing the stock boot.img (in my case image-coral-qq1b.200105.004.zip)

7. Remove the -w from the flash-all script

8. Optional* Disable Magisk Modules

9. Reboot to bootloader

10. Run flash-all script

11. Reboot

These steps will eliminate having to patch the stock boot img after flashing the factory images as it flashes the patched one along with them.
[Google Pixel 4 XL Guides, News, & Discussion] ilal2ielli:
Nice! I wondered if that would work, so thanks for posting that it does. It'll definitely save me a few minutes next month instead of needing to do multiple reboots.
[Google Pixel 4 XL Guides, News, & Discussion] MrPhilo:
This did not work for me, I kept getting rebooted back to bootloader. Was there anything else you did?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
No, thats all I did. The only other thing to do would be to leave the stock boot.img in the zip, flash it, then patch the boot.img via magisk and flash it.
[Google Pixel 4 XL Guides, News, & Discussion] MrPhilo:
Yeah thats what I done now, but your way would be easier for the future until TWRP. Weird how it didn't work for me.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
This phone is weird period. What works for some, dont work for others. I'm thinking it might be firmware based.
[Google Pixel 4 XL Guides, News, & Discussion] ilal2ielli:
Worked fine for me. Did you create a zip file with all the files in the root of the zip?

I use 7zip and if you select the folder to create the zip, it zips it with the folder as the root, so when the flash-all looks for the files, it doesn't find them, since it's just supposed to be in the root of the zip.
[Google Pixel 4 XL Guides, News, & Discussion] MrPhilo:
I use Rar.

What I did first time was drag and drop the magisk version of boot.img to the zip folder which did replace the normal boot as the size went down.

Second time I deleted the boot.img in the zip folder and out it in.

But I've not tried unzipping then rezipping. I'll try this next time. Can't see the difference though

---------- Post added at 10:06 PM ---------- Previous post was at 09:15 PM ----------

Is anyone the Google 'G' Logo and then a small loading progress bar under it after the Google bootanimation on every reboot?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Yeah I get the loading anim after every reboot. Doesn't last long.

Not sure if it matters, but I used 7zip.
[Google Pixel 4 XL Guides, News, & Discussion] MrPhilo:
I used to get it in December update, but I can't remember what I did and it disappeared after.
[Google Pixel 4 XL Guides, News, & Discussion] Valeriuz:
Another method could be first sideload the full image and the flash the patched boot.

I remember this method worked for Pixel 2.

Has anyone tried this sequence?
[Google Pixel 4 XL Guides, News, & Discussion] Who-Lep:
How do we figure out which image/ota to download? I am currently on QQ1B.191205.012.A1 (AT&T).

Thanks!

Julio
[Google Pixel 4 XL Guides, News, & Discussion] Homeboy76:
https://support.google.com/pixelphone/thread/24852169?hl=en
[Google Pixel 4 XL Guides, News, & Discussion] DemonicMurderer:
I cant even install the January update! Have tried it a few times it errors out and wont finish. Says Installation Problem.
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Many of us are not able to update via this method while others can. If you can't, I recomend you do the fastboot method.
[Google Pixel 4 XL Guides, News, & Discussion] DemonicMurderer:
I dont know that method. i was used to the method laid out here. can you please outline that please.
[Google Pixel 4 XL Guides, News, & Discussion] Homeboy76:
He (@eg1122) did, 5 post up (don't count this post) in quote.

:)
[Google Pixel 4 XL Guides, News, & Discussion] boeder9:
Worked for December OTA but my phone doesn't find the January OTA in updates under settings even though it's Jan 27th. Is that a common issue?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Not sure why it's not finding the update for you. I for one was not able to take the OTA. I had to fastboot it.
[Google Pixel 4 XL Guides, News, & Discussion] sruel3216:
Thanks. Previous devices I would remove -w from flash-all.bat, save and then double click that .bat file to load.

But...

On this device I remove the -w from the flash-all.sh, save and then still double click the .bat?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
If using Windows, remove from the .bat file. .sh is for other OS.
[Google Pixel 4 XL Guides, News, & Discussion] sruel3216:
That's weird I'm in windows and it's not in the .bat file
[Google Pixel 4 XL Guides, News, & Discussion] kidhudi:
@ECHO OFF
:: Copyright 2012 The Android Open Source Project
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.

PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-coral-c2f2-0.2-5940465.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-coral-g8150-00041-191016-b-5945070.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-coral-qq1b.200105.004.zip <--------------------------------------- right here

echo Press any key to exit...
pause >nul
exit

it is in there
[Google Pixel 4 XL Guides, News, & Discussion] sruel3216:
I must be blind. Found it. Thanks
[Google Pixel 4 XL Guides, News, & Discussion] mrindependent:
what about when magisk wants to update? not the app but where you have to install it through the system? what options do you choose to update it and do you have to do it the same way as when you root by patching the boot file? I was never sure about this so I never update once rooted lol. I get the OTA update part (what this post is for) just cant find anywhere that talks about how to update magisk and dont want to mess anything up. THank you!!
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Just hit the update button. Magisk will do everything. Once it's finished (will look like installing a module) just reboot
[Google Pixel 4 XL Guides, News, & Discussion] mrindependent:
Do I choose direct install or...?
[Google Pixel 4 XL Guides, News, & Discussion] kidhudi:
just installed Feb OTA and followed the directions in the OP

everything went swimmingly.

Thanks
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Yes, sorry about that
[Google Pixel 4 XL Guides, News, & Discussion] hanschke:
i am too stupid if i patch boot for my own i stuck on boot logo. Anyone have got it for feb please?
[Google Pixel 4 XL Guides, News, & Discussion] eg1122:
Not sure which one you need. The one linked is for QQ1B.200205.002

https://www.dropbox.com/s/zq6qniye1pj1zcv/magisk_patched.img?dl=0
[Google Pixel 4 XL Guides, News, & Discussion] MrPhilo:
Everytime I update using the fastboot way deleting -w and flashing the rooted boot.img my Magisk modules are not working.

They're enabled in Magisk but not working the apps like YouTube Vanced, it was just the normal YouTube (not updated in playstore) until I redownload the Magisk module and apply it again and it worked fine. Anyway to do updates without having to reapply the modules?