Question Magisk/Root procedure for 5a 5G?

Search This thread

bulletfodder

Member
Mar 7, 2010
30
7
Not trying to be a smarta$$ but since you didn't list it in your steps, I have to ask. Did you flash the full Sept image? IMHO, if you are going to download the full image each month or whenever, and extract the boot image to be patched, might as well just flash the full image then flash the Magisk Patched boot img instead of trying to get the OTA. If you want to keep your data each time you flash the full image, just remove the "-w" in the Flash-All.bat file.


I did flash the full image. I caught the "-w" tag and realized I wasn't going to delete any of my data.

I guess next, I can try with the OTA file, but I don't know how that's going to be any better.
 
  • Like
Reactions: grandpajiver

bo0gietrain

Senior Member
Nov 6, 2013
69
10
I did flash the full image. I caught the "-w" tag and realized I wasn't going to delete any of my data.

I guess next, I can try with the OTA file, but I don't know how that's going to be any better.
I followed the steps a user posted at the bottom of page 1 of this thread:


Also I got safetynet and google pay working with MagiskHide Props - force basic attestation with default Nexus 5 value.
 
  • Like
Reactions: bulletfodder

nsoult

Member
Mind sharing your steps?

I've downloaded the Sept update (full image)
extracted boot.img
patched with magisk
flashed to boot_a via adb
Checking the system page still shows June update.


Tried uninstalling Magisk, and I still can't apply the OTA.
Tried flashing stock (unpatched) boot.img, still can't apply the OTA.

Thankfully, I've made a full backup, so if I need to apply the entire image restore, I should be able to restore everything I need to. I'd like to avoid this. I want upgrading with root to not be a giant pain.


edit: process so far.

Download Sept update
edit the "-w" from the flash-all.bat
extract boot.img
send to phone
patch with magisk
pull to computer
reboot to fastbootd
run flash-all.bat
Code:
target reported max download size of 268435456 bytes
sending 'bootloader' (8754 KB)...
OKAY [  0.035s]
writing 'bootloader'...
FAILED (remote: No such file or directory)
finished. total time: 0.043s
rebooting into bootloader...
OKAY [  0.003s]
finished. total time: 0.005s
< waiting for device >
target reported max download size of 268435456 bytes
sending 'radio' (149780 KB)...
OKAY [  0.685s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g7250-00132-210427-B-7316661
(bootloader) Flashing partition modem_a
OKAY [  0.540s]
finished. total time: 1.227s
rebooting into bootloader...
OKAY [  0.050s]
finished. total time: 0.051s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.sig'
archive does not contain 'vendor.sig'
--------------------------------------------
Bootloader Version...: b9-0.4-7265224
Baseband Version.....: g7250-00132-210427-B-7316661
Serial Number........: 17211JECB****
--------------------------------------------
checking product...
OKAY [  0.070s]
checking version-bootloader...
OKAY [  0.069s]
checking version-baseband...
OKAY [  0.069s]
sending 'boot' (98304 KB)...
OKAY [  0.409s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 0.933s
Press any key to exit...

fastboot flash bootloader bootloader-barbet-b9-0.4-7265224.img
Code:
OKAY [  0.144s]
writing 'bootloader'...
(bootloader) Flashing Pack version b9-0.4-7265224
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition table for Lun = 1
(bootloader) Flashing partition table for Lun = 2
(bootloader) Flashing partition table for Lun = 4
(bootloader) Flashing partition table for Lun = 5
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition uefisecapp_a
(bootloader) Flashing partition featenabler_a
(bootloader) Flashing partition logfs
OKAY [  0.601s]

fastboot flash boot "patched.img" and I get
Code:
sending 'boot' (98304 KB)...
OKAY [  0.373s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)

Continue to flash to boot_a & boot_b

Code:
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot flash boot_a .\patched.img
target reported max download size of 268435456 bytes
sending 'boot_a' (98304 KB)...
OKAY [  0.373s]
writing 'boot_a'...
OKAY [  0.377s]
finished. total time: 0.752s
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot flash boot_b .\patched.img
target reported max download size of 268435456 bytes
sending 'boot_b' (98304 KB)...
OKAY [  0.374s]
writing 'boot_b'...
OKAY [  0.380s]
finished. total time: 0.756s
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot  reboot
rebooting...

When I reboot, I'm still showing June Security update
Any thoughts?
your steps are a bit out of order. You shouldn't patch your boot img until after you've updated (flash-all)
after you have done a normal update, then you can patch your image with magisk, pull it and flash it with fastboot. after you reboot you should be rooted, although you probably won't pass safetynet.
 

mac62

Member
I'm new to gaining root by way of image patching; came from an LG V30 where direct install method was used. When i try to select the file and patch, I get the error when attempting to patch the Bootloader file; Unsupported/Unknown Image Format.

I'm on the September update, rd2a.210905.002. Process was:

Unlock bootloader
Enabled USB debugging on phone after reset
Download factor image (verified SHA sum)
Extracted bootloader img file and pushed to Download folder on phone by adb
Install Magisk from GitHub site
Open Magisk, select install using Select and Patch a File

I've attempted this with Stable, Beta, adn Canary builds of Magisk all with the same result.

I've looked through some bug reports on older builds of Magisk but it seems like the problem may have been resolved. Any assistance would be appreciated.
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
9,890
7,439
Google Pixel 7 Pro
Mind sharing your steps?

I've downloaded the Sept update (full image)
extracted boot.img
patched with magisk
flashed to boot_a via adb
Checking the system page still shows June update.


Tried uninstalling Magisk, and I still can't apply the OTA.
Tried flashing stock (unpatched) boot.img, still can't apply the OTA.

Thankfully, I've made a full backup, so if I need to apply the entire image restore, I should be able to restore everything I need to. I'd like to avoid this. I want upgrading with root to not be a giant pain.

Did you really reboot to fastbootd? I don't have a 5a but I flash frim fastboot, not fastbootd. After the bootloader and modem flashes, the phone then boots to fastbootd (on it's own) and then continues.


edit: process so far.

Download Sept update
edit the "-w" from the flash-all.bat
extract boot.img
send to phone
patch with magisk
pull to computer
reboot to fastbootd
run flash-all.bat
Code:
target reported max download size of 268435456 bytes
sending 'bootloader' (8754 KB)...
OKAY [  0.035s]
writing 'bootloader'...
FAILED (remote: No such file or directory)
finished. total time: 0.043s
rebooting into bootloader...
OKAY [  0.003s]
finished. total time: 0.005s
< waiting for device >
target reported max download size of 268435456 bytes
sending 'radio' (149780 KB)...
OKAY [  0.685s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g7250-00132-210427-B-7316661
(bootloader) Flashing partition modem_a
OKAY [  0.540s]
finished. total time: 1.227s
rebooting into bootloader...
OKAY [  0.050s]
finished. total time: 0.051s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.sig'
archive does not contain 'vendor.sig'
--------------------------------------------
Bootloader Version...: b9-0.4-7265224
Baseband Version.....: g7250-00132-210427-B-7316661
Serial Number........: 17211JECB****
--------------------------------------------
checking product...
OKAY [  0.070s]
checking version-bootloader...
OKAY [  0.069s]
checking version-baseband...
OKAY [  0.069s]
sending 'boot' (98304 KB)...
OKAY [  0.409s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 0.933s
Press any key to exit...

fastboot flash bootloader bootloader-barbet-b9-0.4-7265224.img
Code:
OKAY [  0.144s]
writing 'bootloader'...
(bootloader) Flashing Pack version b9-0.4-7265224
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition table for Lun = 1
(bootloader) Flashing partition table for Lun = 2
(bootloader) Flashing partition table for Lun = 4
(bootloader) Flashing partition table for Lun = 5
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition uefisecapp_a
(bootloader) Flashing partition featenabler_a
(bootloader) Flashing partition logfs
OKAY [  0.601s]

fastboot flash boot "patched.img" and I get
Code:
sending 'boot' (98304 KB)...
OKAY [  0.373s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)

Continue to flash to boot_a & boot_b

Code:
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot flash boot_a .\patched.img
target reported max download size of 268435456 bytes
sending 'boot_a' (98304 KB)...
OKAY [  0.373s]
writing 'boot_a'...
OKAY [  0.377s]
finished. total time: 0.752s
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot flash boot_b .\patched.img
target reported max download size of 268435456 bytes
sending 'boot_b' (98304 KB)...
OKAY [  0.374s]
writing 'boot_b'...
OKAY [  0.380s]
finished. total time: 0.756s
PS E:\8. Phone Backups\Pixel 5a\barbet-rd2a.210905.003> fastboot  reboot
rebooting...

When I reboot, I'm still showing June Security update
Any thoughts?
 

bulletfodder

Member
Mar 7, 2010
30
7
When I try flashing from fastboot, this is my output - it fails flashing the bootloader, and the boot portions.

Fastbootd allows me to flash the bootloader.img, and I can flash my patched boot file to boot_a & boot_b, but not to the boot section.

Code:
5a\barbet-rd2a.210905.003> .\flash-all.bat
target reported max download size of 268435456 bytes
sending 'bootloader' (8754 KB)...
OKAY [  0.036s]
writing 'bootloader'...
FAILED (remote: No such file or directory)
finished. total time: 0.043s
rebooting into bootloader...
OKAY [  0.002s]
finished. total time: 0.003s
< waiting for device >
target reported max download size of 268435456 bytes
sending 'radio' (149780 KB)...
OKAY [  0.685s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g7250-00132-210427-B-7316661
(bootloader) Flashing partition modem_a
OKAY [  0.558s]
finished. total time: 1.245s
rebooting into bootloader...
OKAY [  0.050s]
finished. total time: 0.051s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.sig'
archive does not contain 'vendor.sig'
--------------------------------------------
Bootloader Version...: b9-0.4-7265224
Baseband Version.....: g7250-00132-210427-B-7316661
Serial Number........: 17211JECB11850
--------------------------------------------
checking product...
OKAY [  0.070s]
checking version-bootloader...
OKAY [  0.069s]
checking version-baseband...
OKAY [  0.069s]
sending 'boot' (98304 KB)...
OKAY [  0.409s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 0.930s
Press any key to exit...[

Kinda stumped, because I had no issues rooting it with Magisk.
 

bulletfodder

Member
Mar 7, 2010
30
7
I'm new to gaining root by way of image patching; came from an LG V30 where direct install method was used. When i try to select the file and patch, I get the error when attempting to patch the Bootloader file; Unsupported/Unknown Image Format.

I'm on the September update, rd2a.210905.002. Process was:

Unlock bootloader
Enabled USB debugging on phone after reset
Download factor image (verified SHA sum)
Extracted bootloader img file and pushed to Download folder on phone by adb
Install Magisk from GitHub site
Open Magisk, select install using Select and Patch a File

I've attempted this with Stable, Beta, adn Canary builds of Magisk all with the same result.

I've looked through some bug reports on older builds of Magisk but it seems like the problem may have been resolved. Any assistance would be appreciated.


You don't want to patch the 'bootloader-barbet-b9<snip>.img file, you want to open the image-barbet-rda<snip>.ZIP, and extract just the boot.img file.

Or did I misread your post?
 
  • Like
Reactions: mac62

airheaded1076

Member
Dec 26, 2019
10
5
Google Pixel 5a
Hello everyone, I just upgraded to LineageOS 19.1 with MicroG for Pixel 5a (barbet) and I can't seem to get Magisk to work. I followed the official Magisk install instructions but when I flash magisk_patched.img it goes into a boot loop. Anybody know how to install root on 19.1?
 

forestnew

New member
Aug 13, 2022
3
1
OnePlus 7 Pro
OnePlus 9
If you are on LineageOs 19.1 you may be able to simply adb sideload magisk.zip from recovery wher it says apply update from adb. This worked for me on PE-Plus-barbet-12.1 for the last 6 months. Now I am testing android 13 stock and rooted it with patched boot, just look on youtube if you need step by step help, or search google for the article titled How to root pixel devices running android 13 via magisk, by droidwin, as that is the one I used to root my android 13 stock device.
 

airheaded1076

Member
Dec 26, 2019
10
5
Google Pixel 5a

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I have a Pixel 2 XL. It's rooted on Android 10 still. I never even upgraded to Android 11 because by the time it came out I was already sick of dealing with the rooting updates. I don't care what anybody here says it's always a pain in the ass. It takes 3 to 4 hours to get everything set back up right after rooting. The time to back up everything before you start has to be considered. And when things go wrong you spend a whole weekend making them right. I don't have time for it anymore.

    I most enjoy my EX kernels ability that allows me to sweep to sleep the display. I love this because it's handy and makes it so my screen off button (power button) is basically never used. It never fails this way. This means I never have to tear my phone apart to replace mechanical components.

    I enjoy adaway. I enjoy YouTube vanced. I enjoy viper for Android. I enjoy substratum. I enjoy button mapper. I really, really enjoy Tulsa divers pixel launcher mods that allow me to make the buttons on the screen smaller to give me more screen real estate, but I think that hasn't been available since Android 11. You can no longer modify button icons from what I understand. I don't know if this is still true. I know there are rootless versions of substratum and the YouTube advanced, but when I last read about them years ago they were limited as compared to the root versions.

    I leaned towards root being basically worthless, not worth the time, and more of a pain in the ass for a basic user who's not a developer. If I get the Pixel 5a or the Pixel 6 is rooting still worth it in 2021? Are there any rootless versions of the things I've mentioned here that would satisfy all my likes and needs I've mentioned here on Android 12 on a Pixel 5A or Pixel 6?
    2
    Hey all,

    I purchased my new 5a after seeing various headlines about how the Google Dialer would allow you to opt in to automatic call recording. That's incredibly helpful for my job, and a major reason why I've kept my OnePlus 6 for the past few years, but now the battery is barely getting through half the day.

    It looks like Google is restricting auto calls to outside the US, which sucks because I live in a one-party consent state and always ask for permission to record.

    Magisk could be the answer since it has a few modules for other Pixels to get auto call recording. However, do we know if we can apply the same method for Magisking the 5 to the 5a? I figure it may carry over because these two devices are so similar in specs and software, but I'd like to make sure before getting into the process.
    Go to Settings -> About Phone. At the bottom is your build number. Go to https://developers.google.com/android/images and download the image that matches your version, probably .007.

    Extract boot.img from it and adb push it to /sdcard. Have magisk patch that and save it. adb pull that patched boot.img and make sure you have OEM Unlock enabled in Developer Options. After confirming that, reboot to fastboot and run 'fastboot flashing unlock'. This will likely wipe your phone. Once that's done, reboot back into fastboot and run 'fastboot flash boot <local path to patched boot.img>' Now you have magisk installed. You can also install LSPosed and XPrivacyLua if you want to tinker with that or the Universal SafetyNet Fix at: https://github.com/kdrag0n/safetynet-fix/releases. Just download 1.2.0 and adb push it to your phone and have magisk install it.
    2
    Do you root with Magisk? It's definitely a lot easier now. https://topjohnwu.github.io/Magisk/ota.html

    Doing updates and staying rooted was a PITA for me too, I ended up just never updating haha. In fact, my P2 is still running some old custom 9.1 version.
    Yes. I use magisk, and that's exactly what I did. I have yet to (never will on this phone anymore) update to android 11 because I KNEW such a big OS change would leave my phone broken for days. One of the big things I like on my phone is Tulsa divers modified button bar icons and making the bar a lot smaller, so it uses less screen real estate. When 11 came out I read that the icons couldn't be modified. Not sure if that's correct. It's been too long. Regardless, I just stopped updating because of the potential for a bad couple days, and even when things went well I never wanted to spend the 3-4 hrs to back the phone up and get everything just like it was before after booting back up into the new update.

    It's easier to update and root now than it was when I had to download the update, open it, remove "-w" from the flashall.bat file, flash twrp, flash magisk, and then re-install all the modules or the ones that were messed up or inactive from the update?
    2
    My experience is that while I pass safetynet, the google play store is still restricted (no netflix, etc) and google pay doesn't seem to work after the new security update from a few days ago. Hope you have better luck.
    It's full possible to be rooted via magisk and pass cts/safetynet... and also have full usage of Google Pay/Netflix/etc.. There are zero guides so far, so I've been debating making one...
    1
    You don't want to patch the 'bootloader-barbet-b9<snip>.img file, you want to open the image-barbet-rda<snip>.ZIP, and extract just the boot.img file.

    Or did I misread your post?
    Nope, you read it right and that was exactly my problem. Can't believe I confused bootloader image with boot image. Thanks for straightening me out!