yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Unfortunately that isn't much help as the update for the Pixel 3 did not introduce the same challenges we see on the Pixel 5.

If you've already upgraded, then yes - your choices are either retain data and use temporary root, or wipe data for permanent root.
[Google Pixel 5 Guides, News, & Discussion] klemi71:
As I said: Pixel 3, retained data and permanent root.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Again, that's not really relevant here, because AVB was not implemented on the Pixel 3 the same way it was on the Pixel 5. The issues we are addressing here are specific to the 4a, 5, and 5a.
[Google Pixel 5 Guides, News, & Discussion] cubandanger05:
Any other leeches like me checking the thread 3 times a day waiting on someone to find "the way"? 😁
[Google Pixel 5 Guides, News, & Discussion] elong7681:
I was on A12 beta 5 and I did the wipe to gain root access after I moved to stable A12 and when the new Magisk Canary came out I tried to install it by patching the boot.img and flashing it and it did not work and now I guess my only option is a fresh flash of A12 with a data wipe?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Magisk 23010? Works for me.
[Google Pixel 5 Guides, News, & Discussion] ipdev:
I was a bit confused on this one. ;)

For those not familiar with the difference.

bootloader is fastboot.

fastboot is fastboot_d​

Since vbmeta and boot are not critical partitions, they normally are not flashed in fastboot_d.

Interesting..

Just checked, looks like Android 12 added vbmeta to fastboot_d.

Android 11.

(bootloader) has-slot:vbmeta:no

Android 12.

(bootloader) has-slot:vbmeta:yes

Did a quick update flash from 11 to 12.

Did not work for me. :(

Ended up in bootloader

Cheers. :cowboy:
[Google Pixel 5 Guides, News, & Discussion] elong7681:
Yes that is the one.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Too bad you weren't able to find a solution, but it seems like you're very knowledgeable so the more brains tackling this issue the better.
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Everyone beware, 23010 removes magisk hide option permanently and also the ability to install downloaded modules within the app. Apparently topjohnwu was hired by Google "and decided" to remove those features. You have been warned!!!
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
MagiskHide is now DenyList, and there's nothing preventing you from installing modules.

Make sure you still have root; if not, you won't see the modules tab.
[Google Pixel 5 Guides, News, & Discussion] Rumsfield:
Nope, even with those settings my banking app crashes all over the place. I will be going back to the previous version as denylist doesn't work.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
Hmm, I had upgraded from rooted A11 to unrooted official A12, Pixel 5.

I just followed your guide in post #1 flashing the bootloader, followed by radio, followed by disabling verity/verification and data wipe. No Issues.

Then once in Android, I installed Magisk and patched the boot image. Rebooting in to Fastboot and flashing the patched boot image did not result in any errors - in fact there did not seem to be a problem at all, but when I rebooted in to Android the Magisk app shows "App" installed but Magisk is not present and the phone is not rooted.

I did this sequence twice with the same results.

Any suggestions?
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
So used flash tool to flash to stock 12. I did the no verity checkbox, am I safe to flash not boot the patch img?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I had the same problem with Magisk 23010 - Navy Federal app wouldn't even start. Universal SafeteyNet Fix is not updated for 23010 yet, CTS profile still fails, so Safetynet won't pass. I ended up downgrading to 23001, and it's working fine.

Which version of Magisk are you using?

I would try this:

Remove Magisk - restore images first, then Complete Uninstall. Let the phone reboot.

Re install Magisk (I used 23001). Re patch boot image.

Reboot to bootloader, flash the patched boot images to both slots:

fastboot flash --slot=all boot magisk-boot.img

***OR***

Boot the patched image:

fastboot boot magisk-boot.img

Launch Magisk again and check for root. If you booted the image instead of flashing it, you can now perform Direct Install in Magisk.

I prefer to use the second method, because it allows me to test a patched image while still having a good image in /boot; if everything works, I can then just directly install Magisk to /boot without flashing.

The same process works for 23010 if you want to use the newest version of Magisk, although it's more difficult to get Safetynet to pass.

Both verity and verification must be disabled; if you did that, then yes you should be able to flash the patched image.
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
Yes thru the tool i did that. Not new to this but the verity I am
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
If you didn't wipe /data when you upgraded, you're going to run into a data corruption error when you try to boot a patched image.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
I am using version 23000 - the link you provided is for a zip file. Can this be renamed to apk and installed as an app? (or do you have a link to v23001 as an apk?)

Thank you for the method suggestions - I am leaning towards the second method. Do I need to uninstall Magisk, restore the images and then reinstall Magisk if I go with Method 2 or can I simply boot using the patched boot image?
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
Already wiped with tool. Initially I took ota and did temp root . But flashed and wiped with the verity stuff as posted
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Yes, just rename it as an apk and install it.

I'd much rather be able to get it straight from John Wu's Github, but it appears he has either removed or made private all of the older Canary builds.

I'm not sure I understand your question. I ran into a similar issue as you with a banking app that was crashing, I assume due to CTS fail, so I decided to downgrade to an older Canary version of Magisk, which I discovered is more complicated than one would think.

When you restore images in the Magsik app, it removes root from the boot images, so after reboot you lose root. The second half is removing everything Magisk related (Complete uninstall) because simply uninstalling the app via the Android app manager doesn't clean everything up, and you'll run into issues with being unable to use root.

So, what I'm saying is, remove Magisk completely, which will restore the stock boot image. Magisk will reboot the phone, at which point both Magisk and root will be gone. Then, install the older version, use it to patch the boot image manually (Select and Patch a File), copy the boot image back to your computer and either flash it or boot it. Either way, you should boot into rooted Android, and if you chose to boot instead of flash, you can then use Magisk to directly patch /boot.

Then, use Magisk Hide + Riru + Universal SafetyNet Fix, and you should be able to get a SafetyNet pass.

Hope this helps.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
Apologies if my question wasn't clear.

Hopefully to clarify:

- Can I install Magisk 23001, patch the stock boot image, reboot into Android using the patched boot image and then install Magisk and gain permanent root

-or-

- do I have to completely uninstall Magisk, restore the stock Pixel 5 images, install Magisk 23001, patch the stock boot image, boot with the patched boot file and then install Magisk for root?

Difference between the two: do not restore stock images or restore stock images.

How do I completely uninstall Magisk? Is this via computer? I am running a PC with Windows 10.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Here's the link for the actual APK from Github.

When you uninstall Magisk from within the app, it restores the boot images for you; you don't have to do that manually.

You need to be familiar with Android Platform Tools (adb and fastboot), as well as where to get the factory image for your device, how to extract files, and how to copy them to/from your phone.

Here's some more detailed instructions:

Launch Magisk. Tap Uninstall, then Restore Images. Once it finishes, go back to Uninstall, then Complete Uninstall. Let it reboot your phone.

You will boot into unrooted Android without Magisk. Install 23001.

If you haven't already, download the Android 12 factory zip. Extract boot.img and copy it to your phone.

Launch Magisk, then tap Install, then Select and Patch a File. Patch the boot.img you just copied to your phone. Copy the magsik_patched-23001_xxxxx.img back to your computer.

Reboot to bootloader (I use ADB to do this:)

[code[adb reboot bootloader[/code]

Flash the patched boot image:

fastboot flash --slot=all boot magisk_patched-23001_xxxxx.img

***OR***

Boot the patched image: (I like to do it this way)

fastboot boot magisk_patched-23001_xxxxx.img

If you flashed the patched image, you're done.

If you booted the patched image, launch Magisk, then tap Install, then Direct Install.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
Thank you sir! You are a god send!

I reflashed the stock images, patched the boot file with the magisk 23001, rebooted into fastboot and flashed to both slots! rocking root now!!!

Thank you again !
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
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] rbouza1:
@V0latyle so this whole time i could've been booting the patch and install thru magisk after I boot up ?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Yes. It's all up to a matter of preference - you can either boot the rooted image then direct patch through Magisk, or you can just flash it since you have to start from bootloader anyway.
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
Seems less risky when booting with the img and opposed to flashing it. I only need root to move my clock to the right lol. AdAway works via VPN, Vance YouTube is ad free.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
TBH the only thing I regularly use root for is AdAway because I prefer systemless hosts as I'm already using Nord VPN.
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
We appreciate the help. I need to patch my img still . Had that dang error last night thought I bricked it because fastboot froze. so thanks for the guides !
[Google Pixel 5 Guides, News, & Discussion] thomas.raines:
I know this may see like a dumb quesiton coming from a dev that's been around for a while, but by OTA, do you mean settings>system update>check for updates (mine phone always says up to date). I dl the updates straight from the factory images site where I have 2 options: Flash or Link. Is the "Flash" option an OTA? I've never tried that one in fear it will wipe data...
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
The Flash link takes you to the Android Flash Tool. It's pretty damn cool if you've never used it before. It essentially performs the factory flash via ADB through your browser...but you can select options like relocking your bootloader, wiping data, disabling verity/verification, force flash all partitions, etc. Basically a web GUI alternative for using ADB command line.

By OTA, I mean either the automatic update, or ADB sideload. I believe you -can- dirty flash the Android 12 update over Android 11, but this is not advisable.

The issue we are currently having is being able to retain data *and* root after the update. So far, it seems that in order to root on Android 12, you have to start with a clean install, even if you took the OTA update. Factory reset (data wipe) counts as a clean install.

One user, @HumorBaby ,was able to upgrade from 12 Beta to the stable release without wiping data by sideloading the OTA, but skipping reboot before flashing vbmeta. However, it should be noted that he started with a clean install with the 12 Beta.
[Google Pixel 5 Guides, News, & Discussion] jnss98b:
Oh wait so I'm rooted on Android 11 right now and I can just accept the on device OTA without losing data but only lose root? I'm planning to just root through booting the patched image so I can just update to Android 12 straight through the settings app?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Thread '[GUIDE] Upgrade Beta to Android 12, *keep* root and data (no wipe!)'
[Google Pixel 5 Guides, News, & Discussion] thomas.raines:
Thank you. Unfortunately for me, I have never any the OTA updates and have had to manually update my phone. I'm going to try the Android Flash Tool to update to 12.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
If you're going to flash a factory image, it's highly recommended that you wipe /data.

Otherwise, if you don't want to wipe, I would suggest you manually sideload the OTA
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I did some experimenting last night with flashing vbmeta and boot via fastboot. Doesn't make a difference. The OTA sideload > fastboot method does seem to work, just make sure you don't switch slots.
[Google Pixel 5 Guides, News, & Discussion] soCram:
I (unforunately) used the OTA update to update to Android 12. Since I do not have root anymore, I tried to boot the patched Magisk boot image (version 23011). This always results in a bootloop (same with flashing modified vbmeta) together with this error message:

fastboot boot .\magisk_patched-23011_i12rx.img

Sending 'boot.img' (98304 KB) OKAY [ 2.453s]

Booting (bootloader) boot.img missing cmdline or OS version

OKAY [ 1.563s]

Finished. Total time: 4.093s

I couldn't find anybody else with this issue. Does anybody have an idea here?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I get the same message, but it still boots for me.
[Google Pixel 5 Guides, News, & Discussion] scarlion:
I don't understand the problem with using the Android Flash Tool and selecting the options Disable Verity, Disable Verification, and Force Debuggable. Won't that work? Will I lose all my apps/data? Thanks
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
I did this and yes you will lose everything. Do that and get root back
[Google Pixel 5 Guides, News, & Discussion] elong7681:
It still boots
[Google Pixel 5 Guides, News, & Discussion] scarlion:
Why though? There is specifically an option for "Wipe" that can be unchecked in the flash tool...
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
Hmm pose a good point there.
[Google Pixel 5 Guides, News, & Discussion] elong7681:
You can not flash a patched boot.img if you don't wipe data.
[Google Pixel 5 Guides, News, & Discussion] digger16309:
I've been following along on this thread but I will probably wait to upgrade to A12 after GravityBox is updated. I just want to make sure I know where things stand in case I go earlier...

What you wrote above is only true for Pixel 4a, 4a 5G, and 5, correct?

If I were to wipe data, disable verity, verification, etc..., then I can patch the boot image with Magisk 23 stable, and I'm good to go?

And, no one is sure at this point if needing to wipe is a one time event going from A11 to A12, or will also be necessary with monthly updates?
[Google Pixel 5 Guides, News, & Discussion] elong7681:
. Yes

. Yes actually I think you have to use Magisk Beta or Canery, I think.

. Yes
[Google Pixel 5 Guides, News, & Discussion] omartins:
Magisk stable works OK on the scenario above. Just did it yesterday, after wiping A11, and it's running fine
[Google Pixel 5 Guides, News, & Discussion] soCram:
Unfortunately it doesn't for me. It ends up in a bootloop and tells me that the last boot failed.
[Google Pixel 5 Guides, News, & Discussion] scarlion:
Yeah you can can't you? Unlocking the bootloader wipes your data but not flashing a boot.img... magisk lets you uninstall and reinstall which flashes a boot.img and you don't lose any data... Besides there is also an option for "force debuggable" with the android flash tool which enables "adb root" so is there even a need to flash a patched boot.img afterwards?
[Google Pixel 5 Guides, News, & Discussion] thomas.raines:
Yes, I know and thanks for the reminder. But I like to live dangerously...lol

Not really... I actually used the online tool and chose a full wipe just in case.

On another note, since I was starting from scratch anyway, I decided to take one of the aosp builds for a run. It is so empty, no wifi, nearly nothing really, but I was able to easily root with magisk.
[Google Pixel 5 Guides, News, & Discussion] matata86:
please information - gpay and ibank apps work like in android 11?
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
So I made the bonehead move of updating Magisk to a stable version after rooting successfully with the canary build and patched boot image. After updating Magisk I then installed Magisk via the app using direct install.

This caused me to lose root. Attempting to both flash and boot the Magisk Patched image results in booting to Android but without root (It says Installed: N/A).

I flashed vbmeta.img in fastboot with --disable-verity --disable-verification to both slots and then flashed the Magisk patched boot image to both boot slots and same result -> boot to Android without root.

I also flashed vbmeta.img in fastboot with --disable-verity --disable-verification to both slots, flashed the stock boot to both slots and then booted the Magisk patched image and again ended up in Android without root.

You were able to unroot and then flash vbmeta with the disable flags, flash a patched boot image and regain root?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I never unrooted.

To be honest I haven't yet tried an update. We will see what happens when the November update is hosted.

Also, I've only been using Magisk 23001. I believe I had problems with 23000 although I can't remember what.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
And to clarify, I uninstalled the stable magisk and reinstalled 23001. I used 23001 to patch the boot image. So basically at this point it seems that if I want root back I will have to Wipe and start over. :-(
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I think in your case it's something to do with a Magisk signature mismatch. Unfortunately this is difficult to overcome without root.

When uninstalling Magisk, you should always use the Complete Uninstall option within the app. Don't just uninstall it via the Android app manager; that doesn't clean everything up like it should.

The only thing I can recommend is going back to the version you were using when you had root. If you flashed the patched image, it's still rooted...the trouble is getting everything to match so that you can actually use it.

If that doesn't work...then yes, you'll have to wipe /data, but it shouldn't matter what version of Magisk you install once you do.
[Google Pixel 5 Guides, News, & Discussion] Skeetch79:
Yeah, no go. I went back to 23001 and flashed the boot image patched with that version to both slots and still no root.

Installed: N/A

Ramdisk: Yes

A/B: Yes

SAR: Yes

App:

f822ca5b (23001)

Looks like I will be wiping
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
I had to do the same thing recently.

You have to make sure you remove Magisk using its internal uninstall function, otherwise this happens.
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
@V0latyle Nov is out. Who's the guinea pig ?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Didn't you know? First one to ask is the volunteer!
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
I have a 6 coming, probably could try . Don't really know which method tbh
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Well...depends on whether you want to keep /data.

I would suggest going the OTA sideload method first, because we know that won't corrupt anything. Let me know if you need instructions on this.

Then, if you're feeling adventurous and you don't care about potentially having to wipe /data, you could try dirty flashing the factory image, then reflash vbmeta.
[Google Pixel 5 Guides, News, & Discussion] rbouza1:
Thing is I don't wanna wipe again. Plus I had to redo my PC and my mtp driver isn't installing on windows 10 20h. Whatever. Sure side load will work. I know my way around Android, keep you posted.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Just make sure you flash /vbmeta before you boot into system after updating.
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
So, here's what we have been doing wrong, according to @Anonshe .

When we update, we must disable verity and verification prior to booting system. Update method shoould not matter, except DO NOT take the automatic OTA.

If verity and verification are already disabled, you should be able to reflash /vbmeta as long as you don't boot into system.

So the update process would look like this:

1. Perform update (sideload OTA or dirty flash factory zip, but skip reboot

2. Reflash vbmeta

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

3. Boot

As long as vbmeta is reflashed before you boot into system, it shouldn't matter when /boot is flashed. You can patch the image before you update, if you so wish, or you can do it after. Shouldn't matter.
[Google Pixel 5 Guides, News, & Discussion] PablosCorner:
If we're on stock firmware non-rooted, would we still have to rely on the temporary root to keep data?
[Google Pixel 5 Guides, News, & Discussion] V0latyle:
Yes. Once you disable verity and verification, you will have to wipe.