[Google Pixel 4a Guides, News, & Discussion] Zackptg5:
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: