yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5 Guides, News, & Discussion] tinhsoftware:
hello, my phone is pixel 4a 5g. i believe the step is going to be the same. I want to make sure that my modified flash all.bat file is corrected

Before modify : fastboot -w update image-bramble-sp1a.211105.003.zip

after: fastboot --disable-verity --disable-verification --skip=reboot -w update image-bramble-sp1a.211105.003.zip

is that right?
[Google Pixel 5 Guides, News, & Discussion] pershoot:
Backup all data (Apps, SMS/MMS, Pictures, etc.) via Google Backup / Swift Backup (you can do third party apps with this but not all may be able to be restored, so you may end up clearing storage for it in the end; leave System Apps off; you may end up getting stuck in a 'Pixel is Starting' situation so tread carefully), etc.

then,

This is what you can do:

1. Unpack: bramble-sp1a.211105.003-factory-39b4b71c.zip

2. Go inside bramble-sp1a.211105.003/image-bramble-sp1a.211105.003.zip

3. Pull out boot.img

4. Grab Canary 23012: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-debug.apk

5. Install it; transfer boot.img (adb push boot.img /sdcard/Download) to /sdcard/Download

6. Canary -> Magisk -> Install -> Select and Patch a File -> select boot.img from /sdcard/Download

7. Pull back magisk_patched-23012_<5 letter code>.img (adb pull /sdcard/Download/magisk_patched-23012_<5 letter code>.img .

8. Rename magisk_patched-23012_<5 letter code>.img to boot.img (Win: rename magisk_patched-23012_<5 letter code>.img boot.img ; *nix: mv magisk_patched-23012_<5 letter code>.img boot.img)

9. Use WinRAR (https://www.rarlab.com/download.htm) to open image-bramble-sp1a.211105.003.zip and drag the boot.img replacing the file that is in there; leave the defaults -> ok

10. Edit flash-all.bat (win: notepad) or flash-all.sh (*nix: vi) in the root of bramble-sp1a.211105.003; replace fastboot -w update image-bramble-sp1a.211105.003.zip with fastboot --disable-verity --disable-verification -w update image-bramble-sp1a.211105.003.zip

11. Save file

12. Enter bootloader; adb reboot bootloader

13. flash-all.bat or ./flash-all.sh

14. It will get wiped on the last step after flashing (last will be Erasing userdata).

15. The phone will bounce. Re-edit flash-all.bat/.sh and remove the -w in there. Save.

16. Done; re-setup / restore phone; you will have permanent root capability

17. Turn off Automatic System Updates via Developer Settings.

..
[Google Pixel 5 Guides, News, & Discussion] creezalird:
it depends from which rom you are having now. I am using 4a5g too

if now on other rom besides stock 12 (wipe mandatory, refer the -w flag):

fastboot --disable-verity --disable-verification -w update image-xxxxxxx.zip

if now on stock 12, dirty flash :

Post in thread '[GUIDE] Update to and Re-Root Android 12 **READ THE NOTES**' https://xdaforums.com/t/guide-update-to-and-re-root-android-12-read-the-notes.4345627/post-85873917
[Google Pixel 5 Guides, News, & Discussion] tinhsoftware:
Thanks. I am from android 11. I believe the -w have to be there.
[Google Pixel 5 Guides, News, & Discussion] pershoot:
If you want to try out A12 before committing to a wipe:

adb reboot sideload

adb sideload bramble-ota-sp1a.211105.003-8ac6d937

fastboot reboot or Reboot via Fastbootd menu after it is done.

You can do all the steps above (previous post) while on A12 after you play with it some. You can live boot for root while running (will not survive a reboot):

Magisk -> patch boot.img

adb pull /sdcard/Download/magisk_patched-23012_<5 letter code>.img .

adb reboot bootloader

fastboot boot magisk_patched-23012_<5 letter code>.img
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
Nice! Thanks for the PS information. (y)
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
Nice! Thanks for the Pixel 4a 5(G) information. (y)
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Are you sure? From the experiences we have all had, it appears that verity and verification must be disabled to load a patched boot image on Android 12 on the SD765G and Tensor devices...and when it is disabled the first time, it requires a data wipe.
[Google Pixel 5 Guides, News, & Discussion] creezalird:
Yes I agreed on that, maybe it is a confusing there, but it refer to my experience by flashing using flash-all.bat with wipe/disable

Basically I didnt use the vbmeta flashing method to disable it
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Oh I see what you're saying. No, when you flash the factory image with the disable flags, it flashes /vbmeta with the disable flags, so reflashing vbmeta is not necessary.

If you sideload the OTA on the other hand, you do have to reflash vbmeta.
[Google Pixel 5 Guides, News, & Discussion] creezalird:
yes, if you feel that it can be misleading, i can remove that part. Else people can get confused
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I would, just because this is something we have to be pretty black and white about.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
Or he/you could add this to it when flashing factory image via ADB only. Why? Because it works on the pixel 4a 5(G) and may work on the Pixel 5. It would not

confuse

anyone, just provide

another less complicated option

for upgrading/updating those phones. Seems pretty black and white to me.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
If you understand what he is saying, why not add the Pixel 4a 5(G) note to the Reminders?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Agreed.

The confusion arises from this:

This implies that verity and verification need not be disabled when upgrading from Android 11...which if you want permanent root, is not true. This can be omitted if one flashes the factory image, as they can incorporate the flags into the command:

fastboot update -w --disable-verity --disable-verification image-device-buildnumber.zip

However, if the update is performed via the OTA, then vbmeta must be specifically disabled.

This is true across ALL affected devices - Pixels on the SD765G and Tensor. It is not specific to one device.

Still, I will update the notes for the sake of clarity.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
I didn't read @creezalird edits as confusing. Why? He wrote in the modify flash-all.bat file: fastboot flash -w --disable-verity --disable-verification image-bramble-sp1a.999999.999.zip

I do see your point, some might think the -- disable--verity --disable-verification is not needed.

Thanks for updating your notes. :)
[Google Pixel 5 Guides, News, & Discussion] digger16309:
I'm not clear on why there is a focus on the OTA update.

Since I've been rooting Pixels, I flash the factory image via adb. One has to use adb anyway to root after the update.

Based on the recent discussion, it seems like the most straight-forward path is to flash the factory image and add the disable verity and disable verification lines to the flash-all script.

After update, then root.

What an I missing?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Nothing, you're exactly correct.

fastboot update --disable-verity --disable-verification image-redfin-buildnumber.zip

Allow update to complete including a reboot. Patch boot.img

after

the update, then reboot to bootloader and flash.
[Google Pixel 5 Guides, News, & Discussion] Neuken6969:
I was A11, somehow took the OTA to A12. I was reading all the posts and different methods to root. It seems regardless I have to wipe the phone to get root. So I'm going to backup everything. Download the A12 firmware and jump back on here to get root. Sorry for I guess not answering you, my dog died today. I am looking into obtaining root on A12.
[Google Pixel 5 Guides, News, & Discussion] profetia:
When I added the --disable-verity --disable-verification line while flashing the november factory image file, my pixel 5 didn't boot up, Instead I just got the error message "no valid slot to boot". I could only choose between Try again / Factory reset, but I went back to fastboot and when I ran all adb's commands like usual without that extra line I managed to boot into system but without root.

I wiped my phone when upgraded to A12, got root on october update, and then lost root when trying to flash november just like I always did.

When I patched and tried to boot to the magisk boot file I cant boot into system.

Any help is much appreciated

Thanks 🙏❤️
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
Was it the the first time you upgraded to Android 12 from Android 11?

Did you edit the flash-all.bat file?

Changed this line:

fastboot -w image-redfin-sp1a.999999.999.zip

to this: fastboot -w --disable-verity --disable-verication image-redfin-sp1a.999999.999.zip
[Google Pixel 5 Guides, News, & Discussion] valievkarim:
Hello

I somehow managed to update my Pixel 4a to Android 12 without wipe, and keep persistent root. I don't know what I did, but I never seen the 'data corrupt' message, but had another problem with boot stuck on G logo with progress bar, after flashing patched boot.img. And this fixed by adb shell, su, magisk --remove-modules

Double checked: rebooted again, all my data in place, android 12, root works

Using Magisk canary 23012
[Google Pixel 5 Guides, News, & Discussion] j-a-d-z:
4a has the SD730G instead of the SD765G. So afaik no wipe is required. It is only required on the SD765G based 4a 5G, 5, 5a and the Tensor based 6 and 6 Pro.
[Google Pixel 5 Guides, News, & Discussion] digger16309:
Then I'm confused about the need to wipe.

If I uninstall magisk, restore the original boot image to A11, then flash A12 factory image, remove -w but add the disable flags, I'm then on A12 unrooted.

Install magisk, patch boot image, flash patched image.

I'm then rooted on A12 without wiping, yes?

Again, what am I missing?

I don't understand the need to wipe in this scenario.
[Google Pixel 5 Guides, News, & Discussion] profetia:
That's probably where I did wrong. I did a normal wipe without that extra line. Booted up and then tried to patch magisk boot.

If I get you right now the only way to get root back is to add that line and wipe it again?

Thanks
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Read the OP, please. It's been explained thoroughly. If you try flash a patched boot image on stock A12, on the 765G and Tensor devices, bootloader will reject your boot image:

failed to load/verify boot images

To fix this, you have to reflash vbmeta:

fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img

If you have not wiped, and AVB was not already disabled, this will result in booting into recovery (Rescue Party) telling you your data is corrupted with the option to try again or factory reset.

Meaning: A wipe is required when you upgrade from Android 11. A wipe is required when you root the first time on Android 12. A wipe will also be required if you let the phone boot after forgetting to disable verity and verification.

I have an untested idea that one could try and disable vbmeta while still on A11, then dirty flash the A12 image also disabling vbmeta...but as far as I know this will require a data wipe as well.
[Google Pixel 5 Guides, News, & Discussion] digger16309:
I've kept up with this thread since the OP, but I've gotten turned around a bit . What I'm still not grasping (apparently) is why disabling verity and disabling verification in the flash script when using the factory image to upgrade from A11 to A12, doesn't fix the issue. I thought I saw somewhere that it did. I admit that the part of my problem could be getting confused by the Pixel 4a users in this thread.
[Google Pixel 5 Guides, News, & Discussion] elong7681:
My apologies
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I feel like I'm repeating myself...

Yes, you can disable verity and verification using command line options when flashing the factory image, and you can do this when upgrading from Android 11. You will still have to wipe, though. This is unique to Tensor and 765G devices. The 4a is a Snapdragon 730 device and is not affected by the AVB/data wipe issue.

Please don't hijack threads with off topic posts, thanks.
[Google Pixel 5 Guides, News, & Discussion] ipdev:
Hi. :)

To confuse and then hopefully clarify. ;)

Yes. Maybe. No.

Depending on you Android 11 install and setup.

Boots into Android 12.

Gets stuck in a forever boot.

[Boots to the Boot Animation and never continues or fails out.]​

Tries to boot [Splash Screen] fails out and reboots into Rescue Party or the bootloader.​

The Magisk part is the correct steps. 🙃

Without wiping userdata initially after disabling verity and verification on Android 12, you will trigger the data corruption error after flashing the Magisk patched image. ;)

Basically (as of now) you need to wipe data after the initial disable of verity and verification on Android 12.

Without wiping userdata changing the boot image will trigger the data corruption error.

The wipe only needs to be done if the device has booted into system while verity and verification were enabled.

Even updating from Android 11 (with verity and verification disabled) to Android 12 (with verity and verification disabled) still requires a data wipe.

The initial boot fails and you are rebooted into Recovery Party. :censored:​

As long as you keep verity and verification disabled after you initially wiped userdata on Android 12, you do not need to wipe again. ;)

---

Using the Full Factory image, you can set the disable options when vbmeta is flashed by the update command.

By adding the --disable-verity and --disable-verification option(s).

Example.

First time. [Include initial wipe.]

fastboot -w --disable-verity --disable-verification update image-redfin-sp1a.210812.015.zip

After the initial wipe, you can update (or dirtyflash) without having to wipe again.

fastboot --disable-verity --disable-verification update image-redfin-sp1a.211105.003.zip

Unless you booted into system while verity and verification were enabled.

Then you will have to wipe userdata again.

Updating by using the OTA (incremental update), you can not set the disable options when vbmeta is flashed by the updater.

So you need to reboot to bootloader and reflash vbmeta with the disable options before rebooting into the updated system.

I am not familiar with the OTA steps so I can not give an example. ;)

Hope it helps more than confuse. 🙃

Cheers. :cowboy:

PS.

This issue affects the Pixel 4a (5G) [bramble] and newer Pixel devices.

Does not affect the Pixel 4a [sunfish] and older Pixel devices.
[Google Pixel 5 Guides, News, & Discussion] digger16309:
Thank you! Very much appreciated - I understand now!
[Google Pixel 5 Guides, News, & Discussion] Regys:
Hi,

How to simply check if "dm-verity" and "VBMeta Verification" are activated or not ?
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Is there a post that describes exactly what is the correct way to "dirty flash" A12 (which was wiped) to the latest Nov patch without losing root or soft bricking the Pixel 5?

I dirty flashed from 12.0.0 (SP1A.210812.016.A1, Oct 2021, Verizon) to 12.0.0 (SP1A.211105.002.A1, Nov 2021, Verizon, Verizon MVNOs) and it once again soft bricked the phone after I flashed the magisk patched boot.img. I couldnt get out of it and had to -w and start again on this months firmware.

What exactly are the commands for ADB when upgrading to the monthly security patches now? This would be a wiped pixel 5 currently on latest firmware with root. :edit and I think this should be stickied for everyone on the latest build and wiped already and just want to move onto the latest months firmware going forward.
[Google Pixel 5 Guides, News, & Discussion] pershoot:
https://xdaforums.com/t/guide-android-12-update-and-root-read-the-notes.4345627/post-85885591

However,

Before flashing to update your already rooted and previously wiped userdata with boot verification off, remove the -w from the flash-all script while retaining --disable-verity --disable-verification (step #10 and #15).

Disregard the backup pieces since you are not wiping (again); only updating while maintaining boot verification off.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
There is no way to check. If you want to be safe, then reflash vbmeta with the disable options every time you're in bootloader following an update.

If it isn't disabled, you will get an error in bootloader if your boot image is modified:

failed to load/verify boot images
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Agreed

Best way to update to the latest firmware is to use the factory image, so as to avoid reflashing anything

1. Compare bootloader version. If different, flash new bootloader image.

2. Compare radio version. If different, flash new radio image.

3. Flash system image:

fastboot update image-redfin-buildnumber.zip --disable-verity --disable-verification

4. Allow update to complete, device will reboot into system.

5. Patch and flash boot image.

I recommend allowing the system a clean boot on the stock boot image before you flash a patched boot image.
[Google Pixel 5 Guides, News, & Discussion] Anonshe:
Doing a

getprop | grep verity

or

getprop | grep vbmeta

in a shell will reveal the status provided it hasn't been cloaked by props or modules such as USNF.

c.c. @Regys
[Google Pixel 5 Guides, News, & Discussion] Regys:
Hi,

Do I first deactivate Verity and Verification (currently A11) before following this guide or it is not helpful ?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
That's actually not something that anyone has tried to my knowledge. If you intend on upgrading to A12, I have an idea you can test if you're willing? The worst that happens is that you'll have to wipe your phone - which currently seems required anyway. Do you want to give it a try? I'll give you instructions if you do.
[Google Pixel 5 Guides, News, & Discussion] hfam:
On that note, has anyone on A11 October tried either:

- Flashing just vbmeta from A11 Oct full system image, using the disable flags, then tried a dirty flash of A12 Nov FSI, also with disable flags

-or-

- Dirty flash A11 Oct FSI over the same installed A11 Oct using the disabled flags, then dirty flash A12 Nov FSI

Wondering if either would avoid the necessity of the system wipe with the first install of A12 FSI in order to be able to then flash modified boot images with success.

If nobody's done it yet or knows for certain it wouldn't work I may go guinea pig and try it. *May not be for a bit yet, but as soon as I have a day of life buffer to deal with possible issues and restores, there's really nothing to lose as currently I have to wipe anyhow.*
[Google Pixel 5 Guides, News, & Discussion] ipdev:
I have not tried in a few weeks.

Give it a try maybe [ hopefully ;) ] you will find a way. :D

Cheers. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] Regys:
Hi,

I will also answer @Homeboy76. My mobile is a pixel 5.

I made myself at the idea of wipe my phone, I made backup of my apps and data.

Yes I want to try, I also think using the method with Android Flash Tool.

As long as I do not make bootloop or brick.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Okay. If this goes wrong, the worst that will happen is you will have to perform a factory reset.

Download the factory zip for the Android 11 firmware currently on your device. Extract vbmeta, then reflash it with verity and verification disabled. Reboot, and see if the device boots successfully. If it doesn't, and you get a Data Corrupted message, don't worry.

Now, use the Android Flash Tool to install the latest firmware. Make sure "Disable Verity" and "Disable Verification" are checked. If you were able to boot into Android after reflashing vbmeta, do NOT wipe data; if however you got stuck on the Data Corrupted screen, you will have to.

Let me know if you need more detailed instructions.
[Google Pixel 5 Guides, News, & Discussion] Regys:
How do I understand how to Flasher Vbmeta ? I extracted it on my pc, and after ?

I have to put it on folder platform-tools and use this code ?

fastboot --disable-verity --disable-verification flash --slot=all vbmeta vbmeta.img
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Yes, you can do that, or you can simply do this: Type your command:

fastboot flash vbmeta --disable-verity --disable-verification

Then drag and drop the vbmeta.img into the command window.
[Google Pixel 5 Guides, News, & Discussion] BagusPambudi:
Does anyone know why the Google Chrome app on Android 11 often gets bugs?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
It's not necessary to quote the original OP when asking a question.

Additionally, your question should be related to the topic of the thread. Please post off topic questions in a separate thread.
[Google Pixel 5 Guides, News, & Discussion] BagusPambudi:
Sorry
[Google Pixel 5 Guides, News, & Discussion] Regys:
I could do that, normally it's ok ?

So I can go to the installation by Android Flash Tool, on the other hand I think it offers me the beta SPB5.210812.002 (7671067)

In your opinion I disable "Wipe Device" ? after that does not pose a problem to make the wipe.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Okay, now see if your phone will boot. If it does, continue to the next step.

You can select what build you want to install. The only boxes that should be checked are "Disable Verity" and "Disable Verification".
[Google Pixel 5 Guides, News, & Discussion] Regys:
Hi,

Everything went well, I was able to install Android 12 and root it ;).

By cons I do not pass SafetyNet "CTS Profile Match"
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
So you didn't have to wipe data?

I am able to get SafetyNet to pass on my P5 with Magisk 23001 and Universal Safetynet Fix 2.1.1
[Google Pixel 5 Guides, News, & Discussion] Regys:
No, I did a wipe to be clean.

For SafetyNet it's resolved I did not have to install the 2.1.1. I use Magisk stable.

For the next update it will have to do the same again ? Disable Verity, Verification and Use One Methods of the Guide ?
[Google Pixel 5 Guides, News, & Discussion] j-a-d-z:
So you had to wipe to boot after

fastboot flash vbmeta --disable-verity --disable-verification

on 11 so the experiment failed or "didn't have to" but wiped anyway "to be clean" so the experiment … failed successfully?

¯\_(ツ)_/¯
[Google Pixel 5 Guides, News, & Discussion] ipdev:
It does not make a difference if verity and verification are disabled on Android 11.

Once you flash Android 12, you will need to wipe data. 🤬

I hope someone will proves me wrong on this and find a way of updating. :D​

Cheers all. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] Regys:
No, I first disabled Verity and verification under Android 11.

Then I updated with Android Flash Tool
[Google Pixel 5 Guides, News, & Discussion] puterboy:
So, after reading the full thread and the last page of posts, it is unclear to me whether there is now a way to upgrade to Android 12 with root and without having to wipe.

If it is indeed possible (and confirmed) on a Pixel 5/5a, could someone write up the adjusted full set of steps required (and perhaps even start a new thread to keep it clear). I don't want to do something wrong that would require me to deal with a wiped phone (again).

If it's not confirmed or if it doesn't work universally, I will can wait (patiently) on Android 11 until a confirmed solution emerges.

Thanks.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Well, the whole idea was to see if it was possible to upgrade to Android 12 and root without wiping data.

As of right now, no. Follow the directions in the OP; there is unfortunately no way that we know of to preserve your data.

Just make sure your photos are backed up, and everything else to Google One, and you'll be fine.
[Google Pixel 5 Guides, News, & Discussion] Regys:
I did not understand like that sorry, but I think it's not a problem if you save his phone and apps.

What I have done.

1 / I made a backup of my mobile via Google

2 / I made a backup of my apps via Swift Backup

3 / I restored all that as fast as doing backup

I have not had anything to do in the system settings, only what differs from Android 11