• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Closed] Android 12 Update and Root ***Obsolete***

Status
Not open for further replies.
Search This thread

V0latyle

Forum Moderator
Staff member
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.
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.
 
  • Like
Reactions: ipdev

optimumpro

Senior Member
Jan 18, 2013
6,889
14,405
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.
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.
 
  • Like
Reactions: AndDiSa

V0latyle

Forum Moderator
Staff member
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.
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.
 
Last edited:

mistermojorizin

Senior Member
Dec 21, 2011
853
188
Google Pixel 5
Not sure if you're calling me stupid or the bootloader stupid, either way you should be careful about the insults.

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.
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://forum.xda-developers.com/t/...ndroid-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.
 
Last edited:
  • Like
Reactions: V0latyle

ipdev

Recognized Contributor
Feb 14, 2016
1,656
1
2,272
Google Nexus 10
Nexus 7 (2013)
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.
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.
Code:
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.
 
Last edited:

ipdev

Recognized Contributor
Feb 14, 2016
1,656
1
2,272
Google Nexus 10
Nexus 7 (2013)
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.
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:
 

optimumpro

Senior Member
Jan 18, 2013
6,889
14,405
Not sure if you're calling me stupid or the bootloader stupid, either way you should be careful about the insults.

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.
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.
 
  • Like
Reactions: ipdev and andybones

V0latyle

Forum Moderator
Staff member
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.
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.
 

optimumpro

Senior Member
Jan 18, 2013
6,889
14,405
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.
All right. I didn't use the comma: It's the bootloader stupid. Not bootloader, stupid

Regards.
 
  • Like
Reactions: V0latyle

andybones

Forum Moderator
Staff member
May 18, 2010
14,785
15,084
Google Pixel 5
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.
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.
 

Rumsfield

Senior Member
Apr 3, 2015
150
58
There are only two solutions for XDA members who dirty flashed Android 12 and want root.
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.
 
  • Like
Reactions: Homeboy76

killchain

Senior Member
Oct 6, 2012
326
71
30
Google Pixel 4a 5G
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?
 

Rumsfield

Senior Member
Apr 3, 2015
150
58
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?
So I guess you didn't read my post? I just said a new magisk beta came out tonight.
 
  • Like
Reactions: killchain

Rumsfield

Senior Member
Apr 3, 2015
150
58
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.
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.
 
  • Like
Reactions: killchain

killchain

Senior Member
Oct 6, 2012
326
71
30
Google Pixel 4a 5G
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:
Code:
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot boot magisk_patched.img
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Update 12-16: I am closing this thread as it is no longer relevant. Please refer to this guide.
    7
    Magisk Canary was updated to 23016 last night. This includes a fix for the vbmeta header issue, meaning that disabling verity/verification should no longer be required, and we should be able to root as we did before. This needs testing, make sure you back up your data and photos before you try this!

    Q: "If verity/verification are disabled, do I need to enable them now?"
    A: No. The only thing you have to do is update to Magisk 23016.
    Q: "Will enabling verity/verification wipe my data?"
    A: No.

    I will be updating the OP to reflect this.
    6
    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.
    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.
    5
    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.
    Agreed.

    The confusion arises from this:
    PS :
    Pixel 4a 5(G) phone owners need to know for the initial upgrade (Android 11 to Android 12), they do not need the fastboot flash --disable-verity --disable-verification --slot-all vbmeta vbmeta.img step in this case
    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:
    Code:
    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.

    If you understand what he is saying, why not add the Pixel 4a 5(G) note to the Reminders?
    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.
    4
    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.
    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.