yashsingh1/xdaforums huggingface dataset:
[Google Pixel 5a] userwaldo:
I changed the Battery Optimization to Unrestricted for Titanium Backup and it has been working fine for me.
[Google Pixel 5a] userwaldo:
The link is to the wrong version of the Universal SafteyNet, it points to v2.1.1 instead of v2.2.1.

Here is the correct link:

- https://github.com/kdrag0n/safetynet-fix/releases/download/v2.2.1/safetynet-fix-v2.2.1.zip
[Google Pixel 5a] userwaldo:
Thanks @V0latyle.

I had the same issue as others on the thread and I wasn't able to install the 220105 Update. It kept failing. I even tried making sure that it wasn't a safteynet issue first, but eventually I just went with the adb sideload method and was able to get that to work.

NOTE: I did run into the issue where booting to recovery got stuck at the green android, but I was able to get past that using the below link, and use the recovery to install the update via

https://technastic.com/sideload-ota-update-zip-adb-recovery/
[Google Pixel 5a] CarinaPDX:
Is a step left out of your instructions? The factory image zip file I downloaded doesn't work with "fastboot update" because it could not find android-info.txt file. Should I extract and use the image zip file inside (there is an android-info.txt file inside)?
[Google Pixel 5a] V0latyle:
The "green android" isn't an error or a problem - that's how stock recovery works. Simply hold Power and click Volume Up.

You didn't follow the instructions. First step:
[Google Pixel 5a] V0latyle:
It's supposed to just be the GitHub page, not the zip. Fixed, thanks for the feedback.
[Google Pixel 5a] V0latyle:
Magisk Canary has been updated to 23017. Installing to inactive slot now supported.

Download it here or update through the Magisk app.

Note: If you have the Magisk app hidden, MAKE SURE you only update through the app! Multiple instances of Magisk will break root.
[Google Pixel 5a] userwaldo:
Thanks. Installed with no issues.
[Google Pixel 5a] V0latyle:
Magisk Canary 23018 is out.

Changes:

[Zygisk] Show warning in app UI to indicate incompatible Zygisk modules

[App] Allow modules to specify an update URL for in-app update + install

Update from within Magisk to prevent problems like breaking root.

If you do not already have Magisk installed, Download it here
[Google Pixel 5a] V0latyle:
Magisk Canary updated to 23019

Changes:

- [Zygisk] Skip loading modules into the Magisk app to prevent conflicts

- [MagiskBoot] Change `zopfli` to a more reasonable config so it doesn't take forever

- [General] Several `BusyBox` changes

Preferred method of update is from within Magisk app.

If installing for the first time, here is the APK Download
[Google Pixel 5a] V0latyle:
@topjohnwu has been busy. He doesn't get nearly enough appreciation for all his hard work.

Magisk Stable is still 23.0.

Magisk Beta is now 24.0

Canary is now 24001

Magisk 24.0 discussion thread
[Google Pixel 5a] V0latyle:
Magisk Stable is now at version 24.1, so I will no longer be providing any Magisk updates.

You can use any version of Magisk now - Stable, Beta, or Canary. as long as it is 23016 or newer.

Once again, if you want to switch versions of Maagisk, it is HIGHLY RECOMMENDED that you "Complete Uninstall" within Magisk before installing the new version. Multiple instances of Magisk can break root.

If you simply want to update Magisk, the best way to do so is from within the app.

Once the February update is out, I will perform some testing with installing to inactive slot, and if it works, I will update this guide.

Given the low activity on this thread, I will probably close it if everything goes well with the next update.

Thank you all for your testing and contributions.
[Google Pixel 5a] Oxika95:
Hey I appreciate the effort you have put in. I got my pixel 5a and installed lineage then flashed magisk but didn't do a boot.img patch is that a needed step still to get root working? I seem to have root running according to magisk but I fail safety net
[Google Pixel 5a] V0latyle:
This guide is only for the stock firmware, you'd have to talk to the LineageOS team for support.
[Google Pixel 5a] ssdd28561:
Android Flash Tool (updating via website) seems to not have "skip reboot" option anymore, and device tries to reboot after update. I managed to stop it rebooting (the warning screen allows you to pause), and force rebooted with volume down pressed into fastboot to continue the rooting progress. Everything is fine now, but do I miss something? I remember the "skip reboot option", but I couldn't find it
[Google Pixel 5a] V0latyle:
The Android Flash Tool does not have a "skip reboot" option.
[Google Pixel 5a] ssdd28561:
Understood. In this case please, correct the instructions under "Update and Root using the Android Flash Tool" spoiler
[Google Pixel 5a] V0latyle:
Just did, thanks for the feedback!
[Google Pixel 5a] Ivanstein:
Absolutely fantastic! Thanks for this thread and guide!

As an aside, how is it I didn't know you can drag and drop to the command window? (This tip gets the hero of the day award in my book!)
[Google Pixel 5a] V0latyle:
Makes things a whole lot easier, don't it?

I try to stick with the KISS method. Keep It Simple, Stupid!

Or...Keep it stupidly simple, whatever. :D
[Google Pixel 5a] andybones:
I usually end up using the tab key.

For instance:

If the file I'm flashing is "magisk_patched_20220212.img" (without quotes, ofc)

I will type out "fastboot flash boot ma" then the tab key

Depening on the filename and what you have in the folder, you may need to type like mag if you have another file that starts with ma.. if thi s makes sense.

Both methods really simplfy things.

I still remember the first time finding out about typing cmd into the folder I want to enter the commands in

I enjoy Linux and all, and now, you usually get the option for right-click for terminal, which does the same as cmd in windows.

But this wasn't always the case though as you coud usually just find a way to add this to Linux. (and I'm talking like 8 years ago, however for myself)
[Google Pixel 5a] V0latyle:
This only works if you have the necessary files in the platform tools folder. Drag and drop works from anywhere.
[Google Pixel 5a] andybones:
This is true.

Out of habit I always move the file/img to the folder I'm flashing from.

Also.. if your PATH is set up correctly you don't need to work from the platform-tools folder.. you can open a CMD at any folder you host the file and use the tab and or drag and drop.

For instance I extract the factory image on my desktop,, I work from my CMD on my desktop.

Just personal preference and sharing of infomartion.
[Google Pixel 5a] V0latyle:
When using platform tools, your path has to be the platform tools folder because that's where the executables and their relevant items live.

The reason why I don't consolidate everything into the platform tools folder is because I'm dealing with 2 phones, and I always keep the previous factory image unzipped (with a patched boot image handy) for each device, in case there are issues. So it's just easier for me to type the command then simply drag and drop the file I'm trying to send.
[Google Pixel 5a] GrandAdmiral:
So I just attempted the February update using the sideload option. Got all the way to the end (~95%) and got some type of error within the package.zip. Phone rebooted. I'm still rooted and am still on the January 2022 update.

Any idea what could've caused the error?
[Google Pixel 5a] V0latyle:
No idea. Try again, if that doesn't work dirty flash the factory image.
[Google Pixel 5a] CarinaPDX:
Try the Magisk uninstall - restore images option first. Then do the update. It should take the OTA at that point, or try using flashboot update or the web flash if ABD sideload isn't working.
[Google Pixel 5a] GrandAdmiral:
Deleted. Got install with the dirty flash.
[Google Pixel 5a] joemommasfat:
"Install to inactive slot" is no longer supported in Magisk.

OTA Upgrade Guides

The Magic Mask for Android

topjohnwu.github.io
[Google Pixel 5a] Homeboy76:
The instructions for

"install to inactive slot"

are in the OP, Spoiler: Update and Root OTA Sideload and they do work. If you start the process • When an OTA is available... (Prerequisites)
[Google Pixel 5a] V0latyle:
This is extremely old information from September 2020. Install to inactive slot has been re-implemented as of Magisk Canary 23017 {January 20, 2022).

Please, check your information to ensure it's up to date before you post.
[Google Pixel 5a] joemommasfat:
My apologies, you are correct. I wasn't on the latest Canary when I posted that.
[Google Pixel 5a] V0latyle:
Somehow I missed this. Installing to inactive slot only works with automatic OTA. It does not work with OTA sideload.
[Google Pixel 5a] GrandAdmiral:
FYI on the March update... Looks like there are new bootloader and radio versions. If updating via dirty flashing, make sure you don't bypass Steps 1 & 2.
[Google Pixel 5a] SideSkroll:
Hey guys. maybe a "dumb" question. but hwo do I factory reset AFTER rooting while keeping magisk and the root? Cause I currently have a brand new phone. And what I want to do (or better said, "my plan") is to update it to the latest patches etc, root it and AFTER that restore it to factory settings just so I can get the prompt to "clone" my old phone. Is that possible? Am I an imbecile? Thanks.
[Google Pixel 5a] V0latyle:
The Magisk patch is permanent until removed or overwritten. The Magisk app on the other hand lives in /data and will not survive a factory reset.

So, to accomplish what you're asking, you would simply perform a factory reset; once you installed the Magisk app again, you'd have root.

If you want to update, use the factory update method but add the -w argument to wipe data:

fastboot update --skip-reboot -w <image-barbet-buildnumber.zip>

Once the update completes, you'd flash the patched boot image, then reboot. You'd boot into a clean system with the latest update, and once you installed the Magisk app again, you'd have root.
[Google Pixel 5a] SideSkroll:
Yeah. Thanks. I was about to delete the post since I already figured it out.

Thank you anyway!
[Google Pixel 5a] V0latyle:
No problem. I have since edited my post so make sure you read it again, but the basic information remains the same. The only thing a factory reset does is wipe /data. It does not restore partitions, so if you have flashed a patched boot image, it will remain patched after a factory reset.
[Google Pixel 5a] SideSkroll:
Wait, so if I want to update the phone. Do I need to do all of that? everytime? every security patch etc? Or are we talking about Android versions? Cause I was thinking about using this method:

Spoiler: Update and Root Automatic OTA

Before you download the OTA, open Magisk, tap Uninstall, then Restore Images.

Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update

Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.

You should now be updated with root.
[Google Pixel 5a] V0latyle:
Yes, you can do this. You said you wanted to wipe your device, however, so it's always best to use a factory image if you want to return to absolute stock. You can still flash a patched boot image, like I said.
[Google Pixel 5a] emonkhan826:
View attachment 5556285i update latest version after that i flash magisk patches boot images but my device getting bootloop. I want to install magisk i want root. Anyone help me how to install magisk?. 😢
[Google Pixel 5a] V0latyle:
What version of Magisk are you using? I had no trouble updating my wife's 5a with the factory image, and rooted with Magisk Canary 24102.
[Google Pixel 5a] emonkhan826:
I patches boot images using Magisk v24.2 latest version. Can you give me your patches boot images? How can i root march update? Plzz help me. 🥲
[Google Pixel 5a] V0latyle:
Are you using the correct image? While I could provide my patched image, I'd prefer people learn to do it themselves. That's the whole point of this guide - to educate. Go back to the OP and read the instructions for Initial Root, and tell me what you're having trouble with.

Also, where did you download Magisk from? If you didn't download it from the official GitHub, get rid of it; any "Magisk Manager" site that is not the official GitHub repo is NOT a genuine or trustworthy source.

Hint: I have the repo linked in the OP under Downloads.
[Google Pixel 5a] emonkhan826:
Yes i am using current images and i read all installation. I downloaded magisk from official GitHub repo. Plzz help me how to install magisk 😢 bro give me your magisk canary download link i try to patche boot images and try to flash patches boot images. I install update using adb sideload and i patch boot images and flash it but device not bootup automatic restart.
[Google Pixel 5a] V0latyle:
Magisk Canary should make no difference, but here is Canary 24201

If you're sideloading the OTA, you can't flash the patched image right after updating - you have to let the phone boot and finish the update. Follow the instructions under "Update and Root Sideload OTA". Note that it won't automatically reboot after the sideload completes; you'll need to select Reboot now on the device screen when the update finishes. Then, let the device boot into Android (you won't have root) and sit for a few minutes before you reboot to bootloader and attempt to flash the patched boot image.
[Google Pixel 5a] emonkhan826:
Which command i use to flash patched boot image?

fastboot flash boot.img

Or

fastboot boot.img?
[Google Pixel 5a] emonkhan826:
I flash patched boot image but still same problem. See the picture it's says boot.img missing cmdline or os version 😓
[Google Pixel 5a] V0latyle:
Ignore the cmdline error, it happens for everyone. You're still getting a boot loop? Flash the unpatched boot image, see if the device boots.
[Google Pixel 5a] emonkhan826:
After flash patched boot image my device start to boot after that automatic reboot and bootup but magisk root not installed. What can i do now?
[Google Pixel 5a] V0latyle:
Check your Android version and make sure you're updated. If you are, you should be able to reboot to bootloader and flash the Magisk patched boot image.

If however you are not updated, you need to re-update using one of the methods at the beginning of this thread.
[Google Pixel 5a] emonkhan826:
Check my ss i am updated. If it's possible to get march build magisk patched boot image download link and boot image flashing cmdline?
[Google Pixel 5a] V0latyle:
Once again, ignore the cmdline error. It means nothing in this case and is not a problem. I get that error too when flashing my phone.

You are patching boot.img, and not bootloader.img, right?

If an image you have patched doesn't work, my image most likely won't work for you either.
[Google Pixel 5a] V0latyle:
For what it's worth, I was able to update my wife's 5a (and my 5) using the factory image method in the OP. The only difference is on my 5, I rebooted to bootloader before flashing the patched boot image; on my wife's 5a, I didn't reboot and flashed the patched boot image in fastbootd after the update. Result was the same.

Also, I flashed to both slots, but this shouldn't be necessary nor will it affect your success.
[Google Pixel 5a] zer0se7en:
Having freezing and auto rebooting problems while rooted. 😩
[Google Pixel 5a] V0latyle:
How did you update?
[Google Pixel 5a] zer0se7en:
Sideload OTA. This time I used Canary to root. It was okay at first then after a couple of minutes my 5a froze then auto reboot. Then it happened again. The last time I solved it was doing a factory format on recovery mode.
[Google Pixel 5a] V0latyle:
See if dirty flashing the factory image helps with stability.
[Google Pixel 5a] iqranawaz:
Good job, carry on guideline and help users.
[Google Pixel 5a] V0latyle:
This is the same process as was used on Android 11.
[Google Pixel 5a] V0latyle:
For those of you having boot loops after updating, try disabling Magisk modules. You can do this through adb while booting the patched image (even if it bootloops)

adb wait-for-device shell magisk --remove-modules

Some updates break Magisk modules, so it's important to be aware of this. I personally only use Systemless Hosts, Universal SafetyNet Fix, and MagiskHide Props Config, and have never had issues with a bootloop after updating.
[Google Pixel 5a] V0latyle:
For those of you running custom kernels: DO NOT attempt to update via OTA, and DO NOT try to reflash the custom kernel after OTA.

The best way to update while running a custom kernel is by dirty flashing the factory image. The OTA process checks to make sure the kernel matches the system; a custom kernel won't match, and you'll get the corrupted error.
[Google Pixel 5a] zer0se7en:
Still wondering why it happened on mine when I haven't even installed any modules yet and I have only installed Magisk less than 5 mins prior. I fixed mine by sideload OTA again. But yeah... No more root.
[Google Pixel 5a] V0latyle:
There have been issues with OTA. Dirty flashing the factory image is honestly the safest way of updating while retaining root.
[Google Pixel 5a] zer0se7en:
I used to flash stuff, factory image, flash-all.sh, or whatever when I still have Nexus 5 and 6P. I shifted to OnePlus, Huawei and Xperia and did not bother to root. Now I'm back to Google devices I felt the need to root. But then I realized the command lines even for flashing a factory image seemed different from before because of having an A/B partition. I need to re-train myself to this. Haha. Sucks to be out of the loop.😅
[Google Pixel 5a] CarinaPDX:
I thought I would update on OTA and root. Always start with the most current version of Magisk as often updates come close to Android updates.

To take update first the phone has to be unrooted, by using Magisk and selecting Uninstall Magisk/Restore Images. If the root is not removed the OTA will download and then try to install but failing - a waste of time.

The Magisk instructions are to let the install proceed until it is ready to reboot, then go to Magisk and choose the third install method for OTA to unused partition. Magisk will then restart the phone after it does its thing. But Android senses that the update has not completed and you will have to go through the OTA all over again to clear it. It seems that the actual install of the updated OS is not done until after the Restart button in the OS Update is pressed, and then there is activity before and after restart. And of course root is gone. It would be nice if it worked that easily but apparently not - anyone with any suggestions would be welcome.

Of course it is easy to just do the OTA completely and then use a computer to flash the boot image. It does mean more downloading, extracting, and Magisk modifying the boot.img but it goes quickly with a good connection. But if you have to do that anyway then just download the factory image, flash it, extract the boot.img and modify and flash it - what the OP has been recommending. It will result in the least downloads and the most robust update (installing the complete factory image is more reliable than applying updates).
[Google Pixel 5a] V0latyle:
No, this means something went wrong. A successful update (and patch) means you'll be in the updated slot with root after reboot.

Not quite. These are "out of band" updates - the system downloads and unpacks the OTA package to the inactive slot, then commands a reboot to that slot. If for whatever reason something goes wrong with the update process, like the kernel version doesn't match, or the kernel panics on boot, the system will revert to the original slot.

I believe this has been fixed as of Canary 24306 and should be incorporated in the next stable update.

In terms of simplicity, I only recommend two methods of update:

Automatic OTA, patch to inactive slot

Dirty flash factory image

The other options are there if anyone wants to use them, but some may have difficulty with some methods. Keep in mind that Magisk support is continually evolving as well.
[Google Pixel 5a] SideSkroll:
Guys, I need a little help please.

I tried updating my 5A OTA following these steps:

The OTA didn't work. (update failed for whatever reason, multiple times) and I wasn't sure what to do next so I kept following the steps.

After the reboot the phone displays the google logo and goes into a screen that says "device corrupt and cant be trusted" something along those lines.

I'm on the latest release (minus the last OTA security update which is 14.28 MB IIRC) so I don't think I need to update the bootloader, radio or whatever to get it working... I THINK, not sure...

Any help fixing this would be greatly appreciated (obviously no data loss would be preferable). Cause I cant even turn the phone off. Its stuck on either the "device corrupt" screen or (if I press the power button to continue) the GOOGLE logo screen. NO matter how long I press the power button the phone wont turn off.

Like I said, I followed the instructions to a T but since there is no instruction for what to do in case the OTA isn't working...

Thanks in advance.

UPDATE: Managed to turn it off by pressing PWR+DWN VOL, that took me to fastboot mode (which says I'm on boot slot B?), among rescue, recovery, start was the turn off option. By the way, no other selection seems to be working.

UPDATE 2: Switching to boot slot A didn't fix it but at least the "system is corrupt" screen doesn't show up anymore. Now it "boots" to a "no command" screen. No GOOGLE logo, no nothing. Bootloader is still unlocked though, that's what gives me SOME hope that I might fix this without losing my data.

ANY HELP would be appreciated.
[Google Pixel 5a] V0latyle:
The OTA package includes the updated bootloader and radio. Updating these separately is not necessary. What version of Magisk are you using? Canary 24306 includes fixes for automatic OTAs, which seems to keep breaking.

Download the factory image, reboot to bootloader and flash the unpatched boot image.

See above.

If flashing the unpatched boot image doesn't help, try sideloading the OTA. Don't try to patch anything in Magisk until you get it working again, and we'll go from there.

You can also try using the Android Flash Tool. Don't check any of the boxes, the goal here is to just get a healthy flash.
[Google Pixel 5a] SideSkroll:
Thanks for replying.

IIRC, I have Magisk 24.2 installed. I could have updated it, cant remember to be honest. But its probably 24.2

So, should I just flash with Android Flash Tool (all boxes uncheck). Just like that? Will I lose my data? Or I just try to flash the boot image first?

In either those cases, I cant remember the EXACT version of Android I have. Probably the February release... Pretty sure it is 12, not 12.1. Does it matter?

Also, Should I revert to boot slot B? Or was that part of the failed patching of magisk?

Thanks again for helping me. I really appreciate it man.

Alright, Android Flash Tool did the trick. I was using the march release of android. But I flashed the boot with the latest one (April).

Will that be a problem? How would I go about "correctly updating" the entire build now that Im able to boot the phone?

And last but not least, do I root like "new"? Do I patch THIS NEW boot.img or the one I had earlier? (before the flash)

The Android Flash Tool flash seems to have updated the whole build. Not just the boot.img. So is that it? Is the phone "fixed". If so, can I patch the boot img as usual?

Went ahead and verified everything was "updated" and it seems to be so I patched the latest boot.img and now everything seems to be working fine. root working and everything.

Am I correct to assume that? Is everything "fine" and UP TO DATE or do I have a Frankenstein hybrid of some sort? Cause if needed Id be OK with wiping and flashing clean (now that I can backup my stuff and use titanium etc.)

But like I said, everything LOOKS fine.

Thanks again.