yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Well...Google has always been pretty developer friendly, and I can't see them suddenly turning around and making things difficult for us. Remember that they're basically trying to please two groups: They want to provide a solid device for casual users (and the big networks) that is stable, secure, and competitive....but they also want to promote innovation and flexibility, hence the availability of non-network locked devices and the ability to unlock the bootloader.

I don't know what all security enhancements are in Android 12, but given that the final release is very similar to the beta (210812.015 vs 210812.002) I don't think we will run into significant issues. The main purpose of the security core is "private" processing, so the device can quarantine security sensitive processes onto a separate CPU core. It's likely encryption will be involved with this.

The hardware enhancements are intended to resist compromise of an otherwise secure device; I would imagine deliberately compromising security, i.e. unlocking the bootloader, would disable or bypass some of these features.
[Google Pixel 5 Guides, News, & Discussion] jnss98b:
I'm pretty sure Verified Boot 2.0 has been a thing since Android 8 no?
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
No,came from 11. At the moment the only way to achieve root is to wipe and reinstall
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
The idea has been around, but I don't think it's ever actually been implemented before. Case in point: we could flash whatever we wanted on the P5 on Android 11, and on previous generations of Pixels, without ever having to worry about it.
[Google Pixel 5 Guides, News, & Discussion] ggkameleon:
Hi ! Yesterday I update A11 to A12 stable with ota adb and flash vmbeta.img and patch boot but doesn't work. I do wipe and flash Fi but loose root and playstore not certified no Netflix etc..

How I do to root it ? With Android flash tool wipe and dm verity etc... ?

But for the next update ? Loose data too ?

Thanks
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Follow this video, this worked for me. I'm worried aswell do I need to do this process again for the November patch which I won't. It took me hours to log into apps, setting up routines and tasks and re-connecting smart watches. If the only way is to do the wipe etc again, I will just revert back and lose root as it's not worth the hassle. You can get Netflix, Disney + from other sites.
[Google Pixel 5 Guides, News, & Discussion] ggkameleon:
Hi ! Thanks for response.

Yes if do wipe again same as you.

A noob question. It's possible to format data because my Pixel are crypt this is not the mistake ?
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
You'll just have to back up everything and follow the YouTube video and you'll be good to go. It's a real pain having to set up everything again. I'm hoping that disabling the 2 items mentioned going forward means that you can just sideload the patched Magisk boot img and your done. I'm sure I'll find out in November
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
After I wiped, I was able to root. I don't know why we are having this issue, things were a lot easier on the beta.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
@myhuky3 and others: I didn't need to use Magisk Canary to root on 12. I used the latest stable release, 23.0.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I think Magisk Canary and stable are the same since May. There has not been any updates.

Yeah, of course there is an alpha build out in the wild.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
What it seems like at this point is that the same method for root that worked on the 12 Beta also works on the public release - except that a data wipe is required. Not sure why. Flashing vbmeta with the disable flags results in failure to boot and getting stuck in recovery with "Can't load Android system, your data may be corrupt".

Has anyone thus far been able to upgrade from either Android 11 or the 12 beta to the 12 public release, WITHOUT wiping data, AND has been able to root? The closest I've seen seems to be live booting the patched image with stock /boot and /vbmeta; root in this case obviously does not persist with a reboot.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
Thanks for your continued research. This makes me wonder if we will run into the same issue each month a patch is released. Any theories on what changed between A12b and A12GA?
[Google Pixel 5 Guides, News, & Discussion] ggkameleon:
Hi ! for me the mistake are the encrypt data because for another phone (Xiaomi, Oneplus) with Twrp can format data and flash Magisk on Twrp work fine.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I'm honestly not sure. I have a couple theories - one being that they put something in the public release, possibly in the kernel, or maybe the first elements to load from /system, that will fail the boot process and order a reboot to recovery if -any- change is detected with either /boot or /vbmeta - but only if you didn't wipe data.

The reason I believe this is because after I updated using the OTA and before I did anything else, I tried to live boot the patched Magisk image from the beta. It -should- have either bootlooped or booted just fine with everything else being stock. But, it did the same thing as we all have experienced after flashing vbmeta with the disable flags - it attempted boot once, failed, and rebooted into recovery with the "Your data may be corrupt" message. I kept getting the same message after dirty flashing the factory image, with or without the flags, until I wiped /data.

I don't know if this will continue to be an issue going forward. It's damn near impossible to see what the kernel is doing during boot, which makes it also near impossible to pinpoint the problem.

I'm hoping that it's just for the initial root after upgrade, and won't be required for further upgrades.

The only way to really know for sure is for someone who has upgraded and has working root, to attempt to dirty flash the factory image and see if they run into the same problem.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Just had to uncheck 2 things.

This guy explains it in his tutorial.

Hopefully by doing this once means we can update the security patches as normal but it does mean a wipe first to achieve it.
[Google Pixel 5 Guides, News, & Discussion] ggkameleon:
Yes That work fine I'm on A12 Stable and Root but do configure all same as you (Bluetooth, Amazfit, Account & Reinstall all App's not backup with Google backup & springboard "Yes I'm an old ios iPhone 5 and like many App's on springboard on Pixel it's not good same as Samsung) Many work and can't make it all month not possible if they hadn't feature for update it without loose data no root enough.

Have a good day
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Not to be rude, you don't need to repost the video or the tutorial - first of all, he's following the instructions posted at the beginning of this thread; additionally, many of us already know how to use Android Flash Tool, if not ADB.

This is not new information, nor is it a solution. If you read back through this thread, we discovered exactly why disabling verity and verification was required on the 12 Beta.

What is currently unknown is why data wipe is required on the stable release.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Just trying to help. Good luck with your search 👍
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
We appreciate the help, it's just pretty redundant to post a video which references the original post in this exact thread, and it's not exactly helpful to post something as a solution or fix when it involves doing something we are already aware of - a factory reflash with a wipe.
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I am still on beta 5 and staying there to be safe.

Reason, I will be moving to the Pixel 6 next week when it arrives. And it will be a whole new ball game.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Well, it stands to reason that the general process would be similar to the Pixel 5 - unlock bootloader, disable dm-verity and vbmeta verification, and run a patched boot image. Of course with the Titan M2, there's no telling.

It's surprising that they haven't released the firmware yet.
[Google Pixel 5 Guides, News, & Discussion] snovvman:
I will try this in the next couple of days on my P3 XL. Before I do, why would I not sideload the A12GA OTA, flash verity, flash boot and see if that works? Help me understand the reason for factory image. Thanks.

Edit: I re-read your post and see that you already tried the OTA route and was only able to get temp root (w/o verity flash, which is strange). I will try factory and let you know how it goes. I presume as part of the process I should flash verity with flags?
[Google Pixel 5 Guides, News, & Discussion] vandyman:
I believe the firmware will be released on October 28th when the P6 is officially released.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I would say yes - but dm-verity and vbmeta verification have not been implemented on the 3XL to my knowledge. So, all you should have to do is sideload the OTA, then flash a patched boot image.

That would make sense. I didn't preorder the P5, but I downloaded the factory firmware before I even got the phone.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I've posted status updates in the OP of both of my threads (the guide and the discussion) as to the current status of Android 12 root.

Currently, this is where we are at:

* Flashing /vbmeta or /boot after upgrade results in "data corrupted" error

* Patched image can be live booted (not flashed) for temporary root, as long as /vbmeta and /boot are untouched; if you never reboot your phone this can be a temporary workaround if you don't want to wipe /data

* Permanent root works after factory reset
[Google Pixel 5 Guides, News, & Discussion] peikojose:
What would happen in the next month? Factory reset again?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Hopefully not. We will see.
[Google Pixel 5 Guides, News, & Discussion] HumorBaby:
I have found that I was able to go from 12b5 to 12 release without wipe and keeping root.

The main difference I am seeing between what I have done and others is that I manually applied the OTA update with adb sideload then I was able to flash vbmeta (with verity disabled) as well as the patched boot img from the factory image, all in one go WITHOUT a reboot.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I didn't know you could reboot directly into sideload mode. I thought you had to reboot to recovery and manually enable sideload mode. Good tip, thank you.

I have to wonder if this would work for anyone who's already upgraded?
[Google Pixel 5 Guides, News, & Discussion] HumorBaby:
I think its just an internal adb shortcut for the same thing. To your phone, it should be the same as rebooting to recovery then picking sideload manually.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
However for those who didn't disable the 2 V's previously I don't see any other way around it than to wipe
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
At this point we are just guessing, and will have to see what happens when we get there.

Don't forget that we cannot mix and match vbmeta and boot - at least with this first release of 12 Stable, both vbmeta and boot have to be from the same build. So, if whatever is causing this problem is not changed with the next update, it's very likely that flashing vbmeta again without a data wipe will result in a corruption error.

Again, we are just guessing, but it seems fairly logical.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
If your in need of root as in now then a wipe is the only way. It's a pain and time consuming however it's always good once in a while to start a fresh and get rid of any bugs or issues you may have built up in the past.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
No...we can still temp boot the patched image without flashing it. Reboot obviously loses root but it's a good temporary solution.
[Google Pixel 5 Guides, News, & Discussion] warrencoakley:
Yeah but honestly that's not really a logical solution
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Why not? If you rarely reboot your phone, it's at least enough to use it with root until we find a permanent solution. It's working for several people here who don't want to wipe data.
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
I can say for sure it's working for me until a permanent solution is discovered.
[Google Pixel 5 Guides, News, & Discussion] CarinaPDX:
It would be nice to know if that works upgrading from 11 to 12; I'm guessing it does.

My guess is that when a system is upgraded to 12 via the OTA software update, verification is installed before reboot, and after the reboot the verification doesn't allow for removal of verification without a data wipe. The key is to install first, remove verification, root, then - and only then - reboot. That way verification is never allowed to execute before it is disabled. Perhaps someone would give that a try... (and document the commands)
[Google Pixel 5 Guides, News, & Discussion] killchain:
In this line of thought, I don't think I've seen this discussed, but... has anyone tried also flashing system besides boot and vbmeta? Would that work for removal of verification?

Edit: also, what's up with vbmeta_system.img? I've never seen it mentioned.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I would guess that it's used to verify the integrity of /system. I don't think it really affects what we are trying to do, because Magisk is systemless.

Guys, I think I just ran into a problem with the new Magisk Canary: I can't downgrade Magisk and keep root. I've tried wiping the app data, uninstalling it, and flashing boot images patched with previous versions (22.1, 23.0, 23001, 23003) and every singe one except for the newest does not show as rooted.

Sucks for me, because ever since updating Magisk, my bank app doesn't work.

I'm a facking moron and forgot to completely uninstall Magisk before downgrading. I'm back on 23001.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Speaking of older Magisk releases...Does anyone know how to get to the old Canary/beta versions? I'm pretty terrible at navigating Github, and I can only seem to find the stable releases.
[Google Pixel 5 Guides, News, & Discussion] Homeboy76:
Magisk Canary 23001: Click 3 dot

Menu

=> Click

app-debug.apk

=> Click 3 dot

Menu

above

View raw

=> Click

download
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Thanks!

How in the world did you find that? How would one go about finding older Canary releases?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
An excellent point that was brought up from a Pixel 6 user:

Data wipe is required for permanent root after upgrading to Android 12. That much we know.

But what about a device that had an original clean install of Android 12?

Who here wiped when upgrading to Android 12, and did not reflash vbmeta until AFTER you set up your device?

Basically, we need to determine if it matters when you flash vbmeta. Here's what needs to be tested:

- Factory flash Android 12 with a wipe; do NOT disable verity and verification

- Set up and use your device

- After everything is set up (download all your apps) attempt to reflash vbmeta with verity and verification disabled, as well as a patched boot image.

If this is successful, this means we shouldn't have to wipe every time we take a monthly update.
[Google Pixel 5 Guides, News, & Discussion] CarinaPDX:
I think that this is unclear. Certainly once the upgrade has been performed and the system rebooted it does look like a wipe is needed (because verification is active). And taking the offered OTA would reboot automatically IIRC and thus root would require a wipe. But as I posted earlier if the OTA is sideloaded and then verification is turned off and boot.img flashed before reboot, verification should never be active (i.e. it would be disabled before it was ever executed).

As for whether security updates can be installed and rooted without a wipe I think we will have to wait to find out. For an update we do have to remove root but I don't think we know yet if verification has to be enabled first for the OTA to start - it all depends on what Google decides to do. As long as the OTA doesn't check or enable verification then we should be good to update and root without a wipe. If an OTA enables verification then a sideload of the update followed by disabling verification and root before reboot might do the job. Even if verification must be enabled before the OTA it might still be possible to enable, sideload, disable, root in one go before reboot.

The whole point of verification is to ensure that Google-signed images are used to boot and for system. This ensures that the system has not been rooted or persistent malware installed, in order to protect the user data from compromise. If the device could be rooted without a data wipe then verification could be circumvented. Hence when rooting one must turn off verification, and when turning off verification the data must be wiped to ensure that the rooting is not done for the purpose of unauthorized access to the user data. Since they just added verification in 12 as a default we are having to work around that either with a sideload or just a wipe. The question is whether going forward future updates respect the verification status or whether they require or re-enable it - which is unnecessary but Google does have a history of unilaterally imposing security decisions. We''ll have to wait to find out.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Well, that's why data wipe is required when unlocking the bootloader. If what you're saying about verification is correct, then you would have to wipe /data every time there's a new system configuration, such as an update.

Another problem with this theory is the fact that we can still live boot a rooted kernel on an otherwise stock system, without modifying any partitions.
[Google Pixel 5 Guides, News, & Discussion] CarinaPDX:
No, that is not so. There is no reason an update can't be done that preserves /data and verification status. That is a choice that Google will make but is not inherent to verification. The whole point is to protect user data, which is why /data is wiped when verification is removed: that data is protected and protection extends to removal when that defense is removed. 12 installs verification across the board, but if it is then removed (and the data wiped) then any later data is in an unverified environment - as chosen by the user. There is no need to re-install verification - the user's decision should be respected - but Google might anyway.

Yes, there are probably still some ways around verification but your example is flawed. That vulnerability only exists if you are sloppy enough to leave USB debugging enabled. And enabling USB debugging requires device access through the user authentication, so is not a work-around to authenticated access if you just know what you are doing - an assumption for developer mode. For the great majority of users that never enable developer mode (and thus never enable USB debugging) this is not a vulnerability - the stock system can't be accessed from a PC via USB for fastboot or adb (at least that is my understanding). And Google has been very clear that USB debugging should be disabled when not actively being used, because it is a vulnerability.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I'm not sure I follow. Unlocked bootloader has always permitted live boot of an image regardless of what's actually in the /boot partition. This has been true of all Pixel phones, and in fact many other devices from other OEMs. In the case of the Pixel 5 (and 4a and 5a), you can live boot a patched image on an otherwise stock ROM without wiping data - as long as the image actually in /boot is stock. Once you decide you want permanent root by flashing a patched image, you have to disable verification, which will require a data wipe, at least in the case of an upgrade.

The bootloader lock itself is supposed to protect against attack in this manner. Android Verified Boot is designed to prevent a persistent rootkit from being loaded with the kernel; dm-verity is a process by which the code is hashed directly from the storage device, then compared to a reference hash in /vbmeta; if the code doesn't match, the bootloader doesn't load the kernel.

I'm not quite sure what changed between Android 11 and Android 12, but we discovered with the 12 Beta that vbmeta had to be flashed with the --disable-verity (supposed to disable dm-verity) and --disable-verification (the hash check itself) flags to disable Android Verified Boot.

The data wipe should not be necessary with an unlocked bootloader.

And, the verification status is -not- persistent. I just tested the theory, and I got the corruption error after I reflashed /vbmeta with the disable flags.

As far as USB debugging goes...there isn't much you can do with a locked bootloader. it's not necessarily a vulnerability, because the PC has to be authorized on the phone via user input; in the same grain, you can't externally change the "get_unlock_ability" flag - you can only do this via the OEM Unlocking toggle in Developer Options.

If USB debugging is enabled and the PC is authorized, one could potentially use ADB to access user data.

If USB debugging is enabled but the PC is not authorized, ADB will reject any commands. The worst that could happen is the attacker manually reboots to recovery and sideloads an OTA, or wipes data.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Is there any possibility Rollback Protection could be part of the issue here? This can be disabled the same way as verity and verification, with --disable-rollback.

Looking at the same page, I see this:

Seeing as we have systemless root via patched boot images, I don't know how this would be a part of it, but still...
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I just found this! Seems to be exactly what we are dealing with when the "Your data may be corrupted" screen comes up.

Question is, what is crashing, what is causing the crash, and why does it depend on a data wipe?

Edit: Has anyone tried patching the boot.img with Magisk 23011?
[Google Pixel 5 Guides, News, & Discussion] pierreantoine-cheron:
I'm not sure to understand, I have just updated my new Pixel 5 to Android 12, so I'm not worry to wipe my data or reset the phone, can I install Magisk and root my phone?

Thank you
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
If you aren't worried about wiping, then yes. Follow the instructions at the beginning of this thread.
[Google Pixel 5 Guides, News, & Discussion] ggkameleon:
hello, does not the problem come from the fact that the data partition remains encrypted ? Before my Pixel I had a Xiaomi and Oneplus and there was this same problem with the root magisk and custom Rom and I had to format the data partition and keep it to update. After that I don't know much about Pixel and this is the first year that I use. Same I do not understand why on other manufacturers they have Twrp ? bigger community ?

The new update will arrive i don't want to wipe yet.
[Google Pixel 5 Guides, News, & Discussion] pierreantoine-cheron:
Thank you it worked like a charm.

So far the only tutorial that worked for me.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I would like to recognize @ipdev for finding this:

We still don't know if this has something to do with our issue, but there's a huge chance it does.
[Google Pixel 5 Guides, News, & Discussion] elong7681:
You had stated earlier that you can disable rollback protection, do you think it would be possible to go from stable a12 back to a12 beta 5, flash magisk_patched.img and then update via OTA sideload and keep root without a wipe?