How to Root a Google Pixel 8a
Published:
Google Pixel 8a (Android version 14) is rootable using Magisk by patching init_boot.img and flashing the patched image file to Pixel 8a.
0. Preparation
adb
is required for Android app development (see details in Section 3).fastboot
is needed to unlock the device bootloader and flash it with a new system image (see details in Section 3).- Download factory image from Images: Click on corresponding
Link
based on your build number on your phone. - Extract
init_boot.img
from the downloaded zip file. Save and remember this file. - Download Magisk-v27.0.apk
1. Enable Developer Options
Go to: Settings > About phone > Tap on “Build number” for 7 times to enable Developer Options
.
2. Enable OEM Unlocking and USB Debugging
Go to: Settings > System > Developer options > Enable OEM unlocking
and USB debugging
.
3. Setup adb and fastboot
- Go to Tools, and download
platform-tools
(it’s a folder namedplatform-tools
, including tools like adb, fastboot). - Set environment variables (optional):
- Open a terminal on Mac;
- Type
sudo nano ~/.zshrc
; - Type
export PATH=$PATH:/Users/xxx/.../platform-tools
to the last line; - Ctrl + o to write out;
- Ctrl + x to exit;
- Type
source ~/.zshrc
on the terminal; - Check the availability of adb and fastboot:
adb --version
andfastboot --version
. If the version number are showed, then you are good with adb and fastboot.
4. Unlock The Bootloader
- Reboot into the bootloader:
adb reboot bootloader
. - Unlock the bootloader:
fastboot flashing unlock
. - Reboot:
fastboot reboot
.
5. Re-Enable The Developer Options
- Tap on
Build number
for 7 times - Enable
Usb-debugging
. OEM unlocking
should state: Bootloader is already unlocked. If not, go back to previous steps to double check those details.
6. Transfer init_boot.img from Mac to Phone
- Open a terminal on Mac.
adb devices
to check if the phone is connected to the Mac.adb push <init_boot>.img /sdcard/Download/
.- To check the transfer, use
adb shell
to access the directory of the phone, and then direct to/sdcard/Download/
to check. exit
to exit adb shell.
7. Transfer The Magisk from Mac to Pixel 8a and Installation
adb push /PATH/TO/YOUR/Magisk-xx.apk /sdcard/Download
.- Find the transferred Magisk.xx.apk in the app Files and tap on it, it will be installed on the phone.
8. Patch The init_boot.img
- Open the Magisk app.
- Select Magis install and
Select and Patch a File
. - Select the init_boot.img and then click on
LET'S GO
.
9. Transfer The patched init_boot.img Back to Mac
adb pull <patched_init_boot_image>.img /PATH/ON/YOUR/MAC
10. Flash Patched Image
adb reboot bootloader
.fastboot flash init_boot <patched_init_boot_image>.img
(notfastboot flash boot <patched_init_boot_image>.img
).fastboot reboot
.
11. Verification
Download app named Root Check
(since Root Checker is not available in Android 14).
12. Troubles and Solutions
- If you want to restart the process or have no idea what is going wrong, go to FactoryReset: Click on the corresponding
Flash
to factory reset your phone based on your build number on your phone. - Remember it’s
init_boot.img
, rather thanboot.img
.