1️⃣ Preparations
- Laptop / PC – we’ll use ADB/Fastboot.
- USB cable – connect phone to PC.
- ADB & Fastboot tools – download from Google or install via package manager.
- Google Account – needed for factory‑reset protection (FRP).
- Battery > 50 % – unlocking erases data.
**ADB & Fastboot** (example for Windows): https://dl.google.com/android/repository/platform-tools-latest-windows.zip
2️⃣ Enable Developer Options & OEM Unlock
- Open Settings → About phone → tap Build‑number 7× → “You’re a developer!”.
- Back to Settings → System → Advanced → Developer options.
- Turn on OEM Unlocking (and USB debugging if you like).
3️⃣ Unlock the Bootloader (erases all data)
# Connect phone
adb devices
# Reboot into bootloader
adb reboot bootloader
# Verify device
fastboot devices
# Unlock (factory reset will follow)
fastboot flashing unlock
# On phone: use volume keys to choose “Yes”
After unlock your phone will reboot and perform a factory reset.
4️⃣ Flash a Custom Recovery (TWRP)
- Download TWRP image for Pixel 3a: twrp‑3.3.1‑20240220‑google‑3a.img
- Place it next to your
fastbootbinary. - Reboot into bootloader:
adb reboot bootloader - Flash recovery:
fastboot flash recovery twrp‑3.3.1‑20240220‑google‑3a.img - Boot straight into TWRP:
fastboot boot twrp‑3.3.1‑20240220‑google‑3a.img
5️⃣ Install Magisk (Root)
- Download latest Magisk ZIP from GitHub (e.g.
Magisk-v23.3‑20240221‑20240221‑v1.zip). - In TWRP tap Install, choose the ZIP, swipe to flash, confirm.
- After flashing, Reboot System.
- Install the Magisk Manager app (same release page) to verify root.
6️⃣ (Optional) Put OpenClaw in /system
Root isn’t required for OpenClaw, but you can place it in /system for system‑wide availability.
# In TWRP Terminal or via adb shell
fastboot reboot bootloader
adb shell
# Mount /system read‑write
mount /system
mount -o remount,rw /system
# Copy binary (assume it's on /sdcard/tmp/)
cp /sdcard/tmp/openclaw /system/bin/
chmod 755 /system/bin/openclaw
# Reboot
reboot
7️⃣ Verify Everything
- Open Termux (or any terminal). Check root status:
su -c "id" - Run OpenClaw (if installed in /system):
openclaw --help - Or, if using Termux build:
~/openclaw/build/bin/openclaw --help
8️⃣ Safety & Reverting
If you ever need to return to stock:
- Re‑flash the official Pixel 3a firmware via
fastboot flashor use TWRP’s “restore stock ROM” option. - Factory reset from Settings if necessary.