Hey what's up everybody it's Dallas with Gadget Hacks.
And today I'm gonna show you how to root the Pixel 4a.
Now to me, the Pixel 4a is THE phone to buy if you want to root.
And that's really for 2 reasons: It has an unlockable bootloader, and it only costs $350
So you can play things loose and fast with root, because you can brick it and buy a new
one and you still won't be paying as much as a single OnePlus 8, for example.
So congratulations on a smart value buy.
That being said, let's get to it.
First, you WILL need a computer to do this.
Windows, Mac, or Linux will work.
Second, you're gonna lose any data that isn't backed up.
Not from the root process, but from unlocking the bootloader, which is required to be able
to root the device using current methods.
So if you're just taking the phone out of the box and you want to be rooted from day
1, I wouldn't bother setting it all up.
Just hit "Skip" a bunch of times in the initial setup process, don't add any accounts, and
get to the main home screen as fast as you can.
But if you've already done all that, no biggie.
Just make sure important stuff is backed up somewhere.
Now comes the first step: Enabling developer options.
So open the main Android Settings menu.
You can find it in the app drawer or you can just do this.
Now, scroll all the way down to the bottom... and the second to the last thing here is "About
phone."
Go in there, then scroll down to the bottom, and at the end of the list you have your Android
build number.
Go ahead and tap this 7 times in quick succession to unlock the hidden Developer options menu.
You may have to enter your lock screen PIN or password, but when you do, a little toast
message at the bottom will confirm you unlocked Dev options.
So back out to the main Settings screen... and this time, go to "System"... then "Advanced"...
and then "Developer options" is right there.
Now right up here towards the top, looks like about the 6th thing down, is the one setting
you need to change before you can unlock the bootloader.
Just turn on the switch next to "OEM Unlocking," then hit "Enable" on the popup.
Again, you may need to enter your PIN.
Now you'll need to put the phone into bootloader mode so you can send the fastboot command
that will unlock the bootloader.
A super easy way to do that is to reboot the phone... then press and hold the volume down
button right after the screen goes black.
Once you're on that screen, leave the phone like it is and just hook it up to your computer
with a USB data cable.
On your computer now, go to developer.android.com/studio/releases/platform-tools
Once you're there, click the link for your computer's respective operating system
and tick this box to agree to the terms, then hit the download button.
It's a pretty small file, so it should only take a second.
Once it's done, go to your computer's Downloads folder to find the ZIP file.
Now you don't have to put this anywhere in particular, but you do want it handy.
So extract the ZIP to a folder you can access easily.
Doesn't matter if you're on Linux or Mac or Windows, there should be an option for extracting
the ZIP when you right-click the file.
Me, I'm just gonna put that platform-tools folder on my desktop for easy access.
Now, it's time to open a command prompt.
If you're on Windows, you can press the Windows button on your keyboard, then type "cmd" and
hit enter.
If you're on Mac or Linux, just open the Terminal app from your Applications folder.
Now don't be intimidated by this little window.
You won't have to type much because I have a little shortcut for you.
Start by typing the lowercase letters "c" and "d," then adding a space.
So it should say "cd "
Now, remember that platform-tools folder you kept handy?
Just drag it from wherever it is and drop it right on top of the command prompt window.
This will populate the full folder path of those platform-tools, so when it says "cd
," you can go ahead and hit enter.
Now you're ready to send the fastboot command that will initiate the bootloader unlocking
process.
Type "fastboot" that's all one word, then space, then "flashing," then space, then "unlock."
Now as long as your phone's still in bootloader mode and it's hooked up to this computer with
a USB data cable, you can go ahead and press enter.
But the thing is, if you get an error like I just got, you'll have to modify that command
slightly.
So type a period, then a slash, then the word "fastboot."
Dot slash fastboot.
Then add a space, type "flashing," add another space, and type "unlock."
Basically the same exact command, but with a dot slash at the beginning.
And again, that's only for people who got an error without those.
But when you hit "enter" after getting the command right, your phone will change from
the generic bootloader screen to this one asking if you want to UNLOCK the bootloader.
Press the volume down button and the first line of text will change to say "Unlock the
bootloader."
Now just press the power button to confirm your choice.
The screen will go black for a little bit and you'll eventually get kicked back out
to the main bootloader menu.
But this time, you can see it says "Unlocked" in red text.
To boot back up, all you have to do is make sure "Start" is highlighted and press the
power button.
It'll take a little longer than normal and you'll see a little warning screen from now
on, but when it finishes booting, take your time to actually go through initial Android
setup, because you won't lose any data going forward.
On your phone now, go to developers.google.com/android/images
This is the official site where you can download firmware for any Pixel or Nexus device.
Here, you'll wanna scroll down to the "Sunfish for Pixel 4a" section.
Now, tap the "Link" next to the version that matches that Build Number in Settings –> About
Phone from earlier.
This file is pretty big, so it'll take a while to download.
When it's done, head to your app drawer and open the "Files" app.
From here, open the hamburger menu and go to "Downloads," then you should see the firmware
package you just got from Google.
Tap the file to open the ZIP, then tap the folder you'll see inside of that.
Here, find the "image-sunfish" file and long-press it, then tap the 3-dot menu button in the
top right corner and choose "Extract to."
It should automatically select the Download folder by default, so I'd just leave it there
and press "Extract."
Now, go back twice to get to the Download folder again.
Here, open the "Image-sunfish" ZIP you just extracted from the parent archive.
Inside this one, one of the files you'll find is "boot.img."
Long-press it, then hit the menu button, and choose "Extract to" from the list.
Finally, make sure you're in the Downloads folder and go ahead and hit the "Extract"
button at the bottom.
Next, you'll need to install the Magisk Manager app.
If you'd like, you can go to the full written tutorial linked out in the description of
this video and download it from there.
Or you can just google "Magisk manager github" and head to the "Releases" page in developer
Top John Wu's github.
Scroll down to find the most recent Magisk Manager release — again, not Magisk, but
Magisk Manager, then tap "assets" beneath it and download the first APK file it shows
there.
You'll have to hit "OK" on this little message in Chrome, but then you can just open your
notification tray and tap the "Download complete" notification for the Magisk Manager APK.
This will prompt you to give Chrome permission to install other apps if you haven't already.
So press "Settings," then enable the switch next to "Allow from this source" and go back.
Now there will be an "Install" button on that popup.
Go ahead and hit it... and when it's done there, tap "Open."
Here, where it says "Magisk is not installed" towards the top, go ahead and tap "Install."
Confirm your choice by hitting "Install" again, then choose "Select and Patch a File."
Tap "Allow" to give Magisk access to your storage, then head to your Download folder
in the file picker app and select that "boot dot IMG" file you extracted earlier.
Magisk will show you this "Flashing" screen, but what it's really doing is patching the
stock boot image that you downloaded directly from Google.
It'll add some code, and the modified boot image will allow root access.
So when you see this screen say "All done" at the bottom, what you'll need to do is move
that patched boot image that Magisk created from your phone over to your computer.
Safest way to do that is with the USB data cable, but you can also just upload it to
Google Drive and redownload on the computer side.
The file itself should be in your phone's Download folder and it will be called "magisk_patched.img."
However you want, just get that file over to your computer.
Once it's there, boot your phone into bootloader mode again by hitting restart, then pressing
and holding volume down.
Again, when it's on this menu, go ahead and hook it up to your computer with a USB data
cable.
Alright, now we're in the home stretch.
If you still have the command window open from when you unlocked the bootloader, you
don't need to change directories again.
But just in case, remember all you have to do is type cd, add a space, then drag and
drop the platform-tools folder into the command window and press enter.
Once it's operating out of the right directory, think back to what worked for you when you
unlocked the bootloader.
If you had to add a dot slash to the beginning of that command, you'll have to do that for
these next commands.
If you didn't need to do that, you won't have to do it now.
But me, yeah I had to add the dot slash.
So I'll type:
dot slash fastboot, space, flash, space, boot, space
But don't hit enter just yet.
What you've done here is write out half of the command that will flash the modified boot
image that Magisk created and give your phone root access.
The part you're missing is the full file path for that magisk_patched image.
So however you got that file over here to your computer, just find it in your file browser.
Drag and drop it on the command window to populate the full path, THEN you can go ahead
and hit enter.
Congrats!
You just rooted your phone.
Now type dot slash fastboot space reboot, then hit enter, and your phone will boot back
into Android.
You can go ahead and unplug it if you want.
Now, all that's left to do is to verify root.
Open the Magisk Manager app, and now the two status messages at the top should say "Magisk
is up to date" and "Magisk manager is up to date."
That means you're golden.
Go ahead and install a root app, and when it runs for the first time, Magisk will pop
up asking if you want to give the app root access.
Tap "Grant" and you'll be off and running.
But I know this was a lot to absorb from one video, so if you'd rather follow along at
your own pace, be sure to check out the written guide at the link in the description below.
And as always, we'd appreciate it if you would like and comment on this video and subscribe
to our channel.
So we'll see you again next time, folks, but until then...
Happy gadget hacking.