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

Search This thread

Typhus_

Senior Member
Hello I am in Android 12. I have rooted the phone following the instructions.
But when using a root epxlorer it says that SYSTEM partition is mounted as RW but I cannot delete anything.
Also when using adway it cannot write "hosts" in SYSTEM.

The Magisk promp showed up and I selected "Grant" as always.

And the magisk app it shows normal as usually when a phone is rooted. Why cannot do anything in "SYSTEM"?

Thanks
You must mount system as read write. Use other explorer. I use FX File Explorer (to me is one of the best).

Cheers!
 

dari-woka

Senior Member
Jan 30, 2011
248
55
You must mount system as read write. Use other explorer. I use FX File Explorer (to me is one of the best).

Cheers!
Nothing, same problem, cannot mount system as R/W, it gives me an error "The item system is read-only" when I try mounting it as RW.

I have to say that always I have been using root explorer, miexplorer or anything else to delete from system and no problem mounting it as R/W

And in Magisk I can see that the app is inside the "superuser" menu with root access granted as normal
 

Typhus_

Senior Member
Nothing, same problem, cannot mount system as R/W, it gives me an error "The item system is read-only" when I try mounting it as RW.

I have to say that always I have been using root explorer, miexplorer or anything else to delete from system and no problem mounting it as R/W

And in Magisk I can see that the app is inside the "superuser" menu with root access granted as normal
system_ext and product partitions cannot be mounted as rw. Don't know if your trying something there...system partition is able to be mounted.

Anyway, you could always just use simple magisk modules to add/replace/remove stuff wherever you want (that's what I do).

Cheers!
 

dari-woka

Senior Member
Jan 30, 2011
248
55
system_ext and product partitions cannot be mounted as rw. Don't know if your trying something there...system partition is able to be mounted.

Anyway, you could always just use simple magisk modules to add/replace/remove stuff wherever you want (that's what I do).

Cheers!
I am trying the system/app to delete crap inside as I always do...

Also because I want to use adaway so it has to update the hosts file and it cannot do it.
So frustating.

By the way, I dont have TWRP, only the root thru Magisk, I dont know if it has something to do with the problem
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,083
5,965
Sydney
I am trying the system/app to delete crap inside as I always do...

Also because I want to use adaway so it has to update the hosts file and it cannot do it.
So frustating.

By the way, I dont have TWRP, only the root thru Magisk, I dont know if it has something to do with the problem
To remove system apps, you can Hibernate, freeze &/or Hide them. OR remove them using Magisk. All these options can be done using TeMeFI

As for adaway, you need to use systemless hosts (ie a Magisk module). Turn it on in Magisk.
 
  • Like
Reactions: Typhus_

dari-woka

Senior Member
Jan 30, 2011
248
55
To remove system apps, you can Hibernate, freeze &/or Hide them. OR remove them using Magisk. All these options can be done using TeMeFI

As for adaway, you need to use systemless hosts (ie a Magisk module). Turn it on in Magisk.
ok, besides whatever I wanted to do with system, I dont want another solution, I just want to know if I can be able to edit system as I was doing in Android 11 in my last phone?

I dont need other ways to hide apps...

Thanks
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,083
5,965
Sydney
ok, besides whatever I wanted to do with system, I dont want another solution, I just want to know if I can be able to edit system as I was doing in Android 11 in my last phone?

I dont need other ways to hide apps...

Thanks
I dont know your specific phone. However, newer devices (such as the Pixel 4a) have read-only system partitions, which means you cannot do the same as what you use to do (possibly on anotehr device, as P4A A11 is read-only). ie you have to find new method) to do what you use to do. Only you know your device(s), and should investigate what is possible on that sppecific device / ROM. On a Pixel 4a ,the system is R/O (I have a Pixel 4A running a rooted stock A11)
 

dari-woka

Senior Member
Jan 30, 2011
248
55
I dont know your specific phone. However, newer devices (such as the Pixel 4a) have read-only system partitions, which means you cannot do the same as what you use to do (possibly on anotehr device, as P4A A11 is read-only). ie you have to find new method) to do what you use to do. Only you know your device(s), and should investigate what is possible on that sppecific device / ROM. On a Pixel 4a ,the system is R/O (I have a Pixel 4A running a rooted stock A11)
Yes, it's pixel 4a on Android 12 (with root) posted it few post before.
Ok, I didn't know it's read only, how come? Why do we cannot write on system anymore even having root?
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,083
5,965
Sydney
Yes, it's pixel 4a on Android 12 (with root) posted it few post before.
Ok, I didn't know it's read only, how come? Why do we cannot write on system anymore even having root?
You cannot expect everyone to read all your historical posts. My bad in that I got half way through answering, before it dawned on me i was in a Pixel 4a thread.

As to why it has changed, that question is an Android universe design decision. Generally speaking, it makes for a significantly more stable and reliable OS. Its a non-modifiable base OS. If I made something aas complex as Android, I would not want every tom, **** & harry breaking it. Or even more-so someone accidentally breaking it. PS: pixel 4A running Stock A11, is also 100% non-writable system partition. Its not A12 specific.
 
Last edited:

frank93

Senior Member
Oct 16, 2010
117
40
Berlin
Google Pixel 4a
Has anyone tried Magisk 24 yet?
works for me, yes. pixel 4a, magisk 24. note that magisk "internal update" crashed for me, i suppose it had something to do with the "hide app" mechanism (the feature where magisk app renames/disguises itself), but after a "clean" uninstall of v23 and then installing v24 (apk), the magisk-update to v24 was offered. running smoothly since the last few hours now.

haven’t tried zygisk yet though, still "classic" mode. :)
 
  • Like
Reactions: LuChaos

noimjosh

Member
Mar 3, 2009
27
37
Has anyone had success rooting after applying the January 2022 Android 12 security patch (BUILD SQ1A.220105.002)?

I've tried Magisk 23.0, Magisk 24.0, Magisk 24.1 and the latest two versions of Magisk Canary and my phone won't boot with the patched image.
 

stereo007

Member
Sep 25, 2013
47
10
Has anyone had success rooting after applying the January 2022 Android 12 security patch (BUILD SQ1A.220105.002)?

I've tried Magisk 23.0, Magisk 24.0, Magisk 24.1 and the latest two versions of Magisk Canary and my phone won't boot with the patched image.
Yes it works for me on SQ1A.220105.002 with v24, without any problems.

Screenshot_20220129-001155.png
Screenshot_20220129-001434.png
 
Last edited:

a1291762

Senior Member
Nov 20, 2012
734
316
yasmar.net
Has anyone had success rooting after applying the January 2022 Android 12 security patch (BUILD SQ1A.220105.002)?

I've tried Magisk 23.0, Magisk 24.0, Magisk 24.1 and the latest two versions of Magisk Canary and my phone won't boot with the patched image.
Are you creating that patched image yourself? ie. Upload the boot.img to the phone, use magisk to patch the image, download the patched image and then use fastboot to flash or boot the patched image.

I fastboot boot the image and then get Magisk to install (direct) rather than using fastboot to flash but it shouldn't be any different in theory.

I was running Magisk 23 when the Jan patch came out and it was fine. I was just prompted to upgrade to 24.1 and it's still fine.
 

noimjosh

Member
Mar 3, 2009
27
37
Are you creating that patched image yourself? ie. Upload the boot.img to the phone, use magisk to patch the image, download the patched image and then use fastboot to flash or boot the patched image.

I fastboot boot the image and then get Magisk to install (direct) rather than using fastboot to flash but it shouldn't be any different in theory.

I was running Magisk 23 when the Jan patch came out and it was fine. I was just prompted to upgrade to 24.1 and it's still fine.
I am patching myself, but I can't seem to get it to work. I probably will have to do a data wipe and try again, I'm just not ready to do that yet
 

a1291762

Senior Member
Nov 20, 2012
734
316
yasmar.net
I can't seem to get it to work. I probably will have to do a data wipe and try again, I'm just not ready to do that yet
Oh, There's maybe a conflicting module?

Try to disable them all before upgrade or do the safe mode thing... Might help?

I ran into this problem when upgrading to Android 11 but I don't use many modules these days.
 

noimjosh

Member
Mar 3, 2009
27
37
Oh, There's maybe a conflicting module?

Try to disable them all before upgrade or do the safe mode thing... Might help?

I ran into this problem when upgrading to Android 11 but I don't use many modules these days.
I've already upgraded to Android 12

After installing the patched boot.img, my 4a sits on the G screen with the loading bar below it. It is accessible via ADB, and I have run
Code:
magisk --remove-modules

I also couldn't get the phone to boot into safe mode 🙁

It's boots just fine using the unpatched boot.img
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Replacement 4a has been rooted. I even figured out how to make my own Magisk module to replace the obnoxious thumping touch sound with something more unobtrusive.
    1
    I bought a refurbished unlocked Pixel 4a from Amazon and wanted to root it, but the "OEM Unlocking" toggle was greyed out. I did a factory reset and tried again, but it still didn't work. I even tried booting up with my existing phone's SIM card... still no luck.

    Does this mean the one I was sent is in fact a Verizon version whose bootloader cannot be unlocked? If so, is there any way to tell whether you're getting a Verizon one, or is it just the luck of the draw?

    EDIT: I chatted with Google's support, and they were able to confirm — via the IMEI — that it was indeed a Verizon-tainted model. I'm sending it back to the Amazon seller, and I ordered one on eBay that has "unlocked bootloader" in the item description.
    1
    I got a 4A, rooted, installed Magisk, etc, everything worked perfectly.
    Thank you so much for providing this information and the tools.
  • 33
    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
    It works for me:
    Magisk 23.0 stable
    Riru v 26.1.3.r513...
    Universal Safetynet Fix v2.1.2
    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
    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