yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
For those of you who have not yet wiped data and are using unrooted Android 12:

As long as your system boots, you should be able to live boot a patched boot image and use that for temporary root:

fastboot boot patched_boot.img

If you are currently stuck at the "corrupted data" message in recovery, try sideloading the OTA or dirty flashing the factory image (with NO FLAGS). If that doesn't work, the only fix that I know of that works is to perform a factory reset...but if you get to that point, you might as well clean flash the factory image with both --disable flags:

fastboot --disable-verity --disable-verification -w update redfin_image.zip

at which point you should be able to flash and boot the patched boot image.
[Google Pixel 5 Guides, News, & Discussion] killchain:
Yeah, I'm thinking I'll just boot the patched image and go with that for the time being. I had an uptime of more than a month before the update to 12.
[Google Pixel 5 Guides, News, & Discussion] pappy97:
This works beautifully! Yeah it's not persistent, but it works! Every time I install a magisk module, instead of letting magisk reboot it, I reboot into the bootloader and boot the patched image. Works great, thanks!!
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
Wow, that's a pretty good workaround until a viable permanent method is discovered for A12. Awesome job! 👏🏼
[Google Pixel 5 Guides, News, & Discussion] Dark_Eyes_:
I know it's a bit OT, but I'm wondering if it isn't some side effect of installing A12 on top of A11 rooted. For now I just boot the patched magisk image through fastboot to prevent having to factory reset, but I might have to in the end. Anyway, am I the only one to see this when going in the At a glance settings?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I saw that too, and I performed a wipe.

There should be no issue with upgrading from rooted A11. The only issue should be trying to dirty flash the factory A12 image over A11. The proper way to upgrade while retaining data is to use the OTA.
[Google Pixel 5 Guides, News, & Discussion] Dark_Eyes_:
I used the ota. Can you check in the settings if you have the same thing as me? (long press the date on the homescreen, customize, gear icon besides At a glance).
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
I noticed I have the same visual oddity, even in dark mode. Perhaps an A12 bug?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
As I said, I'm seeing the exact same thing.
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
Hm, I suppose we could see what it looks like for someone who wasn't rooted and updated to Android 12 normally, to rule out that happening from root, or the methods to get there.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I originally took the OTA coming from beta 5, but I didn't think to check.

There are some other individuals in here that are unrooted, although I highly doubt this bug would be specific to us rooted folks
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
Yeah, honestly, I'm just suspecting it to be a visual bug with A12 in general. Could be wrong though.
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
I do wonder though, when the smaller updates do eventually come through, will a data wipe be needed to keep root from version to version? (for those that did the permanent root methods)
[Google Pixel 5 Guides, News, & Discussion] elong7681:
I'm not rooted anymore since I dirty flashed A12 stable over beta 5 with disabled flags and I have the same issue
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I doubt it, but we will see.

Patch the boot image, and live boot it for temporary root.
[Google Pixel 5 Guides, News, & Discussion] andybones:
I agree with @V0latyle

It should be similar to A11 for monthly updates.

I think Google patching the current Magisk stable is more likely to happen first. Especially with John working at Google. But with 200+ contributors to Magisk source and such an amazing community, it'll be interesting to see what's to come.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I can't see Google trying to actively prevent root access; on the other hand, I wouldn't think it unreasonable for them to try to prevent compromised security from being reported as intact (hardware attestation, SafetyNet for example) due to the potential liability of processes with root permissions having the ability to compromise applications that depend on security.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Notes from the other thread:
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
Interesting discovery, as much as I would like to be that guinea pig to test all that out, I don't have a spare Pixel 5 to do this with, lol. I definitely don't want to mess with potentially losing my data or having to factory reset, so I guess I'll just have to observe and (probably) troubleshoot later on.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
Nice guide except one: the new AVB features that you say were introduced in Android 12 are present in Android 11 too. It's just that in custom roms, courtesy of Lineage, they have been disabled via:

BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2

The first one disables hashtree verification, the second one allows roll backs, which are not needed anyway since there is no hashtree verification. As a matter of fact ALL of their multiple AVB entries including AVB_ENABLED=true are pretty much useless, as nothing gets enforced on unlocked bootloader.

But, when you remove the two entries mentioned above, you will get all of your described features in Android 11.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
So why is it we could flash patched boot images without messing with /vbmeta on Android 11?

I still think this has something to do with kernel verity.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
On locked bootloader you can't.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I think you misunderstood me. Most of us here have unlocked bootloaders. My point is, rooting on Android 11 was extremely simple - just patch and flash the boot image. But when the Android 12 Beta hit the Pixel 5, we noticed that modifying the boot image caused a verification error - "unable to load/verify boot image" in bootloader. The solution to this was flashing /vbmeta with --disable-verity and --disable-verification.

So, my question to you is, if AVB was already implemented in Android 11, why could we run patched boot images without any other changes, while we can't do the same on Android 12?

If dm-verity and vbmeta verification had been implemented on Android 11, we would have had to do the same thing we have to do now. But, since we didn't, it's pretty clear they weren't.
[Google Pixel 5 Guides, News, & Discussion] andybones:
No you're right, actively block root entirely, no, absolutely not.. that isn't what I meant, or Google wouldn't allow topjohnwu to continue on with Magisk at all.. But I didn't say this in my other post, and don't expect you to read my mind, my apologies.

However, as we know one stipulation for the continuation of Magisk is the removal "Magisk Hide" and the removal of the online Modules Repo.

Hopefully we will be alright using v23 on our phones.

This explains better what is currently going on. State of Magisk: 2021
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
All right. I did misunderstand. So, you are saying that with unlocked bootloader, you can't flash patched images? That indeed would be something new, that is, they enforce avb stuff even on unlocked bootloader. By the way, are you talking beta Android 12?
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
Because dm-verity and vbmeta verification are supposed to be disabled on unlocked bootloader. On Android 12, bootloader might be doing verification in unlocked state, but what's the point of unlocking, if verification still persists? On the other hand, what's the point of requiring verification in unlocked state if you can still disable it by flashing something else?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I am talking about Android 12 in general.

Again, rooting on Android 11 was extremely simple - just patch and flash the boot image.

But when the 12 Beta hit, we discovered that doing this would result in getting stopped at bootloader with "unable to load/verify boot image". This is due to dm-verity and vbmeta verification. Interestingly, this does not prevent a live boot of a modified boot image as long as the image in /boot is stock.

So, what we had to do was flash either the system image, or reflash the vbmeta partition, with the "--disable-verity --disable-verification" flags. This allowed flashing of a modified boot image.

The problem we have run into now with the 12 Stable release (which we did not see on the beta) is that a factory wipe seems to be required in order to fully disable dm-verity and vbmeta verification. We haven't quite figured out why.

What I suspect is that dm-verity has also been implemented in the kernel. Magisk used to have a function that would disable this.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
At this point the only thing the bootloader lock seems to do is prevent external flashing of partitions, as well as disabling any verification of -what- is flashed to those partitions.

Verified Boot on the other hand is a boot time security measure that compares a hash of /boot with a reference hash in /vbmeta; if a mismatch is found, it halts boot. This is not controlled by the bootloader lock.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
This all could be overcome in a custom build.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
We will see. There are no custom Android 12 builds or kernels yet.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
At this point, on Android 11, you can even apply Magisk patch during the build, and before the generation of vbmeta. So, when your rom is built, no Magisk flashing is required, which means, bootloader could be locked with custom key and you can have prerooted rom, which will pass all verifications.

I don't think Google cares about root. What it does care is that custom roms would fail Safetynet. That's why, they won't allow Magisk hide.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Whether or not Google cares about root isn't really relevant.

I did forget to mention something: This is only a problem that we have seen on a few devices, namely the Pixel 4a 5g and the Pixel 5 to name a couple. Android 12 has been released on the Pixel 3 and 4, and neither of those lines are dealing with this issue - they are able to patch and flash the boot image the same as always.

So if I'm wrong, what's your explanation for this issue that we are having on the Pixel 5? What's your solution? I'm not really interested in a custom build, but if you think you could come up with a method to easily patch /boot and /vbmeta in such a way that we will never run into this problem again, I think there's more than a few people who would be itching to try.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
Well, it is relevant whether Google cares about things or not especially if you are only interested in stock, as there is a lot less you can do there.

It's the bootloader stupid. Apparently Android 12 bootloader requires AVB-2 and verity in orange state.

The reason it happens on newer Pixels only has to do with the Android version these devices came out originally. Devices that didn't come with Android 11 originally have legacy bootloaders. Such devices were converted to Android 11 with their bootloaders still backward compatible with Android 9. Pixels 4/5 probably came out with Android 11, so, they are only compatible with Android 10.

Anyway, the only thing you can do is try to extract Android 11 bootloader from stock and flash it on your device that has Android 12.

It works on Oneplus 6/6T, which were recently updated to stock Android 11. That update broke TWRP, However, when you flash Android 10 bootloader on stock Android 11, all problems disappear.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Not sure if you're calling me stupid or the bootloader stupid, either way you should be careful about the insults.

My point on relevancy is that it doesn't change the issue we are dealing with - I agree in that I don't think Google is interested in preventing root, but I do think that they implemented new features that had the unintended effect of what we are dealing with here.

I don't think this is a bootloader issue, because the bootloader that shipped with 210812.015 (A12 initial public release) is the same as 210812.002 (A12 beta 5) - and as I mentioned previously, all we had to do on Beta 5 is flash vbmeta with the disable flags.

And, against my better judgement, I tried flashing the A11 bootloader. Unsurprisingly, I got the corrupted system error. I'm not sure where you got your information; bootloaders are typically backwards compatible, but systems are not - you can run an Android 9 ROM on an Android 11 bootloader, but you typically cannot do the reverse.

Not to be rude but it seems like you're basing your comments on incorrect information, or at least information that is relevant to a different device. In this specific case, the Pixel 5 bootloader only handles one part of AVB - verifying the kernel against vbmeta as it loads. If it doesn't match, and verification is not disabled, the bootloader will halt and display the "Unable to load/verify boot images" message.

But we aren't dealing with that. We already discovered this on the 12 beta and discovered that using --disable-verification and --disable-verity turns off this initial verification.

The issue we are running into now, as I have tried to explain exhaustively, is that the kernel begins to boot, but something in the kernel itself - probably dm-verity - finds some sort of mismatch, regardless of the bootloader state, has a kernel panic, reboots the device, and boots into recovery mode with the data corrupted error.

So what I believe we need to do is disable verity in the boot.img itself. I'm going to fire up a hex editor and use this guide, specifically Method 1, to see if I have any success.
[Google Pixel 5 Guides, News, & Discussion] mistermojorizin:
On the Betas, I tried flashing the disable verity and it wouldn't boot without a wipe. The guides said a wipe would be needed. My 12 stable is behaving like my Beta 5 did.

For example, this guides explains that a wipe had to be done on the Betas https://xdaforums.com/t/guide-upgrade-beta-to-android-12-keep-root-and-data-no-wipe.4350835/

My issue with the wipe is it takes forever to setup my widgets, neither the launcher nor the various apps I use save the contents of the widgets, not to mention exact dimensions. Hours it takes, would pay for a new phone.
[Google Pixel 5 Guides, News, & Discussion] ipdev:
So far I only updated my Pixel 5 [redfin].

Originally I did a clean flash (double flash so it installed to both slots) then did the normally patch and boot method with Magisk.

When I installed Magisk (Direct install option in Magisk app) I rebooted and well..

Nothing but bootloader..

The next night (thanks to your guide 🙃) I did another clean flash disabling verification before initial boot.

fastboot --disable-verity --disable-verification flash --slot=all vbmeta vbmeta.img

Then did the same Magisk patching and boot steps I normally use.

Magisk installed and is working fine. ;)

I thought this started with the 5 series but, now that you mention it also affects Pixel 4a (5G) [bramble].

I wonder if it has anything to do with the fact that the 4a (5G) [bramble] starts the use of BOARD_HEADER_VERSION 3 :unsure:

[TOOL] Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac] - xdaThread - Post 2,480

[TOOL] Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac] - xdaThread - Post 2,481​

I do not have a 4a (5G) but, I plan to update my 4a [sunfish] tomorrow. :D

I will let you know if I need to disable verification on sunfish.

Cheers. :cowboy:

Edit.

Pixel 4a [sunfish] updated from 11 to 12 like normal.

No need to disable verification.
[Google Pixel 5 Guides, News, & Discussion] ipdev:
A bit OT for this thread but, since I happen to have a OnePlus 6T. :sneaky:

I had no issues with TWRP running OOS v11 and no issues with TWRP since updating to OOS v11.1.1.1.

Yes I was (and still) rooted with Magisk so the OTA downloaded the full v11.1.1.1 OTA.

Cheers. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
Who is calling you stupid?!?! It's an American expression: for example, your costume is ruined by rain, so, you say: it's the weather stupid.

Anyway, I am trying to help, so, there is no reason to seek insults where there isn't one.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I didn't seek one, I guess I misunderstood. I have never heard of that expression before, at least not in that context. I'm American too, and I've generally heard it like this:

"Hey, what's making that howling noise?"

"It's the wind, stupid!"

I digress.

I'll have to pick this up later; it's late, my wife is demanding....attention, and I want to enjoy the weekend.
[Google Pixel 5 Guides, News, & Discussion] optimumpro:
All right. I didn't use the comma: It's the bootloader stupid. Not bootloader, stupid

Regards.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
I wonder if anything in the Android 12 Release Notes helps explain the problem(s) rooting the Pixel 4a5g and Pixel 5.
[Google Pixel 5 Guides, News, & Discussion] andybones:
It's just the way you worded it is all. I am born in America, and actually thought the same thing when I read it.

It's confusing to me though..

I would say, not "it's the weather, stupid"

but rather

"it's the stupid weather"

so reading "It's the bootloader stupid"

I feel should be,

"it the stupid bootloader"

but thank you for clearing up that you aren't passing insults.

And it's hard to tell through text whose being argumentative, and whose being helpful.

Glad you're the latter.
[Google Pixel 5 Guides, News, & Discussion] thatsupnow:
Perfect updated to Android 12 and rooted no problem! And passed safety net
[Google Pixel 5 Guides, News, & Discussion] mistermojorizin:
and your 3a turned into a pixel 5? amazing!
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
I backed up the P5 with Google1 and wiped it and re-did everything which was a major PITA.

Root does work again so I am sure the owner will be happy.

I just got a notification just now a new beta version of Magisk just dropped about an hour after I finished.

Maybe that will make some sort of change, it does show A12 is now better supported in the release notes.

If this fixes the problem, well good for everyone but danggit I just wasted 3 hours of my time.
[Google Pixel 5 Guides, News, & Discussion] killchain:
Has anyone tried the new Magisk (23010)? Is there something notable in the update? Or is it really not new? Maybe the same update popped up for me again for some reason... Is there a way to see which Magisk version was used to patch an image?
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
So I guess you didn't read my post? I just said a new magisk beta came out tonight.
[Google Pixel 5 Guides, News, & Discussion] killchain:
Sorry, I missed that indeed, I was reading diagonally. Thanks for confirming though, so it's really new after all. I was confused by the "in case you missed it" in the release notes pointing to a blog post from August.
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
It's a canary (beta) build that just got pushed around 4AM. I already wiped the P5 so I cannot test whether it works on a dirty flash. I'm sure someone else will chime in here shortly.
[Google Pixel 5 Guides, News, & Discussion] killchain:
Just tested 23010 on my dirty flashed 4a 5G; direct patching with it (having booted a previously patched boot.img) results in failed to load/verify boot images again.

Edit: recovered the usual way, now I'm back where I was:

fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot boot magisk_patched.img
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Was worth a shot.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
I'm sure your friend would say, it was not a waste of time, just your good deed for the day. :)
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Can someone link the new Magisk beta please?
[Google Pixel 5 Guides, News, & Discussion] rester555:
I just downloaded the latest magisk, will direct install work or corrupt? I already have root on A12 permanent.
[Google Pixel 5 Guides, News, & Discussion] elong7681:
I think this is it?
[Google Pixel 5 Guides, News, & Discussion] ipdev:
Magisk Beta is still 23.0 (23000).

A new Magisk Canary was just released.

d7e7df3b (23010).

Magisk Files - GitHub - canary - Link

This is the official repo.​

A lot has changed.

Magisk Files - GitHub - canary [Notes] - Link

You will need to enable Zygisk and DenyList in Magisk's setting menu.

Riru is not compatible with Zygisk so, Magisk blocks Riru from running if Zygisk is enabled.

See my last post in the Magisk General thread.

Magisk General Support / Discussion - xdaThread - Post 48,643

Cheers. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] ipdev:
Seems to match the current Magisk canary build. ;)

sha256sum

ff3f1e5269614a4154621aabb1dab656a9b5bc8ba1b7f09c402c947d6e1356c4

package: name='com.topjohnwu.magisk' versionCode='23010' versionName='d7e7df3b' compileSdkVersion='31' compileSdkVersionCodename='12'
sdkVersion:'21'
targetSdkVersion:'31'

Cheers. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] killchain:
It's available directly through Magisk Manager itself too (it's how I got it), you just have to change the channel through Settings -> App -> Update Channel.
[Google Pixel 5 Guides, News, & Discussion] rester555:
Was everyone successful with the new canary magisk at direct install without corrupting system image?
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
:rolleyes: Deleted
[Google Pixel 5 Guides, News, & Discussion] killchain:
This is what happened to me: https://xdaforums.com/t/guide-updat...2-read-the-notes.4345627/page-7#post-85824449

It was the other error (failed to load/verify boot images, not the one with the corrupted image), but still doesn't work. I currently have flashed stock boot.img and have booted a patched image to get root.
[Google Pixel 5 Guides, News, & Discussion] rester555:
So it this is true for a majority of people, seems every time you try to patch the boot with magisk, The flash has to be preceded with vbmeta being flashed again.
[Google Pixel 5 Guides, News, & Discussion] rester555:
So just to verify, you are now rooted with latest magisk after recovering with those commands?
[Google Pixel 5 Guides, News, & Discussion] killchain:
I was confused about this at first, but I now kind of understand it.

Flashing vbmeta with the disable flags is what allows a modified image to be flashed afterwards. Flashing vbmeta without any flags is what seems to be necessary to recover from system corruption and to then flash a stock, non-modified image (not sure if it's actually required for the latter, but it saved me from having to wipe when I got system corruption). At this point it seems to be not known what exactly requires the wipe and how to avoid the need to do it.

Yes, but that's temporary root, i.e. if the phone reboots, it will go back to the stock, non-rooted boot.img that's flashed.

It's fine for me since I don't reboot often; I'll probably stay that way either until a permanent solution is found without the need to wipe or until I decide to wipe.
[Google Pixel 5 Guides, News, & Discussion] rester555:
Interesting. When I reboot with pixel 5 I still maintain root with AdAway and gpay. How is this temporary? This is with magisk 23001.