yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
No, you should be able to install the OTA.

In this context, what I mean by OTA is the OTA file, not the factory file. There are two ways to install it: Manually via ADB sideload, and automatically via Android Update after you enroll in the beta.

In either case, there's no need to install the Developer Preview. After enrolling in Beta, the OTA I got was Beta 5.

Yes. If those flags are not set, a patched boot will fail verification and the phone will stay in bootloader.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Awesome.

Yes, root works the same way as A11, including needing to use the Universal Safetynet Fix.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
When you install A12 for the first time, whether the beta or final, you will want to install the OTA if you want to preserve data.

My attempt to dirty flash the factory image on Android 11 resulted in a corrupted data error that required factory reset (data wipe).

I believe this is because of the differences between A11 and A12. When you install the OTA, I imagine it restructures things in such a way that preserves your data while preparing everything to work with A12. The factory image does not do this, so when it tries to boot and sees an Android 11 format /data partition, it can't make sense of it.

You can absolutely update via the factory image but you should wipe when doing so, just as you would when downgrading.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
@snovvman since you're experimenting with your 3XL, would you be willing to run a couple more experiments? There's a few ideas I would like to test to confirm some work and confirm some don't work, don't really want to do this on my daily driver for obvious reasons (although I do have my old Pixel 2, Android 12 is not available for it)

* Dirty flash A12 factory image after OTA (try this first, shouldn't wipe data, use disable flags to permit root)

* Downgrade to A11 without wipe (should result in corrupted data)

* Upgrade to A12 without wipe (should result in corrupted data)

* Erase /boot, boot into rescue mode and use Pixel Repair Tool to recover (no idea what will happen, this should also be tested with a locked bootloader)
[Google Pixel 5 Guides, News, & Discussion] snovvman:
@V0latyle, this is what I have already done.

--Dirty flash with A12 image (fastboot, no -w) over existing A12 (updated via OTA) worked fine.

--Downgrading to A11 w/o wipe just caused the phone to bootloop

--Upgrading back to A12 actually booted

Before seeing your message, I already set up the apps on the P3XL, give me some time to test a few root items and other things on my list and I'll see about circling back to Erase /boot.

Hope this helps.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Sure thing.

We also need to verify that updating A11 to A12 via the OTA works without a wipe. I'm 95% certain it does, just want to be 100% sure.

Downgrading always requires a wipe.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Unless you mean something different, that's exactly what I did--I sideloaded OTA A12b5 on top of A10 without wipe. I was able to get root back and the data stayed intact. I will try the same procedure next on my P4XL.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Oh okay, I misunderstood.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
No worries. I was able to upgrade without wipe based on your help and the information you provided. It worked as you described so thank you again!
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Anytime, I do what I can!

I'm playing around with my Pixel 2. Just succesfully used OTA sideload to upgrade from A10 to A11. Can't test it with A12 but I don't think it should matter too much for the purposes I'm testing

No rescue mode on the P2 either so I can't test that with a wiped partition
[Google Pixel 5 Guides, News, & Discussion] prgopala:
So i followed this to the tee, still cannot get the phone to reboot after flashing the patched magisk image. It just comes back to recovery saying data is corrupt.

Here are the steps

- was on android 11, rooted. Patched boot.img from beta 5 A12 using magisk canary.

- side loaded A12 beta 5

(Did not reboot, is it required?)

- reboot into bootloader

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

- fastboot flash boot --slot all magisk_patched.img

To atleast get the phone working i flashed vbmeta without the flags and flashed the stock boot img. Then it boots fine.

Also i can boot directly to magisk img using

Fastboot boot magisk.img (allows root till next reboot)

What am i doing wrong?
[Google Pixel 5 Guides, News, & Discussion] snovvman:
It looks like you followed my procedure correctly. I did not boot after sideloading. From recovery, I went directly into bootloader and fastbooted verity and patched boot. So far, I had zero issues doing it this way with my P3XL and P4XL. Both phones booted with root the first time. I see no difference with what you did.. My Magisk version is 23001.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
Stupid question, what vbmeta.img did you flash? Android 11 or the android 12 beta?
[Google Pixel 5 Guides, News, & Discussion] snovvman:
A12b
[Google Pixel 5 Guides, News, & Discussion] prgopala:
Same, yet not sure what is wrong.

Would you mind sharing your patched magisk boot img? I will try to flash that and see.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
You don't need to use the --slot all flag when flashing boot.

Please explain exactly what the problem is you're running into - it almost sounds like you're unable to boot when you have the patched image flashed to boot? Do you get an error message?

Have you tried reflashing vbmeta? That's where I would start first if I had the same problem.

Failing that, maybe dirty flash the factory image with the disable flags? Data wipe should not be necessary.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
Thanks for replying.

- So when i am flashing magisk patched image i get failed/error boot img as expected

- Following this i flash fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

- when i boot it goes back to recovery saying data error

To recover from this i need to fastboot flash vbmeta vbmeta.img and then again flash stock boot.img.

The only way i can get root is to boot directly the magisk patched img from fastboot.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I am willing to bet that you did not uninstall Magisk before installing the ota. Or at least uninstall all Magisk modules.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
I had only disabled the module. Did not uninstall.

None of the process in any of the posts above mentioned about removing magisk or uninstalling the modules.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Shouldn't be necessary.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
That's odd.

Try flashing vbmeta with the disable flags, but leave the boot image stock. Then, boot the patched image, and in Magisk, select "direct install", then reboot.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
I will try this and report.

Appreciate your time on this mate.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Agree with @V0latyle. I rooted as described in my earlier posts without uninstalling Magisk or any of the modules.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Attached. Use at your own risk, ymmv.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Please ask in the Magisk Support/Discussion thread.
[Google Pixel 5 Guides, News, & Discussion] elong7681:
Ok
[Google Pixel 5 Guides, News, & Discussion] zhuanyi:
Think I know the answer for this one but just want to make sure:

once i used OTA update and rebooted there is no way I can root/get Magisk working without a data wipe correct? I tried to flash vbmeta with the flags suggested but that only brings a corrupted data warning and asked me to factory reset.

Is there anything that I can use to backup the phone that doesn't require root? I use Titanium so far but that requires root.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I just threw the idea out there.

I know when I was on A11. I had to remove Magisk before I flashed the monthly updates. If I didn't, I could not boot a patched boot Magisk image.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
Appdash, edit : root is needed.
[Google Pixel 5 Guides, News, & Discussion] zhuanyi:
Tried this method, after flashing with the vbmeta with flags (but not the boot image) and tried to boot with the patched boot (by using fastboot boot patched.img) the system won't boot up and ended up with corrupted data message again...
[Google Pixel 5 Guides, News, & Discussion] prgopala:
I will try this and report. Appreciate your time on this mate.

Same, after flashing vbmeta with flags (leaving the boot img still stock), i tried to boot with the magisk img, but it still comes back to recovery with 'corrupted data' msg.

So the only way root works for me is temporary by

- having stock boot img + stock vbmeta (no flags) and then booting directly the magisk img

Tried something else as well..

- with temp root i opened magisk and directly patched the stock img and then restarted the phone.

- as expected stuck at bootloader with failed boot img.

- flashed vbmeta with disable flag, reboot took it back to recovery with corrupt data msg.

So at this point i have come to believe that going from A11 to A12 beta requires a wipe if you want a permanent root (i understand that @snovvman did successfully update without wipe and has root but the same procedure did not work for me :( )

Though i am fine with having temp root, i rarely restart my phone and the only modules i have atm is the 'navbargone'. I can still backup my data if required.

Hoping to upgrade to Pixel 6, and since that is quite near now happy to live with temporary root for the while :).

Thanks for all the assistance guys. Everyone is awesome in the group and very helpful.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
You can have temporary root by ...

- having stock boot img + stock vbmeta (no flags) and then booting directly the magisk img.

That will allow you to use titanium back up as rooted.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I won't lie, I did wipe when I upgraded to 12b5.

It sounds like there's some additional factors at play here that we weren't aware of.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I would try reflashing the factory image with the disable flags set, but don't wipe data. See my guide on how to do this.

Also, how did you first do the upgrade to A12?
[Google Pixel 5 Guides, News, & Discussion] prgopala:
Yeah i tried flashing the factory images with flags disable, it would not boot and go back to recovery with the 'data corrupt' error.

Flashing without flags works of course.

I did the first upgrade by sideloading the ota, beta 5.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I hate to say this but I think your best option is a complete factory reflash. Use the Android Flash Tool, force flash all partitions, do not skip secondary, wipe data and check both disable flags. It sounds to me like you need to start fresh. It's hard to say what is corrupted and why, and if a dirty factory flash didn't fix it, it's time to reflash everything and start with a clean slate.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Interesting that you had to do that. For me, and I've read the same from others, we never needed to remove Magisk. For as long as I can recall A9, 10, 11, etc., I simply flashed the image each month without -w, then immediately reboot into boolaoder, flashed patched boot. This way, the first boot after the update immediately has permanent root. I did this to prevent Playstore becoming uncertified. Not once had I to remove Magisk. It was a very reliable procedure.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
That is how I always done it.

But with A12, I used the flash tool without wiping data. I will be using the flash tool from here on out.

I always uninstalled Magisk before.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
You previously wrote that unless you removed Magisk before flashing, the device would not boot. What were the errors you were experiencing? And once you removed Magisk, everything was fine? If the device did not boot, how did you recover from that? I'm looking for a nexus to the failed A12b updates.

It's curious to me that I was able to sideload A12b, flash verity, flash patched boot on two devices without any issues, while two others report seemingly the same procedures but get corrupted data.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
To recover from a boot loop.

I would try the safe boot method with temporary root. Or flash-all with the w as a last resort.

Edit; I was using EX kernel on A11, do not know if that was a factor or not.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
That depends on the magisk module that you are running.

For e.g.

I use centre clock + navbargone modules which would work fine (without disabling it in magisk) when flashing monthly security updates but would break for quarterly feature releases (may be due to system files getting changed in a quarterly update).

Hence i would just disable all modules before monthly update.

But i never needed to uninstall magisk itself.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I use the CC and no battery icon module. Like you are saying there is something about modifying the systemui. For me it is easier to just hit the uninstall on the Magisk main screen. I keep a copy of Magisk.apk for a clean install, since it has to be patched anyways.
[Google Pixel 5 Guides, News, & Discussion] mistermojorizin:
question, now that Android 12 is out of beta, would i be able to flash a modified kernel without messing with vmeta (or the required data wipe)?
[Google Pixel 5 Guides, News, & Discussion] zhuanyi:
Tried it today, no luck, same errors as beta.

Ordered a pre-order Pixel6 today and when the device arrives I'll root and use migration tool to copy my P5 settings to P6, perhaps easier to do this than clean wipe P5 and start from scratch...
[Google Pixel 5 Guides, News, & Discussion] mistermojorizin:
yep same....confused, why did it work on a11 then? that was the reason people gave - that it was a beta
[Google Pixel 5 Guides, News, & Discussion] peikojose:
Is magisk working with A12?
[Google Pixel 5 Guides, News, & Discussion] Fun_GKC:
I receive the A12 OTA on my rooted Pixel 4a 5G. I guess the best way is to uninstall Magisk and update using the OTA?
[Google Pixel 5 Guides, News, & Discussion] blackroseMD1:
Not working for me on the final release. Just reboots right back to fastboot after flashing.

Edit: meant for that to be a response to @peikojose
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Yes same for me here. I've installed Magisk Canary in the final stable release of Android 12 via ADB and patched the boot img but it just reboots right back to fastboot after flashing.

Has anyone gotten around this yet?
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Dirty flashed A11-to-A12 on my Pixel 5 and apparently we were not supposed to do that. Fastboot menu stuck with the patch boot.img method on this Pixel 5 but a reflash at least gets it working (less root). I dirty flashed two Pixel 3's this afternoon and had 0 issues so I guess the method for the 5 is going to be different. If anyone knows how to stay on A12 and get magisk working without a factory reset, let me (us) know. I tried to go back to A11 and the phone loops.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Yeah I don't fancy doing a wipe to achieve root. Only as a last resort. I'm on a Pixel 5 4 G and can't get it working.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
How does wiping your phone obtain root though?
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
In another thread a guy explained there is some sort of security measure in place (I guess with this pixel 5+ because it didnt happen with my 3's) That if the boot.img doesnt match quite right it flags the phone from starting (I am speaking in my own laymans terms here and I am not privy to that). I guess its a counter-magisk effort if you will. Anyway apparently if you side-load the OTA on A11 you can get around it with a few fastboot/adb commands but flashing the the full A12 stock image it will cause the old magisk root method to fail. The problem is I already flashed 12 because I did not know about this, well since I have been dirty flashing this phone for a year and going back to 11 loops the phone so I am stuck on A12 with no root.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Nightmare, I'm sure a fix will come 👍
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Hopefully! I always run into problems screwing around with updates "the-day-of" but just cant help myself lol.

-from the other post-

Dm-verity (device-mapper-verity) is a method by which an image on block devices (the underlying storage layer of the file system) can be checked to determine if it matches an expected configuration, using a cryptographic hash tree. If the hash doesn't match, dm-verity prevents the stored code from loading.

Vbmeta verification is the other half of this - it provides a cryptographically signed reference hash which is used to verify the integrity of /boot, /system, and /vendor partitions. The vbmeta image is only used to verify /boot, while vbmeta-system is used to verify /system.

This was implemented to prevent persistent rootkits by means of a hardware level security check, to prevent "potentially harmful applications" such as Magisk from evading detection, as such applications residing within the kernel will have higher privileges than the detection applications.

What this means is that with these two enabled, a modified boot image will cause a verification error when flashed to the device, preventing boot. Interestingly, this check is not performed against "live" boot images loaded via ADB, so with dm-verity and vbmeta verification enabled, a modified image can be booted as long as the image in /boot is intact.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
This is not a Magisk issue; this is the new Verified Boot 2.0 that has been introduced with Android 12. If you read back through this thread, you'll see how this was discovered on the beta and how we had to circumvent it.

Please read my guide on rooting Android 12 here.

If you tried rooting after updating to Android 12 and are stuck in a boot loop, just reflash the factory boot image.

Please note that some users are experiencing a data corruption error with the official 12 release, after following the same instructions that worked on the 12 Beta. If you run into this problem, just reflash the factory vbmeta and boot images (without the disable flags), and you'll be able to use your phone while we look for a solution.

I believe you can still live boot the patched image, so if you absolutely MUST have root, just boot the patched boot image from fastboot (do not flash it). Be aware that if you reboot, the phone will load the stock boot image and you won't have root anymore.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
I think this is peculiar to pixel 5 considering that @Rumsfield and @snovvman have used the same method on pixel 3 and could root without wiping data and can still have permanent root.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Yes, I discovered that over on Reddit as well. Verified Boot has not been introduced on all devices, so far only the 4a 5G, 5, and 5a have been the Google devices on which this was implemented with the update. Not sure about other devices.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
Ah that makes sense now. Thanks for letting know here.
[Google Pixel 5 Guides, News, & Discussion] prgopala:
And also this... https://www.xda-developers.com/magisk-developer-topjohnwu-leaves-apple-joins-google/ .. does not help our cause :D
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I wouldn't be so sure. It could definitely be a benefit, although I can understand where you're coming from - he joined the Android Platform Security Team, which raises the question as to whether he could continue to develop Magisk, which directly compromises Android security measures.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Took the pain and wiped and went through what they said and it works.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I just updated using the OTA, and I'm without root until I get home. I'm going to make sure I back everything up just in case.
[Google Pixel 5 Guides, News, & Discussion] slim94:
Any idea how we can accomplish the "booting from boot.img" without flashing? Google has failed me :(

Edit: seems i didn't look hard enough: fastboot boot image_file.img

Thx
[Google Pixel 5 Guides, News, & Discussion] mistermojorizin:
Ever since the beta, I've just been boooting the patched kernel instead of flashing it. I can't deal with a data wipe. I thought it is going to be solved once the final a12 was out. This boot 2.0 is like planned obsolescence, because if I have start over, I might as well buy a new phone. It takes forever to set everything up again anyway.
[Google Pixel 5 Guides, News, & Discussion] peikojose:
Same here.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I just updated using the OTA, and I'm without root until I get home. I'm going to make sure I back everything up just in case.

I think you're being a little dramatic. We will figure it out, like we've figured everything else out. It just takes time, and Android 12 final has only been out for a day.

A data wipe isn't that big of a deal if you're backed up to your Google account.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Were you both on A12b with permanent root?

--Are you saying that after the general A12 release, the method in which you used to achieve permanent root no longer works?

--What was the update path?

--OTA via download or sideload, flashing full image?

--Also, what are the devices?

--Lastly, I presume your root method was flashing verity with flags and patched boot?

I'm trying to collect some data so we have a better understanding. Thanks.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Please feel free to post your method and results in this thread so we can try to get everything straightened out.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Here's to hoping that Pixel 6/Pro are rootable with current methods and there are no surprises:

"The [Tensor] chip also has a Tensor security core, which is a new system that will do processing on sensitive data separate from the main CPU. The chip also has a new Titan M2 onboard to work beside the Tensor security core.

Google said the Titan M2 has been made resilient to advanced attacks including electromagnetic analysis, voltage glitching, and laser fault injection."

Hoping these "features" won't affect our ability to root and pass SafetyNet.