How to root a Google Pixel with Magisk
Pixels are the easiest phones to root. Google publishes every factory image, unlocking is one fastboot command on phones bought unlocked, and Magisk's own update instructions are written around Pixels. Pick your model below and every command on this page adjusts to it.
Last updated 13 sourcesHow we check pages
Pixel 11 and Android 17: use Magisk v31.1
Magisk v31.1, the current stable release (October 25, 2026), is the first stable release with explicit Android 17 support for Zygisk, added in the v31.0 pre-release. v30.7 has Android 16 QPR2 support, and users report rooting Android 17 builds with it, but if Zygisk modules misbehave on Android 17, update to v31.1. On Pixels, v31.1 can also download and patch the matching factory image for you. See Magisk and Android 17.
- Bootloader unlockYes, one commandNot on most Verizon units
- Waiting periodNone
- Data wipeYes, when unlocking
- Image to patchinit_boot.imgboot.img on Pixel 6 series and older
- Updates with rootYes (A/B slots)
- Time neededAbout 30 minutes
Rooting a Pixel: the whole job
- Step 1 · 5 minutesUnlock the bootloader
- Step 2 · 10 minutesGet the factory image for your build
- Step 3 · 2 minutesPatch the image in the Magisk app
- Step 4 · 2 minutesFlash the patched image
- Step 5 · 2 minutesFinish setup and check root
Find your model
The image you patch depends on the Android version your Pixel launched with. Pixel 7 and newer use init_boot.img. The Pixel 6 series and older use boot.img, even after updating to Android 16 or 17.
-
Pixel 11, 11 Pro, 11 Pro XL, 11 Pro Fold
cubs, grizzly, kodiak, yogiUse Magisk v31.1; see the note above.Checked in official firmware: all 4, CD1A.261005.003.B1 (how)Launched withAndroid 17Patchinit_boot.img -
Pixel 10a
stallionA Magisk user confirmed that patchingboot.imggives no root; patchinit_boot.img.Checked in official firmware: yes, CP3A.261005.005 (how)Launched withAndroid 16Patchinit_boot.img -
Pixel 10, 10 Pro, 10 Pro XL, 10 Pro Fold
frankel, blazer, mustang, rangoRead the May 2026 anti-rollback warning below before flashing older builds.Checked in official firmware: all 4, CP3A.261005.005 (how)Launched withAndroid 16Patchinit_boot.img -
Pixel 9a
teguChecked in official firmware: yes, CP3A.261005.005 (how)Launched withAndroid 15Patchinit_boot.img -
Pixel 9, 9 Pro, 9 Pro XL, 9 Pro Fold
tokay, caiman, komodo, cometChecked in official firmware: all 4, CP3A.261005.005 (how)Launched withAndroid 14Patchinit_boot.img -
Pixel 8, 8 Pro, 8a
shiba, husky, akitaRead the May 2025 anti-rollback warning below before flashing older builds.Checked in official firmware: all 3, CP3A.261005.005 (how)Launched withAndroid 14Patchinit_boot.img -
Pixel Fold, Pixel Tablet
felix, tangorproChecked in official firmware: all 2, CP3A.261005.002.A1 (how)Launched withAndroid 13Patchinit_boot.img -
Pixel 7, 7 Pro, 7a
panther, cheetah, lynxChecked in official firmware: all 3, CP3A.261005.002.A1 (how)Launched withAndroid 13Patchinit_boot.img -
Pixel 6, 6 Pro, 6a
oriole, raven, bluejayNoinit_bootpartition. Read the May 2025 anti-rollback warning below.Checked in official firmware: all 3, CP3A.261005.002.A1 (how)Launched withAndroid 12 (6a: 12L)Patchboot.img -
Pixel 5, 5a, 4a (5G)
redfin, barbet, brambleNo longer updated by Google.Checked in official firmware: all 3, UP1A.231105.001.B2 (how)Launched withAndroid 11Patchboot.img -
Pixel 4, 4 XL, 4a
flame, coral, sunfishNo longer updated by Google.Checked in official firmware: all 3, TP1A.221005.002.B2 (how)Launched withAndroid 10Patchboot.img
No match. Open your factory image: if it contains init_boot.img, patch that. Otherwise patch boot.img.
Codenames for Pixel 6a and newer are from Google's Android 17 QPR2 beta device list, older ones from the Android Open Source Project. Whether a model has init_boot is from Google's published board configurations (Pixel 6 to 9) or, for Pixel 9a and newer, from Magisk users' reports. Pixel 4 to 5a no longer get updates.
What we found in the official firmware
We read the partition list of the newest full update for every Pixel in the finder, straight from Google's full OTA images page, without downloading the packages, and checked the device name each package reports. For one phone in each boot group we also extracted boot.img, matched it against the hash in the update's manifest and opened it with Magisk's own tool. Checked October 27, 2026.
| Model | Official package | init_boot partition | Ramdisk in boot.img | Patch |
|---|---|---|---|---|
| Pixel 11 family (cubs) | CD1A.261005.003.B1 Android 17 | Yes | — | init_boot.img |
| Pixel 11 family (grizzly) | CD1A.261005.003.B1 Android 17 | Yes | — | init_boot.img |
| Pixel 11 family (kodiak) | CD1A.261005.003.B1 Android 17 | Yes | — | init_boot.img |
| Pixel 11 family (yogi) | CD1A.261005.003.B1 Android 17 | Yes | — | init_boot.img |
| Pixel 10a family (stallion) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 10 family (frankel) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 10 family (blazer) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 10 family (mustang) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 10 family (rango) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 9a family (tegu) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 9 family (tokay) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 9 family (caiman) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 9 family (komodo) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 9 family (comet) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 8 family (shiba) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 8 family (husky) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel 8 family (akita) | CP3A.261005.005 Android 17 | Yes | — | init_boot.img |
| Pixel Fold family (felix) | CP3A.261005.002.A1 Android 17 | Yes | — | init_boot.img |
| Pixel Fold family (tangorpro) | CP3A.261005.002.A1 Android 17 | Yes | — | init_boot.img |
| Pixel 7 family (panther) | CP3A.261005.002.A1 Android 17 | Yes | — | init_boot.img |
| Pixel 7 family (cheetah) | CP3A.261005.002.A1 Android 17 | Yes | — | init_boot.img |
| Pixel 7 family (lynx) | CP3A.261005.002.A1 Android 17 | Yes | — | init_boot.img |
| Pixel 6 family (oriole) | CP3A.261005.002.A1 Android 17 | No | No | boot.img |
| Pixel 6 family (raven) | CP3A.261005.002.A1 Android 17 | No | not checked | boot.img |
| Pixel 6 family (bluejay) | CP3A.261005.002.A1 Android 17 | No | not checked | boot.img |
| Pixel 5 family (redfin) | UP1A.231105.001.B2 Android 14 | No | Yes | boot.img |
| Pixel 5 family (barbet) | AP2A.240805.005.S4 Android 14 | No | not checked | boot.img |
| Pixel 5 family (bramble) | UP1A.231105.001.B2 Android 14 | No | not checked | boot.img |
| Pixel 4 family (flame) | TP1A.221005.002.B2 Android 13 | No | Yes | boot.img |
| Pixel 4 family (coral) | TP1A.221005.002.B2 Android 13 | No | not checked | boot.img |
| Pixel 4 family (sunfish) | TQ3A.230805.001.S2 Android 13 | No | not checked | boot.img |
Every result matches the finder above. One detail worth knowing: on current builds the Pixel 6's boot.img has no ramdisk at all (its ramdisk sits in vendor_boot). Magisk patches boot.img anyway and adds a ramdisk of its own, which is why patching boot.img still works on the Pixel 6 series. The full output and the tool: evidence files. Here is the Pixel 6 check:
Lines 1 to 15 of the unedited output. Full log · how it was made
Before you start
You will need
- A Pixel bought unlocked, or from a carrier that allows unlocking. Most Verizon Pixels cannot be unlocked.
- A computer with Google's SDK Platform-Tools (adb and fastboot) and a USB cable that carries data.
- A backup. Unlocking the bootloader erases everything on the phone.
- Your exact build number, from Settings → About phone → Build number, for example
CP2A.260605.016. - The Magisk app from the official GitHub release.
What you give up
- Google Wallet tap-to-pay. Google says Wallet payments are not supported on phones that are rooted or have an unlocked bootloader.
- Strong Play Integrity. On Android 13 and later, the device verdict needs hardware proof of a locked bootloader. Some banking apps and games check it. See Play Integrity and root.
- A clean boot screen. Every boot shows an orange warning that the bootloader is unlocked. This is normal.
Root your Pixel step by step
Each step has a Done box so you can keep your place. Your progress is saved in this browser only.
-
Unlock the bootloader
5 minutes- Open Settings → About phone and tap Build number seven times to enable Developer options.
- In Settings → System → Developer options, turn on OEM unlocking and USB debugging. If OEM unlocking is greyed out, connect to the internet so the phone can check in with Google, or dial
*#*#CHECKIN#*#*. If it stays greyed out, the carrier does not allow unlocking. - Connect the phone and reboot to the bootloader, then unlock. Confirm on the phone with the volume and power keys. This erases all data.
Unlock$adb reboot bootloader $fastboot flashing unlockThe phone resets and reboots. Set it up again and re-enable Developer options and USB debugging.
-
Get the factory image for your build
10 minutesWith Magisk v31.1 you can skip this step. In the Magisk app, tap Install, choose Patch firmware / image and then Download latest Pixel factory image. Despite the label, the app looks for the factory image of the build your phone is running now and only falls back to the newest one if it can't find it (
FirmwareCrawler.ktin Magisk's source). The option shows the model and build it picked: check that it matches Settings → About phone → Build number.To do it by hand, download the factory image that matches your model and your build number exactly from Google's factory images page. Patching an image from a different build is the most common cause of a bootloop. Unzip the download, then unzip the
image-<codename>-<build>.zipinside it, and copyinit_boot.imgto the phone. A full OTA zip works too: Magisk takesinit_boot.imgout of itspayload.bin. We did exactly that with a Pixel 7 Android 17 update: our run, with the full output. -
Patch the image in the Magisk app
2 minutesInstall the Magisk app, tap Install next to Magisk, choose Patch firmware / image (v30.7: Select and Patch a File) and pick
init_boot.img, or the factory or OTA zip itself. Magisk writesmagisk_patched-<version>_<random>.imgto your Download folder. Copy it to the computer with adb rather than MTP, which can corrupt large files.Copy the patched image to the computer$adb pull /sdcard/Download/magisk_patched-XXXXX_YYYYY.img -
Flash the patched image
2 minutesReboot to the bootloader and flash the patched file to
init_boot. Replace the file name with yours.Flash$adb reboot bootloader $fastboot flash init_boot magisk_patched-XXXXX_YYYYY.img $fastboot reboot -
Finish setup and check root
2 minutesOpen the Magisk app. If it asks for additional setup, accept and let it reboot. The Magisk card on the home screen should now show a version number, for example
31.1 (31100). The App card's Installed line is only the app's own version. If the Magisk card says Not Installed (v31.1) or N/A (v30.7), you most likely flashed the wrong partition: see the errors section below.Next: install modules, or set up Play Integrity for apps that check it.
Keeping root after updates
Monthly update, keeping root
- BeforeTurn off automatic updatesDeveloper options
- 1Let the update installDo not tap Restart
- 2Install to Inactive SlotMagisk app → Install
- 3Reboot from MagiskNew build, still rooted
Pixels have A/B slots, so you can take monthly updates and keep root. Turn off Automatic system updates in Developer options first.
- When an update is offered, let it download and install, but do not tap Restart.
- In the Magisk app, tap Install → Install to Inactive Slot (After OTA), then reboot from Magisk.
Magisk's documentation notes that on Pixels you don't need to restore images first: Google's servers send a full update if any partition was changed. If you sideload an update instead, it replaces init_boot.img, so patch and flash the new build's image again. Full steps: keeping root after an update.
Google warns that the May 2025 update for the Pixel 6 and Pixel 8 series and the May 2026 update for the Pixel 10 series raise the bootloader's anti-rollback version. After them, older builds cannot be flashed or booted. Google's advice: after first booting that update, sideload the full OTA for the same build so both slots hold a bootable image. Never flash a build older than the one you run on these phones.
If the phone does not boot
Reboot to the bootloader by holding Power + Volume Down, then flash the untouched image from the same factory image: fastboot flash init_boot init_boot.img. Your data stays. If the phone boots but loops after you installed a module, hold Volume Down during boot to start Magisk's Safe Mode, which disables all modules. See fixing a Magisk bootloop.
Errors and fixes
The messages people most often hit on this brand, and what they mean.
OEM unlocking is greyed out
Connect to Wi-Fi or mobile data so the phone can check in with Google, or dial *#*#CHECKIN#*#*, then wait a few minutes. Google's documentation says that if it stays unavailable, the phone is locked by its carrier and the bootloader cannot be unlocked. This is typical of Verizon Pixels.
fastboot shows no device or says “waiting for any device”
Update Platform-Tools to the latest version, use a different USB port or cable (a USB 2 port often helps), and on Windows install Google's USB driver. Check with fastboot devices while the phone shows the bootloader screen.
The Magisk app shows Not Installed (v31.1) or Installed: N/A (v30.7) after flashing
Root did not load. On Pixel 7 and newer this almost always means boot.img was patched or flashed instead of init_boot.img. A Pixel 10a owner hit exactly this in Magisk's issue tracker; patching init_boot.img fixed it.
The phone reboots straight back to fastboot after flashing
The patched image did not boot. Flash the stock image back (see If the phone does not boot), then check that the factory image matches your build number exactly and that you used Magisk v30.7 or newer. Magisk's issue tracker has an open report of this on some Pixels; on Android 17 builds, use v31.1.
“Your device is corrupt. It can't be trusted” (red warning)
Android shows this red state when its boot integrity check finds a corrupted image. It usually follows flashing an image from a different build. Flash the matching stock images from Google's factory image for your exact build. Do not lock the bootloader while any image is modified.
Google Wallet or a banking app stopped working
Expected. Google Wallet does not support rooted phones or unlocked bootloaders, and Play Integrity's device verdict needs a locked bootloader on Android 13 and later. Magisk itself no longer hides root. See Play Integrity and root for what is and isn't possible.
Questions people ask
Do I patch boot.img or init_boot.img on a Pixel?
init_boot.img on Pixel 7 and newer, including the Fold, Tablet, 9a, 10a and Pixel 11. boot.img on the Pixel 6 series and older. Pick your model in the finder above and the commands update.
Can I root a Pixel without unlocking the bootloader?
No. Magisk's installation guide states that the bootloader has to be unlocked. Any app or website claiming otherwise is not legitimate.
Will the next Pixel update remove root?
Only if you let it reboot normally. Use Install to Inactive Slot in the Magisk app after the update installs and before rebooting, and root carries over.
Can I root a Verizon Pixel?
Generally no. Verizon Pixels ship with OEM unlocking disabled, and there is no official way to enable it.
Can I go back to stock and relock the bootloader?
Yes. Flash the full factory image (Google's Android Flash Tool can do it in a browser), then run fastboot flashing lock. Locking wipes the phone again. Never lock while any image is modified.
Which Magisk version should I use on Android 17?
v31.1, the current stable release. It is the first stable release with explicit Android 17 support for Zygisk (added in the v31.0 pre-release). Older v30.7 also roots many Android 17 builds, but Zygisk modules are more likely to fail on it. Details in the release history.
Sources
This page is written from the sources below. If anything here disagrees with them, the upstream source is correct.
- Magisk installation guide (topjohnwu)
- Magisk OTA installation guide (topjohnwu)
- Factory images for Nexus and Pixel devices, including anti-rollback notices (Google)
- Running builds: unlocking the bootloader (Android Open Source Project)
- Codenames, tags and build numbers (Android Open Source Project)
- Android 17 QPR2 beta: supported Pixel devices and codenames (Android Developers)
- Pixel 6 board configuration, no init_boot (AOSP)
- Pixel 7 board configuration with init_boot (AOSP)
- Magisk issue #10110: Pixel 10a needs init_boot
- Magisk issue #9928: Android 17 on Pixel with v30.7
- Google Wallet: unsupported devices (Google)
- Play Integrity verdicts (Android Developers)
- Boot flow and warning screens (Android Open Source Project)
Found a mistake or something out of date? Tell us and we will check it against the source and fix the page. Confirmed corrections are listed in the corrections log.
Report a problem with this page