[Guide] How to root the Pixel 3a with or without twrp & take OTA updates once rooted

pbanj

Senior Member
Dec 22, 2011
953
445
63
[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
  1. Run through the initial setup if you haven't already, if you haven't don't bother logging into your google account.
  2. Enable dev options(settings>about phone>build number>tap it 7 times).
  3. Go into settings>system>advanced>dev options>oem unlocking, click the toggle.
  4. While still in dev options scroll down a little and enable usb debugging.
  5. 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.
  6. Open up command prompt(powershell works to but i always use command prompt) type into the cmd window
  7. Code:
    adb reboot bootloader
    The phone will reboot into fastboot mode.
  8. Now type into the cmd window
    Code:
    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.
  9. type in
    Code:
    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

  1. Reboot your phone.
  2. 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.
  3. Grab the stock boot.img for your matching build(from the link above).
  4. Put the boot.img on your phone, location doesn't really matter, as long as you know where you put it.
  5. Download and install Magisk Manager.
  6. Open up magisk manager and click install, then select the "Select and Patch a File" option, let it do its thing.
  7. Move the patched image from your phone to your pc(magisk stores the patched image in your downloads folder).
  8. Open up a cmd window and type in
    Code:
    adb reboot bootloader
    if/when the phone asks you to trust the computer make sure to check the "always allow this computer" check box.
  9. Once you are in the bootloader(fastboot) type in
    Code:
    fastboot getvar current-slot
    This will tell you the currently active slot of your phone, remember it.
  10. 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 ")
    Code:
    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.
    Code:
    cd C:\Users\pbanj\Desktop\android
    the cd command changes the current directory to where you tell it. then you can just do
    Code:
    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:
    Code:
    fastboot flash boot_"slot" C:\Users\pbanj\Desktop\boot.img
  11. Once that's done flashing just type in
    Code:
    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.
  1. 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.
  2. If not already in fastboot mode open up a command prompt window and type in
    Code:
    adb reboot bootloader
    if/when the phone asks you to trust the computer make sure to check the "always allow this computer" check box.
  3. Once you are in the bootloader(fastboot) type in
    Code:
    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 ")
    Code:
    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.
    Code:
    cd C:\Users\pbanj\Desktop\android
    the cd command changes the current directory to where you tell it. then you can just do
    Code:
    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:
    Code:
    fastboot boot C:\Users\pbanj\Desktop\android\boot.img
  4. 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.
  5. 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.



  6. 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:
  1. 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.
  2. 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.
  3. 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.
  4. 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

  1. Grab the OTA update from here.
  2. Reboot the phone into recovery, you can just use
    Code:
    adb reboot recovery
  3. Once in recovery press power and up and you should see the options.
  4. Go down to apply update from adb(use the volume keys to change options and the power button to select).
  5. Open a cmd window if you haven't already and type in
    Code:
    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.
  6. After the ota is done select the "reboot to bootloader option".
  7. 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

Ways to get pay to work
Completely automated way:
  • Install this Magisk mod, it can also be found in the Magisk Manager by searching "sql" it is named "SQLite for ARM aarch64 devices"
  • Reboot. This step might not be needed, but it's how I did it when figuring everything out.
  • Grab this file
  • Use your favorite root explorer and place it in /data/adb/service.d/
  • Set the perms for the gpay file to rwxr-xr-x(755) owner and group should be "root" if they're not already.
  • Reboot
That's it, you never have to worry about it again. service.d is where Magisk loads scripts from, so magisk will handle everything for you. Thanks to the people who helped me figure the script out, I forgot their names.

- SEMI-AUTO/AUTO METHOD
- MANUAL METHOD.

How to use Netflix
  1. Grab the newest apk from here.
  2. Install the apk.
  3. Add the apk to your Magisk Hide list.

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

jmtjr278

Senior Member
Mar 8, 2012
1,005
550
143
So I figured I would make a single thread out of the posts I've made. I made prepatched boot.img files to save everyone time.

I assume everyone here knows you need an unlocked bootloader and how to flash them.

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



Update your fastboot and adb

Googles USB driver if you need it



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 this thread.



pd2a.190115.029

pd2a.190115.032



Save them somewhere and rename it if you want. then flash



To get google pay to work you may have to do some tinkering(I had to). To get it working go into magisk hide, enable show system apps then make google play services, the play store and pay look like this







Now comes the fun part.



- Plug your phone into your pc

- Grab your root app of choice that allows you to freeze apps

- Freeze google play services this will make your phone pissed and you will get a bunch of notifications, ignore them for now

- Open your favorite command line utility and do
Code:
adb shell
then
Code:
su
grant it root on your phone.

- Then while still in adb shell enter
Code:
rm -rf /data/data/com.google.android.gms
- Go into settings, then apps

- Clear the data of pay, and the play store

- Click disable on the playstore and then yes to restoring the factory version, reenable it

- Reboot your phone. It will ***** about lack of play services again, still ignore it.

- Reenable google play services

- Wait a min so it can do its thing

- Now you can add your cards to pay.
Dang, mine worked after I hid Google pay with magisk! That's an intensive process. I clicked hide them rebooted and added my amex without issue. Had to **** system apps to hide play store so I could download Netflix too.

Sent from my Pixel 3a using Tapatalk

---------- Post added at 04:58 PM ---------- Previous post was at 04:57 PM ----------

Dang, mine worked after I hid Google pay with magisk! That's an intensive process. I clicked hide them rebooted and added my amex without issue. Had to click system apps to hide play store so I could download Netflix too.

Sent from my Pixel 3a using Tapatalk
Almost forgot to mention, thanks for the patched image. Saved me some time

Sent from my Pixel 3a using Tapatalk
 
Last edited:
  • Like
Reactions: jnip and pbanj

pbanj

Senior Member
Dec 22, 2011
953
445
63
Dang, mine worked after I hid Google pay with magisk! That's an intensive process. I clicked hide them rebooted and added my amex without issue. Had to **** system apps to hide play store so I could download Netflix too.

Sent from my Pixel 3a using Tapatalk

---------- Post added at 04:58 PM ---------- Previous post was at 04:57 PM ----------

Almost forgot to mention, thanks for the patched image. Saved me some time

Sent from my Pixel 3a using Tapatalk
Ya I had them hid and it wouldn't let me add my cards. so I went oh it must have triggered before I hid them. So I did the old "clear all their data" trick and it still wouldn't let me do it. I was talking in my discord server and was told about how the play services remembers. They told me to do all the stuff I posted and then run that command from twrp. Well we dont have twrp yet so I was like **** am I screwed until then. then another one was like if you freeze the play services and then try the command it might work. So I did and it worked. wasted about an hour of my time lol.
 

jmtjr278

Senior Member
Mar 8, 2012
1,005
550
143
Ya I had them hid and it wouldn't let me add my cards. so I went oh it must have triggered before I hid them. So I did the old "clear all their data" trick and it still wouldn't let me do it. I was talking in my discord server and was told about how the play services remembers. They told me to do all the stuff I posted and then run that command from twrp. Well we dont have twrp yet so I was like **** am I screwed until then. then another one was like if you freeze the play services and then try the command it might work. So I did and it worked. wasted about an hour of my time lol.
The things we do to have fun! That's what I love though, seeing a problem and figuring out the solution. Android is the best. Teaches me things every day

Sent from my Pixel 3a using Tapatalk
 
  • Like
Reactions: 12paq and pbanj

razrlover

Senior Member
Mar 28, 2012
3,466
1,440
253
If they will allow you to unlock the bootloader yes. Otherwise no
I was surprised to find the oem unlock greyed out on T-Mobile.

It does come with the Unlock app for unlocking carrier restrictions but if i remember that didn't effect the bootloader.

Work around will hopefully be found. I will say that i found a audio mod and ad block without root have been good so far
 
  • Like
Reactions: caballon

pbanj

Senior Member
Dec 22, 2011
953
445
63
I was surprised to find the oem unlock greyed out on T-Mobile.

It does come with the Unlock app for unlocking carrier restrictions but if i remember that didn't effect the bootloader.

Work around will hopefully be found. I will say that i found a audio mod and ad block without root have been good so far
man that sucks. i would just return it and buy it from google. or hell even bestbuy will give you an unlocked one and let you add it to your tmobile account.
 

razrlover

Senior Member
Mar 28, 2012
3,466
1,440
253
man that sucks. i would just return it and buy it from google. or hell even bestbuy will give you an unlocked one and let you add it to your tmobile account.
Yeah i had already downloaded your boot.imgs. thanks for doing that for everyone.

I've been on a S9 for a while so I'm used to finding work arounds for no root. I will try to make it work for a while and see.
 
  • Like
Reactions: pbanj

havens1515

Member
Apr 5, 2011
26
12
23
I was surprised to find the oem unlock greyed out on T-Mobile.

It does come with the Unlock app for unlocking carrier restrictions but if i remember that didn't effect the bootloader.

Work around will hopefully be found. I will say that i found a audio mod and ad block without root have been good so far
I powered it on without a SIM card inserted (out of the box) and connected it to wifi and was able to enable OEM unlock.

If you do a factory reset and do the same (set it up without the SIM inserted) you should be able to as well.
 

razrlover

Senior Member
Mar 28, 2012
3,466
1,440
253
I powered it on without a SIM card inserted (out of the box) and connected it to wifi and was able to enable OEM unlock.

If you do a factory reset and do the same (set it up without the SIM inserted) you should be able to as well.
That's awesome!

A work around indeed! Appreciate it
 

gtuansdiamm

Senior Member
Nov 15, 2010
3,037
493
223
New York
I powered it on without a SIM card inserted (out of the box) and connected it to wifi and was able to enable OEM unlock.

If you do a factory reset and do the same (set it up without the SIM inserted) you should be able to as well.
still grayed out for me after factory reset with no sim
ill try it with a new phone as well

edit: also grayed out on my fresh out of the box phone as well
both from tmobile
 
Last edited:

alphahere

Senior Member
Nov 6, 2010
657
176
63
I powered it on without a SIM card inserted (out of the box) and connected it to wifi and was able to enable OEM unlock.

If you do a factory reset and do the same (set it up without the SIM inserted) you should be able to as well.
Did you actually unlock the bootloader?

Thanks
 

havens1515

Member
Apr 5, 2011
26
12
23
still grayed out for me after factory reset with no sim
ill try it with a new phone as well

edit: also grayed out on my fresh out of the box phone as well
both from tmobile
Did you connect to wifi? It was still grelayed out for me until I connected to wifi. Then went back one menu, and returned to developer options and it wasn't grayed out anymore

---------- Post added at 03:40 PM ---------- Previous post was at 03:39 PM ----------

Did you actually unlock the bootloader?

Thanks
Yes, I did. You need to connect to wifi first before it will allow you to enable OEM unlock.

---------- Post added at 03:43 PM ---------- Previous post was at 03:40 PM ----------

I thought that oem unlock was greyed until you inserted a sim and connected to a network. Seems like this is the way it's always been on pixels.
Yes, it's grayed out until you connect to a network, but that network doesn't have to come from a SIM card (at least not in my case) it can come from wifi
 
Last edited:

engMTW

Senior Member
May 11, 2018
107
257
0
I was surprised to find the oem unlock greyed out on T-Mobile.

It does come with the Unlock app for unlocking carrier restrictions but if i remember that didn't effect the bootloader.

Work around will hopefully be found. I will say that i found a audio mod and ad block without root have been good so far
When the device is paid off and unlocked (permanently, not a travel unlock) through the Unlock app, the OEM unlock option will no longer be grayed out. I can confirm it first hand and I'll add that this is how foreign carriers operate as well with regards to the Pixel.

The way that OEM unlocking works on *all* Pixels is through IMEI whitelisting. Factory Unlocked Pixels sold through Best Buy, Google Fi, Google Store and a few other retailers are whitelisted as being eligible for OEM unlocking. The option will be grayed out until the phone is connected to the internet so as to receive the eligibility state from Google.

Devices branded for T-Mobile are marked as ineligible, but T-Mobile (like virtually all carriers that sell the Pixel except for Verizon and NTT Docomo) updates the OEM Unlock eligibility flag at the same time they deem the device SIM unlock eligible. The device will check in with Google, receive the new eligibility state and unrestrict the OEM Unlock option.

The final bit of weirdness with the T-Mobile variant is how T-Mobile uses the Device Unlock app. Google has a custom SIM unlock solution for carriers that does not involve a carrier app or traditional unlock codes. It is similar to what the iPhone does & how OEM Unlock eligibility works - the carrier sends a request to Google for a phone associated with said carrier to be unlocked. Google processes the request, the phone checks in with Google and displays a notification stating that the SIM unlock was complete. For non Verizon/NTT Docomo carriers, that notification also means that you can now OEM Unlock.

T-Mobile doesn't use that functionality, for whatever reason, if there is even a reason. Maybe on account of Google not supporting temporary unlocks.

T-Mobile has long tied bootloader unlock eligibility to SIM unlock eligibility. You can buy a Moto whatever from T-Mobile, get denied a bootloader unlock code from Motorola's website, pay the device off and, boom, Moto changes their tune. The same is true with the OnePlus 6T and all current T-Mobile devices that have a sanctioned bootloader unlock mechanism.
 
Last edited:

darkmeridian

Member
Feb 16, 2011
42
5
8
Beware: My T-Mobile Pixel 3a Came With a SIM Card =(

My new-in-box T-Mobile Pixel 3a had a SIM card installed already. I booted it up, connected to wifi, and now I can't root it. =( Factory reset did not help.
 

jmtjr278

Senior Member
Mar 8, 2012
1,005
550
143
My new-in-box T-Mobile Pixel 3a had a SIM card installed already. I booted it up, connected to wifi, and now I can't root it. =( Factory reset did not help.
See above comment for a great explanation of why you can't unlock your TMobile carrier device.

Sent from my Pixel 3a using Tapatalk
 
  • Like
Reactions: engMTW