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

Question Magisk/Root procedure for 5a 5G?

Search This thread

bulletfodder

Member
Mar 7, 2010
28
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
67
9
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
Sep 2, 2015
40
24
LG V30
Google Pixel 3
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
8,540
6,059
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
28
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
28
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

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    So I actually did this a couple days ago with the universal safetynet fix. Ipassed safetynet on magisk but googlepay doesnt work. Does googlepay work for you?
    Sorry for the late reply, I was able to use GooglePay without issue the first time I tried. The 2nd time I tried it failed and I checked the SafetyNet checker and it failed as well. I just checked the Universal SafetyNet fix and it seems it was updated yesterday. I updated the Magisk modules and installed 2.1.1 and now I pass the check again. I'll try another payment in the next few days.
    1
    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.
    1
    It doesn't look like there are valid device fingerprints for the 5a yet in MagiskHide Props Config, so I'm not sure how you're able to pass basic ctsProfile checks.
    I've rooted and have installed the universal safetynet fix, but until there is a 5a fingerprint, I'm not sure how I can pass safetynet.
    I just passed it. Will post.
    1
    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.
    1
    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?
  • 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
    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
    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
    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?

    I cannot live without YouTube Vanced or Viper4Android, and I have found no alternative. Magisk rooting is pretty easy though, so I don't think it's that much of a hassle.

    in case anyone cares, magiskhide props config module was updated recently and I was able to use it to force basic attuestation, so my 5a is now passing safetynet checks.

    Wow holy you're right it is super recent, thanks for the update.
    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!