Notes for Rooting Google Pixel 8a
I made some notes while rooting my Google Pixel 8a and shared them here. Most parts are based on leland’s blog, which is worth reading.
1. Prerequisites
- Enable Developer Options:
- Go to
Settings
>About phone
- Tap Build number 7 times until developer mode is enabled
- Go to
- Return to the main
Settings
menu >Developer
options, and enable:- OEM unlocking (required to unlock the bootloader)
- USB debugging
2. Unlock the Bootloader
This will factory reset your device, so please backup first.
- Reboot into Fastboot mode:
$ adb reboot bootloader
- Check device connection:
$ fastboot devices
- Unlock the bootloader:
$ fastboot flashing unlock
- Your phone will display a warning. Use the volume keys to select
Unlock the bootloader
, then confirm with the power button.
- Your phone will display a warning. Use the volume keys to select
- After unlocking, Fastboot mode will show:
[...] Device state: unlocked [...]
- The phone will reboot and reset. Go through the setup process again.
3. Flash a Specific Factory Image
You only need to perform steps 1–4 if your target version matches the one shown on your device.
- Go to
Settings
>About phone
, and note the current version (e.g.,BP31.250523.006
) - Download the factory image from the official Google site:
- https://developers.google.com/android/images
- Please download the factory image that matches the corresponding device codename.
- For example, the codename for the Pixel 8a is akita.
- Target version used here:
BP2A.250705.008
- Verify the SHA-256 checksum:
$ sha256sum akita-bp2a.250705.008-factory-80be6c76.zip 80be6c762c41f3c8c92d55486370f8367fdb2a292440e2ac6fca73ba9bd2d883 akita-bp2a.250705.008-factory-80be6c76.zip
- Unzip the factory image:
$ unzip akita-bp2a.250705.008-factory-80be6c76.zip
Directory tree:
akita-bp2a.250705.008 ├── bootloader-akita-akita-16.2-13291556.img ├── d3m2.ec.bin ├── evt.ec.bin ├── flash-all.bat ├── flash-all.sh ├── flash-base.sh ├── image-akita-bp2a.250705.008.zip ├── proto11.ec.bin └── radio-akita-g5300o-250320-250425-b-13407682.img
- Flash the factory image:
$ adb reboot bootloader # Wait for the phone to enter Fastboot mode $ ./flash-all.sh
- Your phone will reboot multiple times during this process, and the host terminal will display progress messages.
- After flashing, set up your phone again.
4. Install Magisk and Root the Device
Magisk is a popular systemless root tool for Android, which I used to root my Pixel 8a.
- Download Magisk APK from its GitHub repo
- Install the APK:
adb install Magisk-v30.1.apk
- The version number may vary.
- Extract
init_boot.img
fromimage-akita-*.zip
:$ unzip image-akita-bp2a.250705.008.zip # [...] $ file init_boot.img init_boot.img: Android bootimg, kernel
- Push
init_boot.img
to your phone:$ adb push init_boot.img /sdcard/Download/
- Open the Magisk app:
- Tap
Install
icon - Choose
Select and Patch a File
- Navigate to the
Download
folder and selectinit_boot.img
- Tap
- Magisk will generate a patched image:
$ adb shell ls -al /sdcard/Download/ total 16400 -rw-rw---- 1 u0_a269 media_rw 8388608 2009-01-01 00:00 init_boot.img -rwxrwx--- 1 u0_a269 media_rw 8388608 2025-07-14 15:53 magisk_patched-30100_mTu65.img
- Note: The suffix of the patched file name is random.
- Pull the patched image back to your computer:
$ adb pull /sdcard/Download/magisk_patched-30100_mTu65.img
- Reboot into Fastboot and flash the patched
init_boot.img
:$ adb reboot bootloader $ fastboot flash init_boot magisk_patched-30100_mTu65.img fastboot flash init_boot magisk_patched-30100_mTu65.img Sending 'init_boot_b' (8192 KB) OKAY [ 0.189s] Writing 'init_boot_b' OKAY [ 0.021s] Finished. Total time: 0.215s
- Reboot your phone:
$ fastboot reboot
5. Verify Root Access
- Once booted, open the Magisk app — it should show that Magisk is installed.
- On your computer, enter:
$ adb shell akita:/ $ su akita:/ # id uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
- A prompt will appear on your phone — tap
Allow
to grant root access.
- A prompt will appear on your phone — tap