• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[GUIDE] Unlock/Root/Safetynet for Pixel 4a

Search This thread

a1291762

Senior Member
Nov 20, 2012
642
280
yasmar.net
fastboot flash boot magisk_patched-23000_AVQT0.img
target reported max download size of 268435456 bytes
sending 'boot' (65536 KB)...
OKAY [ 1.500s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
That's not a current fastboot because it doesn't know how to turn 'boot' into 'boot_a' or 'boot_b' based on the current slot.

If you can't upgrade to the current fastboot, you can try one of these options.

1. Find your current slot and boot that:
fastboot getvar current-slot # will be 'a' or 'b'
fastboot flash boot_a magisk_patched.img # or boot_b

2. Boot the patched image and get Magisk Manager to do the permanent installation.
fastboot boot magisk_patched.img
# use Magisk Manager to install (direct)
 

a1291762

Senior Member
Nov 20, 2012
642
280
yasmar.net
When I connect my usb to phone there is no notification to select transfer files option or adb option. That notification is gone. Any help?
I have no idea...

Is USB debugging still enabled in Settings -> System -> Advanced -> Developer?

Can adb see the phone?

Do you have Settings -> Connected Devices -> USB? Mine is set to "USB controlled by this device" and "Use USB for No data transfer".

I get 2 notifications when I connect USB. one for ADB and one for regular USB.

Maybe you need to disconnect and re-connect the cable?
 

thedemon786

Senior Member
Jul 15, 2012
415
106
Delhi
Google Pixel 4a
I have no idea...

Is USB debugging still enabled in Settings -> System -> Advanced -> Developer?

Can adb see the phone?

Do you have Settings -> Connected Devices -> USB? Mine is set to "USB controlled by this device" and "Use USB for No data transfer".

I get 2 notifications when I connect USB. one for ADB and one for regular USB.

Maybe you need to disconnect and re-connect the cable?
yeah i too used to get those 2 notificatins. now theres none. my device is detected though. and i see my devicewhen i use adb devices command. just no notification and hence i cant use transfer files option. i tried everything reconnecting, rrdtarting mobile , laptop etc.
 

a1291762

Senior Member
Nov 20, 2012
642
280
yasmar.net
still no notification but i found a setting in developer option to connect file transfer when i connect my phone to usb. so at least file transfer also working and usb too. just no notification.
It is possible to hide notifications...
Maybe you accidentally did this for the USB notifications? I have no idea what "app" they are attached to though... System Events or SystemUI probably...
 

a1291762

Senior Member
Nov 20, 2012
642
280
yasmar.net
reached home yet? lol
Had a ... Bad few days. Long story.
Anyway, it's Android System and I can't even disable these notifications, though I can customize them...
Screenshot_20210613-104556.png
Screenshot_20210613-104512.png
Screenshot_20210613-104526.png
 

thedemon786

Senior Member
Jul 15, 2012
415
106
Delhi
Google Pixel 4a

andyxo

Member
Aug 30, 2019
21
2
Problem with rooting June 2021 OTA RQ3A.2106.05.005 with Magisk 23.0 (is using 23.0 the problem?) Please read below...

So it's June 2021 now and Android 11 latest OTA Update is RQ3A.2106.05.005 (5 Jun 2021). I am a new Pixel 4A (4G) owner (coming from Lollipop) following the root steps carefully as I could but also realizing that the guide in the original post is somewhat old and written for what worked last year and other posts in this thread were written for older (pre-June 2021) OTA updates.

So unlocking the bootloader was easy. Rooting seemed to be easy too but now am not able to get either Root Explorer/ES File Explorer/Solid Explorer to perform "root-required" tasks. So I guess I better explain what I did to root this device and hopefully one of you root geniuses can pls tell me how to fix this and/or where I went wrong...

-- Downloaded the whole RQ3A.2106.05.005 2GB file (Pixel 4a Sunfish) and extracted the boot.img

-- Did the boot.img patching with Stable Magisk 23.0 because I read in this thread that the stable works now *(the big ?)*

-- Did the fastboot cmd stuff (Win7) with this command : fastboot flash boot magisk_patched-23000_POZm8.img

-- This is the only thing that cmd said after I did this: (Is this correct? Is this what it should have said?)
E:\Pixel Stuff\platform-tools>fastboot flash boot magisk_patched-23000_POZm8.img
Sending 'boot_a' (65536 KB) OKAY [ 1.544s]
Writing 'boot_a' OKAY [ 0.296s]

-- So rebooted and a simple root checker app available from play store said yes, I have root. Well, am not so sure about that which I discovered soon after...

-- First test I did to make sure I have root is to fire up Root Explorer and try to enable r/w in a root-required folder. It asked for Superuser which I granted but Root Explorer failed by not allowing me to enable r/w access nor copy a file/create a folder into a r/w protected folder even though I granted Superuser access to it. "System/usr/keylayout", for example.

-- So did some more reading and thought that perhaps I need to do the whole SafetyNet Fix to get Root Explorer to work properly. So followed all those steps and yes, now I am passing all the Magisk "Check SafetyNet" checks. All Blue, Success.

-- Rebooted phone a few times. Go back to Root Explorer and still no dice. Can't do root-required tasks. Thinking Root Explorer might be the culprit, tried ES File Explorer & Solid Explorer. Also no dice after granting root access to them, also says fail fail fail. Both these apps are the newest versions as of today.

-- This is now where I have stopped. Have done nothing else to phone until I get this thing properly rooted with file explorer access. No magisk modules are installed.

Okay guys, what did I do wrong and please tell me how to fix this please or what I can try? What can I check to see if I am properly rooted? My limited expertise has run its course...


 
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,356
5,046
Sydney
Problem with rooting June 2021 OTA RQ3A.2106.05.005 with Magisk 23.0 (is using 23.0 the problem?) Please read below...
...snip...
Okay guys, what did I do wrong and please tell me how to fix this please or what I can try? What can I check to see if I am properly rooted? My limited expertise has run its course...
Your device is read-only for many "root-required" paths, on older devices. You cannot modify partitions such as System. The fact that you have not explicitly stated which paths, gives me the impression that you are probably trying to do doing something beyond root. To modify these RO paths/partitions, they have to be done systemlessly, through magisk.

As a side, instead of your other explorers, try MiX, and set the namespace in Magisk to global.

You also appear to be mixing between the Jun firmware with the older May update.
 

andyxo

Member
Aug 30, 2019
21
2
Your device is read-only for many "root-required" paths, on older devices. You cannot modify partitions such as System. The fact that you have not explicitly stated which paths, gives me the impression that you are probably trying to do doing something beyond root. To modify these RO paths/partitions, they have to be done systemlessly, through magisk.
Hi DJ, thanks for your reply and again thanks for supplying me with that V4A for Android 11 file via pm yesterday...

So regarding my file explorer probs above, after much research I didn't know that we are not allowed to do the things we took for granted in rooted lollipop anymore (lollipop was my last phone, rooted with Kingoroot, making a big jump to 11, I know ;-) so I am way behind in Android & Magisk knowledge wise, so I hope you can forgive that. So it does seem I have rooted my 4a correctly which is some good news at least because the whole reason for this is to use V4A.

And DJ, while I have your kind attention, regarding that Android 11 V4A version you gave me... can I now attempt to install that version with Magisk v23 installed? Or must I downgrade Magisk first while hopefully not losing root by doing that... Cheers!
 
Last edited:

andyxo

Member
Aug 30, 2019
21
2
Viper works with Magisk v23.0

Where did you read that you need to downgrade Magisk?

I don't remember where I read that... I have been reading so much trying not to make mistakes & screw my new phone ;-)

So today installed that version of V4A that you highly recommend for Android 11 and after the reboot I had no system sounds, my music app wouldn't open & system settings kept locking up. Yikes! So uninstalled it and after rebooting the problems went back to normal, thank god.

So reinstalled it again, and now seems to be working okay or at least I haven't lost my system sounds yet again after multiple reboots with V4A enabled. Then had to figure out where to put my revolver file because there is no option where to point the storage to like in older V4A versions. Finally find it under Android>data>com.pittvandewitt.viperfx

First thing I noticed is how different (less bass, less oomph) this version of V4A sounds on my Pixel 4a with my bluetooth headset versus the V4A v2.5.0.5 on my old cheapo rooted Lollipop phone I got six years ago even though they both seem to have the same V4A driver 2.5.0.4. I got both phones set up with same V4A settings, Convolver & DDC and with same music player (also with same settings) and they sound so radically different with the same bluetooth headset. Great on the old cheapo phone and quiet & crappy on the Pixel 4a. I don't know why this is or what to do about it.... any ideas?

Edit : Also, using your permissive.sh file caused me to get "no driver found" when going to V4A after a reboot... replacing that permissive file back to the original and rebooting no change so had to uninstall V4A again and then reinstall again...
 
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,356
5,046
Sydney
I don't remember where I read that... I have been reading so much trying not to make mistakes & screw my new phone ;-)
Then be careful, simply asking such a question puts doubts in people heads, and now someone else is going to believe that "they read somewhere" you have to downgrade Magisk., Naybe edit yur original post with a strike through on the question.

So today installed that version of V4A that you highly recommend for Android 11 and after the reboot I had no system sounds, my music app wouldn't open & system settings kept locking up. Yikes! So uninstalled it and after rebooting the problems went back to normal, thank god.
I have had a history of weird boots with my Pixel 4a. Totally unrelated to sound, and more commonly with the older firmware builds. I am strill comming to terms with the phone nopt totally booting until after I have unlockied it. Thiosmay also affect your results.ie how long between the boot and when you unlock it.

So reinstalled it again, and now seems to be working okay or at least I haven't lost my system sounds yet again after multiple reboots with V4A enabled. Then had to figure out where to put my revolver file because there is no option where to point the storage to like in older V4A versions. Finally find it under Android>data>com.pittvandewitt.viperfx

First thing I noticed is how different (less bass, less oomph) this version of V4A sounds on my Pixel 4a with my bluetooth headset versus the V4A v2.5.0.5 on my old cheapo rooted Lollipop phone I got six years ago even though they both seem to have the same V4A driver 2.5.0.4. I got both phones set up with same V4A settings, Convolver & DDC and with same music player (also with same settings) and they sound so radically different with the same bluetooth headset. Great on the old cheapo phone and quiet & crappy on the Pixel 4a. I don't know why this is or what to do about it.... any ideas?
The sound that comes out of viper is TOTALLY dependent on your settings/config. I have a pretty good sound system in my car, and I also have a lot of experience with digital sound, and I know how to configure my Viper (for rme) such that my rear view mirror will vibrate when a heavy bass song comes on and the volume is up (the car came stock with subwoofers). Its all in your settings. Maybe the default settings are less aggressive OR the dials are less responsive at the lower settings, but I have had no issues getting more than enough bass than my stereo could handle. For your test, simply lower the sub freq to 40Hz and the type to Subwoofer, and move the Bass Gain over half way, and push the Bass frequencies up in your Eq,. You will have more bass than your stereo could handle at louder volumes.

Edit : Also, using your permissive.sh file caused me to get "no driver found" when going to V4A after a reboot... replacing that permissive file back to the original and rebooting no change so had to uninstall V4A again and then reinstall again...
You can play with the delay (ie extend it) on the permissive script. I have now moved it into a separate script, as part of my many boot scripts. You can even test theeffects of manually switching a few minutes after boot. This app lest you manually switch using a UI (as well as many MANY other things) You can fiund it in the menu under Current State>SELinux Status

First thing I noticed is how different (less bass, less oomph) this version of V4A sounds on my Pixel 4a with my bluetooth headset versus the V4A v2.5.0.5 on my old cheapo rooted Lollipop phone I got six years ago even though they both seem to have the same V4A driver 2.5.0.4. I got both phones set up with same V4A settings, Convolver & DDC and with same music player (also with same settings) and they sound so radically different with the same bluetooth headset. Great on the old cheapo phone and quiet & crappy on the Pixel 4a. I don't know why this is or what to do about it.... any ideas?
I have never used Bluetooth audio with viper, I thought that it may of actually by-passed viper, for at least some. Again, it may just be the settings that will need to be different to what you previously used.

Comparing the sound difference between one version and another is pointless without adjusting the options/setting, which is where the change MAY actually be. They may of changed some knob from linear to log. The sounds thesame, but the settings/slider will be different.
 

XDAUser1234

Member
Sep 5, 2014
39
3
Quebec City
okay so i may have tried to rush an update, or rush and hope for the best? One way or another, got stuck :). Pixel 4a, had not taken an update since Sept 2020 (liked it how it was, ultimately was annoyed I was unable to update my camera app).

I updated Magisk to the latest, "uninstalled" via magisk, took the OTA to do the install.

Loaded the boot.img direct from google to the phone, patched it with Magisk, and moved it back to my computer. trying to flash with ADB and getting "boot partition is smaller than boot image" - it's trying to use partition A, if that matters. Thoughts/tips?

Also - is it worth using the Chrome Flash Tool? seems interesting - with options to force flash all partitions (is that a good thing?) and also a "Force Debuggable" which indicates it enables adb root - either a good path forward? phone is usable at this point just would like to get magisk and root back

edit - tried patching one more time from magisk then applying the patch and seem to be in trouble. it gives me "sending xxxxxx, writing xxxxx" both to boot)a, both OKAY, finishes with my total time....then fastboot reboot and it cant get past the google logo. once it does, it goes back to fastboot mode and cant boot out of it..

EDIT EDIT - used the chrome recovery tool and it got everything installed as needed! Have not tried to root again (yet :)) but back running stable
 
Last edited:

andyxo

Member
Aug 30, 2019
21
2
Loaded the boot.img direct from google to the phone, patched it with Magisk, and moved it back to my computer. trying to flash with ADB and getting "boot partition is smaller than boot image" - it's trying to use partition A, if that matters. Thoughts/tips?

Hi, did you get your boot problem sorted? I just flashed RQ3A.2106.05.005 with Magisk 23.0 a week ago on my Pixel 4a (4G Sunfish) and for me had no problems installing it or booting with it for the week.. do you want me to upload it for you?

Edit : Never mind, narrowed down my intermittent boot "no sound" problems I mentioned in a post earlier in this thread to the patching of the boot file with Magisk 23. Finally after much troubleshooting I removed Magisk 23 (removed root) and now my phone sound is stable again. So gonna try to do the whole root procedure again but this time with magisk manager 8.0.2 & Magisk 21... wish me luck lol
 
Last edited:

XDAUser1234

Member
Sep 5, 2014
39
3
Quebec City
Hi, did you get your boot problem sorted? I just flashed RQ3A.2106.05.005 with Magisk 23.0 a week ago on my Pixel 4a (4G Sunfish) and for me had no problems installing it or booting with it for the week.. do you want me to upload it for you?

Edit : Never mind, narrowed down my intermittent boot "no sound" problems I mentioned in a post earlier in this thread to the patching of the boot file with Magisk 23. Finally after much troubleshooting I removed Magisk 23 (removed root) and now my phone sound is stable again. So gonna try to do the whole root procedure again but this time with magisk manager 8.0.2 & Magisk 21... wish me luck lol

What timing just came back to add an update! I had to swap my sim for the day because couldnt focus on it, but last night i hooked it up and used the Chrome Flash Tool - took a bit, but everything came right back up (sigh of relief). So back running, but havent re-tired Magisk yet but will give it some testing later this afternoon!

that sound issue would be frustrating! Good luck!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Well, it doesn't sound like the reason for this is skipping the reboot in the first command. It's pretty much dirty flashing so I guess it's expected, but I really don't want to format everything again... I also used Viper and Vanced (though the latter is no longer installed through Magisk I think) plus a few more mods so I might have similar problems.

    Anyways, now I have to find out how I can update the bootloader first. Oh wait. I just did your command but not the flash-all.sh first... Will update with news.

    EDIT: Managed to flash it. Took me hours to make platform-tools work on Fedora, the ones provided by the distro are way too out of date. Didn't try the skip-reboot method but had no problem with viper nor vanced. Thanks everyone.
    Regarding Vanced. It is "installed" via the manager app that explicitly creates the magisk module. So the daily running IS through magisk.

    Just an FYI, this is the log of the steps I used to do my last flash. Its windows shell and I manually run each line. I do not run it as a single "flash all" and hence there are no wait steps, I simply wait.
    Code:
    adb kill-server
    
    PATH=%PATH%;"%SYSTEMROOT%\System32";"C:\Java\x86\Android\android-sdk\platform-tools";
    cd /d G:\flash_stock
    
    fastboot devices
    fastboot flash bootloader bootloader-sunfish-s5-0.3-7241803.img
    fastboot reboot-bootloader
    
    fastboot flash radio radio-sunfish-g7150-00047-210319-b-7220401.img
    fastboot reboot-bootloader
    
    fastboot --skip-reboot update image-sunfish-rq3a.210705.001.zip
    
    fastboot reboot-bootloader
    
    fastboot devices
    fastboot flash boot magisk_patched-23000_UjTik.img
    
    fastboot reboot
    
    adb kill-server
    1
    so you ended up with straing/new(ish) Magisk now right? no more Magisk Manager PLUS Magisk, but just straight Magisk 22.1? Do we still need the canary version?
    But first test with the latest stable Magisk. @andyxo has issues with the latest, but its (23.0 and app 23.0) running perfectly fine on mine. NB: I do not try to get SafetyNet passing on my device.
    1
    Could I get a definitive guide on how to update to the newest security update whilst rooted?
    Google doesn't seem to offer OTAs to people who are rooted. Maybe not even if your bootloader is unlocked? I have never been offered an OTA even after unrooting.

    So you have to install a full OTA package manually, or install a factory image (after removing the -w flag) in order to update to the new image. You get these direct from Google and they're around 2Gb in size. Pros and cons to each.

    Then you have to root again.

    I prefer to patch boot.img myself but if you trust people, there are usually patched boot.img files floating around. Make sure you get one that matches your version and Magisk though.

    I use factory images because it's simpler to get boot.img out. I patch boot.img with Magisk manager then boot the patched image before patching the real boot with Magisk manager.

    But there's probably half a dozen different ways people do it...
  • 24
    With the pixel 4a finally arriving for some (like me), figured I'd make a quick guide

    Note that unlocking your bootloader breaks safetynet. There's a workaround in this guide but no guarantee that it won't get patched out in the future.

    Also note that this only works with the unlocked carrier model. Cell providers typically lock you out from this unlock process.

    Unlocking Bootloader (this is for the unlocked mode, can't speak for other models)
    • Go to system settings -> About phone -> tap on 'Build number' several times until Developer Options is enabled
    • Back out into settings and go to System -> Advanced -> Developer Options -> Enabled 'OEM Unlocking'
    • Unplug your phone if it's plugged into anything and power it off
    • Boot into fastboot by holding Power + Vol Down
    • Plug into pc -> open terminal/shell/whatever
    • Type 'fastboot flashing unlock' -> Follow prompt on device to unlock bootloader (Note that this will FACTORY RESET device)
    • The bootloader is now unlocked!

    Rooting
    • Grab the boot img for your rom. If it's stock, get it from the official zip
    • Copy the boot.img to your device
    • Install Magisk manager (grab it from the release zip on github - it's in the common folder)
    • Open Magisk Manager -> select 'Beta'
    • Back on the main page of Magisk Manager, Select 'Install' -> 'Select and Patch File' -> select your boot.img file -> it'll output the patched boot img to your Downloads folder
    • Copy the magisk_patched.img to your pc
    • Reboot your device back into fastboot (see Unlock section above)
    • Open a terminal in the directory your patched boot img file is and type 'fastboot flash boot magisk_patched.img'
    • You're now rooted!
    • Disable "Automatic System Updates" in Developer Options so you aren't surprised with an OTA on boot and end up unrooted (see the OTA section below on proper way of updating)

    Passing SafetyNet
    As was discovered some time ago, google is switching to a hardware attestation method for safetynet. Fortunately, at the time of writing, there is a workaround thanks to @Didgeridoohan. As of January 2021, this fix no longer works. A new module by @kdrag0n now fixes the hardware attestation issue:
    • Enable MagiskHide in magisk manager
    • Download/Install his Safetynet-fix module from this xda thread
    • Reboot and verify you should hopefully pass safetynet!

    Taking an OTA While Rooted

    Note: Installing to Inactive slot has been disabled temporarily meaning that if you take an ota, you'll need to do the patch boot img method like you did initially. See here for more details.

    Note that you can download the rom from google's site here and extra the boot img from there for patching.
    TopJohnWu has a great guide on how to do this here along with some nice screen shots that complement this quick guide. I'll summarize the applicable stuff here:
    • When an OTA is available, ignore it at first
    • Open Magisk Manager and go to Uninstall -> Restore Images
    • Now go back to Settings -> System -> Advanced -> System Update and install the OTA but DO NOT REBOOT
    • Once the install is done (but before rebooting), go back into Magisk Manager -> Install -> Install to Inactive Slot
    • Once the install is done, choose the reboot option IN MAGISK MANAGER. It works some voodoo magic to switch to updated slot and skip post-ota verifications
    Having issues?

    Try magisk canary instead


    Note that this isn't a support thread but just a guide. You're welcome to post your tips/experiences/questions here but don't expect me to answer or reply to them.

    I'll try to keep this updated with other useful guides such as TWRP when/if it is released for this device :good:
    3
    Everytime I install magisk module and reboot I boot back up without root. Amy help?

    When you fastboot flash, make sure you flash the slot you're booting from. If you're feeling lazy, flash the patched boot.img into both slots
    Code:
    fastboot flash boot --slot all boot.img
    3
    Actually I'm on October update, with unlock bootloader and root with Magisk Canary, how can I update to November update? If someone can explain clearly, I'm little afraid with out TWRP...

    Hello,

    You could do easily.
    - First check the channel update in magisk. Change to beta (beta works well know for patching boot.img)
    - Update the manager, update magisk by direct install, update modules if needed --> reboot
    (it's better to limit risk of a bootloop)
    - After reboot, open magisk manager and uninstall magisk --> Restore images.
    - Know you could going to settings --> system --> advanced --> update (you will see the november update)
    - Update --- (wait wait wait) and reboot (it's actually impossible to keep root by reflashing from magisk before reboot), after this you have lost root when reboot

    - Download the last sunfish for pixel 4a from --> https://developers.google.com/android/images#sunfish
    (don't accept any other sources about boot.img) check that the version is the same as the one you just updated.
    - Extract boot.img from zip inside the zip archive -> transfert on phone (delete any old boot.img or patched on the phone, to avoid a mistake)
    - In magisk manager --> install magisk --> select and patch a file, choose the boot.img.
    - transfert the new makisk_patched.img on computer in adb folder for example(look the size, it must be the same as the original file)
    - power off phone
    - Boot into fastboot by holding Power + Vol Down
    - plug phone and open adb
    Code:
    d:\platform-tools>fastboot flash boot magisk_patched.img
    Sending 'boot_b' (65536 KB)                        OKAY [  1.629s]
    Writing 'boot_b'                                   OKAY [  0.294s]
    Finished. Total time: 2.265s
    
    d:\platform-tools>fastboot reboot
    Rebooting                                          OKAY [  0.044s]
    Finished. Total time: 0.052s

    That's all, your are re-rooted after update.
    2
    How do you correctly update magisk on Pixel4a since patching boot.img and stuff. What are the steps ?
    2
    i was trying to create a patched boot.img but the file always ends up being about half the size of the original file and when i flash it i cant boot any longer.

    Is there a specific version/combination of softwares that i need to produce a valid patched boot image? im currently using magisk manager 8.0.3 and 11.0.0 (RQ1A.201205.008, Dec 2020)

    EDIT: got it sorted out, as many stated before i needed to use the Canary Magisk apk to make it work. it was not so obvious where to get and the provided links are not working. In case anyone is looking for the link its on the github page in the readme
    1608385790142.png