Install Magisk on Pixel & Pixel XL: Full Guide
In this article
Yes, you can install Magisk on a Pixel or Pixel XL to gain root access and systemless modding. This guide walks you through the entire process, from unlocking the bootloader to flashing Magisk and verifying root. You'll need a computer, a USB cable, and a bit of patience. The steps are the same for both the original Pixel (sailfish) and Pixel XL (marlin), but note that the exact filenames and menu labels can vary slightly by Android version and Magisk release.
What You'll Need
- A Google Pixel or Pixel XL with an unlocked bootloader (if yours is locked, follow the unlocking steps below).
- A Windows, macOS, or Linux computer.
- A USB cable that supports data transfer.
- The latest Magisk APK (download from the official Magisk GitHub releases page).
- The platform-tools (ADB and Fastboot) installed on your computer – download from Google's developer site.
- The stock boot image for your exact device model and Android version (you can extract it from the factory image, or use the one from the Magisk app's "Install" tab if you're already on stock).
- Backup of your personal data – unlocking the bootloader wipes everything.
Step-by-Step
- Enable Developer Options and USB Debugging – On your phone, go to Settings > About phone and tap Build number seven times. Then go to Settings > System > Developer options and turn on USB debugging and OEM unlocking (if available).
- Unlock the Bootloader (if not already done) – Connect your phone to the computer, open a command prompt/terminal in the platform-tools folder, and run
adb reboot bootloader. Once in fastboot mode, runfastboot flashing unlock. Confirm on the phone screen. This wipes your data, so make sure you've backed up. After it finishes, reboot by runningfastboot reboot. - Re-enable USB Debugging – After the phone reboots, go through the initial setup, then re-enable USB debugging (Developer options will be reset).
- Download the Factory Image or Extract the Boot Image – Go to Google's factory images page, find your device (sailfish for Pixel, marlin for Pixel XL), and download the build that matches your current Android version. Extract the ZIP, then extract the
image-*.zipinside it. You'll find aboot.imgfile. - Patch the Boot Image with Magisk – Transfer the
boot.imgto your phone's internal storage. Install the Magisk APK you downloaded, then open the Magisk app. Tap Install (next to Magisk), then Select and Patch a File. Choose theboot.imgyou transferred. The app will create a patched file namedmagisk_patched-*.imgin the Download folder. - Copy the Patched Image to Your Computer – Using a file manager on the phone, move the patched image to a location you can access via USB, or use
adb pull /sdcard/Download/magisk_patched-*.imgfrom the platform-tools folder. - Boot to Fastboot Again – Run
adb reboot bootloaderfrom your computer. - Flash the Patched Image – In fastboot mode, run
fastboot flash boot magisk_patched-*.img(replace the filename with the actual one). This flashes the patched boot image to the boot partition. - Reboot and Verify – Run
fastboot reboot. Once the phone boots, open the Magisk app. It should show Magisk as installed and the version number. You can also use a root checker app from the Play Store to confirm root access.
Common Mistakes
- Using the wrong boot image – The boot image must match your exact device model and Android build. Flashing a mismatched one can cause a boot loop.
- Skipping the bootloader unlock – You cannot flash a patched boot image without an unlocked bootloader. The fastboot command will fail with an error.
- Not backing up data – Unlocking the bootloader wipes all data. If you skip the backup, you lose everything.
- Using an outdated Magisk version – Older Magisk versions may not support the latest Android security patches. Always use the latest stable release.
- Flashing the patched image to the wrong partition – Make sure you flash to
boot, notrecoveryorsystem.
Tips
- Keep the stock boot image in a safe place – you'll need it to unroot later.
- After flashing, the first boot may take longer than usual. Give it a few minutes.
- If you ever need to unroot, simply flash the stock boot image back using the same fastboot method.
- Use the Magisk app's built-in Uninstall feature to restore the original boot image if you still have it.
- Always download Magisk from the official GitHub repository, not from third-party sites.
Troubleshooting
Boot loop after flashing – This usually means the boot image is incorrect or corrupted. Boot back into fastboot (hold Volume Down + Power while rebooting) and flash the stock boot image to restore the phone. Then re-patch the correct boot image.
Magisk app shows "Requires Additional Setup" – Open the app and tap OK to allow it to complete the setup. If it fails, reboot and try again.
Root check fails – Make sure you flashed the patched image to the correct slot (if your device uses A/B partitions, you may need to flash to both slots). On the Pixel/Pixel XL, you can check the active slot with fastboot getvar current-slot and flash to the other slot if needed.
ADB or fastboot not recognized – Ensure you have the latest platform-tools and that your device drivers are installed. On Windows, try a different USB port or cable.
Device not showing in fastboot – Make sure you're in fastboot mode (the screen should show a green Android robot with "Fastboot" text). Run fastboot devices to see if it's detected.
Frequently Asked Questions
Will installing Magisk void my warranty?
Yes, unlocking the bootloader and rooting typically voids the manufacturer warranty. However, you can unroot and relock the bootloader later, though the warranty status may not be fully restored.
Can I still receive OTA updates after rooting?
No, you won't receive over-the-air updates because the system partition is modified. You'll need to manually flash updates using the factory images, or use Magisk's built-in "Install to Inactive Slot" feature after updating.
Does Magisk work with the Pixel's camera and other apps?
Yes, Magisk is systemless, so it doesn't alter the system partition. Most apps, including Google Camera, will work normally. Some banking or DRM apps may detect root and refuse to run, but you can use Magisk Hide to hide root from specific apps.
What is the difference between Magisk and SuperSU?
Magisk is systemless, meaning it doesn't modify the system partition, which allows OTA updates and passes SafetyNet more easily. SuperSU is older and modifies the system partition. Magisk is the recommended choice for modern devices.
Can I install Magisk without unlocking the bootloader?
No, you must unlock the bootloader first. There is no official way to root without an unlocked bootloader on Pixel devices.
Will rooting my Pixel affect Google Pay or Netflix?
Google Pay and Netflix may fail due to SafetyNet checks. You can use Magisk Hide to pass SafetyNet, but it's not guaranteed to work with all apps. Some apps may still detect root.