[Google Pixel 3a Guides, News, & Discussion] pbanj:
[Guide] How to root the Pixel 3a with or without twrp & take OTA updates once rooted

THIS IS A DRAMA FREE THREAD, I'M NOT GOING TO BASH OTHERS THREADS, NOR AM I GOING TO GO AROUND TO THOSE THREADS AND BASH THEM IN IT BECAUSE I SOMEHOW FEEL SUPERIOR TO THEM.

Standard you do this at your own risk and I'm not responsible for anything warning.

There are a few ways you can go about rooting. You can either use twrp, manually patch the stock boot image and flash it, or just flash a pre-patched boot image. I'll be going over all three, but keep in mind i have depreciated the pre-patched method now that we have twrp. twrp is dead on 10

Do these first if you haven't already:

Update your fastboot and adb

I just toss these 4 highlighted files into the windows folder, but you may have a different set up(I put them in the windows folder so I don't have to add them to PATH.)

Googles USB driver if you need it

right click the start menu icon, click device manager, then locate your phone(should have a yellow symbol on it, right click it, then click update driver, then click browse my computer, click the browse button and then navigate to where you extracted the drivers, click the main folder(usb_driver) and then click ok, then click next and ok through any prompts.

CMD = Command Prompt

Unlocking your bootloader:

This wipes your phone

Run through the initial setup if you haven't already, if you haven't don't bother logging into your google account.

Enable dev options(settings>about phone>build number>tap it 7 times).

Go into settings>system>advanced>dev options>oem unlocking, click the toggle.

While still in dev options scroll down a little and enable usb debugging.

Plug your phone into your pc.

if/when the phone asks you to trust the computer make sure to check the "always allow this computer" check box.

Open up command prompt(powershell works to but i always use command prompt) type into the cmd window

adb reboot bootloader

The phone will reboot into fastboot mode.

Now type into the cmd window

fastboot devices

See if it lists a device, if not you need to install the drivers I linked to. If you had to install the drivers try the fastboot devices command again after installing them, it should list the device now.

type in

fastboot flashing unlock

You will then have to use the phone to select yes to the unlock. you use the volume keys to select and the power button to confirm.

Your bootloader is now unlocked and you follow one of the below root methods.

Onto the root methods:

these are for stock phones, not ones using a custom kernel

IF ON Q YOU MUST USE MAGISK 19.4+

Grab your boot.img from here

it's inside the zip that is inside the folder in the main zip you download

patching and flashing the stock boot.img:

This is the only way to root on android 10+ as twrp doesnt work

Reboot your phone.

Run through the initial setup again, this time you can log into your google account and set the phone up how you want. Re-enable dev options, enable adb, and turn off auto updates.

Grab the stock boot.img for your matching build(from the link above).

Put the boot.img on your phone, location doesn't really matter, as long as you know where you put it.

Download and install Magisk Manager.

Open up magisk manager and click install, then select the "Select and Patch a File" option, let it do its thing.

Move the patched image from your phone to your pc(magisk stores the patched image in your downloads folder).

Open up a cmd window and type in

adb reboot bootloader

if/when the phone asks you to trust the computer make sure to check the "always allow this computer" check box.

Once you are in the bootloader(fastboot) type in

fastboot getvar current-slot

This will tell you the currently active slot of your phone, remember it.

Now to flash your patched boot.img.

- If the cmd window location does not match the location of the boot.img you will have to enter that too.

- If you're on windows 10(this only works on English as far as i know) you can use my Tools Menu it will give you some handy options in your right click context menu. It makes things a lot easier as you can just right click in the location of the boot.img and open a cmd window there.

- If your cmd window is opened in the same location as the boot image you can just do(don't include the ")

fastboot flash boot_"slot "whatever the boot.img is named"

- If your cmd window was not opened in the same location as the boot image you will need to do one of these.

cd C:\Users\pbanj\Desktop\android

the cd command changes the current directory to where you tell it. then you can just do

fastboot flash boot_"slot" "whatever the boot.img is named"

- Or you can type out the location to the boot.img or just drag the boot.img file onto the cmd window. example:

fastboot flash boot_"slot" C:\Users\pbanj\Desktop\boot.img

Once that's done flashing just type in

fastboot reboot

MAKE SURE YOU GO INTO DEV OPTIONS AND TURN OFF AUTO UPDATES.

You should use the twrp method over this next one. I'll no longer be adding updated pre-patched boot images as they're completely pointless now that we have twrp.

Do NOT use this method, it's here just for history sake

Method 3 booting a prepatched boot.img and direct installing Magisk:

This gets you rooted a bit faster. thanks to @Uzephi for reminding me about this.

Grab the boot.img that matches your build number in about phone. These were made using the newest canary build of magisk at the time of adding them to the post. If I update them I'll mark them as updated. I used the canary builds for these as it's what I personally use

- PD2A.190115.029

- PD2A.190115.032 Updated to newest canary build as of May-28-2019

- PQ3B.190605.006 This is the June update Updated to the 19.4-c1602d25(19301) canary build

- PQ3B.190705.003 this is the July update

Save it somewhere and rename it if you want.

If not already in fastboot mode open up a command prompt window and type in

adb reboot bootloader

if/when the phone asks you to trust the computer make sure to check the "always allow this computer" check box.

Once you are in the bootloader(fastboot) type in

fastboot boot "whatever the boot.img is named".img

- If the cmd window location does not match the location of the boot.img you will have to enter that too.

- If you're on windows 10(this only works on English as far as i know) you can use my Tools Menu it will give you some handy options in your right click context menu. It makes things a lot easier as you can just right click in the location of the boot.img and open a cmd window there.

- If your cmd window is opened in the same location as the boot img you can just do(don't include the ")

fastboot boot "whatever the boot.img is named".img

- If your cmd window was not opened in the same location as the boot image you will need to do one of these.

cd C:\Users\pbanj\Desktop\android

the cd command changes the current directory to where you tell it. then you can just do

fastboot boot "whatever the boot.img is named".img

- Or you can type out the location to the boot.img or just drag the boot.img file onto the cmd window. example:

fastboot boot C:\Users\pbanj\Desktop\android\boot.img

Once booted run through the initial setup again(if you haven't already after unlocking the bootloader), this time you can log into your google account and set the phone up how you want.

MAKE SURE YOU GO INTO DEV OPTIONS AND TURN OFF AUTO UPDATES.

After you've run through the initial setup(if you had to) open up Magisk Manager(it will most likely say the manager needs to be installed as it is currently only a stub) and then click on the top install option, then click install in the popup that comes up, then click the direct install option.

After it finishes click reboot and you're good to go

UPDATING

There are a couple methods of updating.

Uninstall the edge sense plus mod before you update or you won't be able to root again/you'll end up in a bootloop and will have to enter safemode to disable it.

WHEN UPDATING TO ANDROID 11 DISABLE ALL MAGISK MODS AND REBOOT ONCE BEFORE UPDATING.

If you're using any custom kernel you'll have to flash the stock boot.img first before updating for the sideload method. The magisk method it might not matter but I'm not 100% sure on that. I'd think it'd be fine if you had magisk backup the stock image before you flashed the custom kernel, I don't use one so I cant be 100% sure though.

magisk has removed the ota method for pixel devices so these are the ways to update now.

My personal favorite way to update is to use the full system image as it's fastest. Disable any custom themes or modules that are known to cause bootloops when updating. Then:

grab the system image from here, unzip the folder and inside of it you will find another zip. open that up and pull the boot.img out.

Use magisk manager on your phone to patch that and then take the patched image and rename it to boot.img and put it back in the zip you pulled the stock one from.

Open the "flash-all.bat or .sh if on linux" and remove the -w from the end(this is important as it stops your device from being wiped) save the bat file.

put your phone into fastboot mode and run the flash-all script. should take about 5 min and then your phone will reboot and you are good to go.

I made a telegram group where I'll be posting the system images ready to flash. I typically make them within a few days of the update coming out. https://t.me/joinchat/EC3ivRhc2-t4y1J4REtuqg

Alternative Update method

Grab the OTA update from here.

Reboot the phone into recovery, you can just use

adb reboot recovery

Once in recovery press power and up and you should see the options.

Go down to apply update from adb(use the volume keys to change options and the power button to select).

Open a cmd window if you haven't already and type in

adb sideload "ota update file"

Location matters just like it did during the initial flashing, if you didn't open the cmd window in the same location as the update file andyou don't remember what to do, just take a look at one of the root methods as they tell you how to go about fixing that. Or just type in "adb sideload" and then drag the update file onto the cmd window.

After the ota is done select the "reboot to bootloader option".

Once in the bootloader(fastboot) just flash the pre-patched boot.img like you did before. remember the slot changes with each update so make sure you get the current slot, or if you remember what slot it was using before the update just switch input the other one. so if it was on slot a you would flash the patched image to b and vise versa.

BOOT IMAGES:

This is a google drive folder, it will have both stock and patched images. I also provide the newest Magisk manager These are zip files, you must unzip them to use them.

- https://drive.google.com/drive/folders/1wH7pvsHYznbDJ_vTsb_dWBNJBDcx2wHx?usp=sharing

Pass Safetynet

Open Magisk & go into its settings

Scroll down to the "Magisk" category and turn "Zygisk (beta)" on, & "Enforce DenyList" on.

Tap on "Configure DenyList"

Then tap the 3 dot menu and check "show system apps"

Add "google play services", google play store", "google pay", and any of your banking apps or apps that ***** about root.

Reboot

Install Universal Safetynet Fix and reboot

Install Yasnac from the Play Store

Open Yasnac and tap "run SafetyNet attestation" you should get pass on both basic and CTS.

How to use Netflix

Grab the newest apk from here.

Install the apk.

Add the apk to your Magisk DenyList.

if you need help you can ask here in the thread or in the Telegram group