In this guide, learn how to root Google Pixel 4 and Pixel 4 XL using Magisk. Rooting your Google Pixel 4 helps you take full control of your device. You can install custom ROMs, custom kernels, custom recoveries and much more.
Before you get started…
- Take a complete backup of your device before proceeding.
- Please note that your device warranty will be void upon rooting your device.
- Download and install Pixel 4 USB Drivers:
- Download and install ADB and Fastboot on your computer using this tool: 15 Seconds ADB and Fastboot Installer
- Unlock Pixel 4 Bootloader: Unlock Bootloader on Google Pixel 4 / Pixel 4 XL.
Steps to Root Google Pixel 4 / Pixel 4 XL
Getting the Stock Boot Image
- Go to Settings > Software information > Build number.
- Once you have that information, visit Google’s firmware download page for Pixel devices and download the appropriate firmware file according to your device.
- Once downloaded, extract the firmware zip file using any archive manager and look for another archive.
- Extract this archive as well and look for the stock image file. It will be named as boot.img.
- Transfer this stock image file to your phone’s internal storage.
Patching the Stock Boot Image
- Download the latest Magisk Manager APK file from the link appearing below and sideload it in your phone.
- Once installed, open the Magisk Manager app.
- Open the Magisk Manager app from your phone and tap on the menu icon from the top left corner of your display. It is in the shape three bars placed horizontally.
- Tap on “Settings” followed by a tap on the “Patched Boot Output Format” option and select “.img.”
- From the home screen of the Magisk Manager app, tap on “Install” followed by a tap on “Install” again and then select “Patch Boot Image File.”
- Now, navigate to the location where you have stored the file that you downloaded in step 4 and tap on it. The patching procedure should continue.
- Now, connect your phone with your PC and transfer the ‘patched_boot.img’ file from the phone’s internal storage to the folder where the fastboot tools are installed.
Root Pixel 4 / Pixel 4 XL with Magisk Patched Boot Image
- Open PowerShell window in the fastboot folder like you did while unlocking the bootloader.
- Use the following adb command to reboot it into bootloader mode as before.
adb reboot bootloader
- Flash the patched boot image file to your device with this command.
fastboot flash boot patched_magisk.img
And you are done. You can disconnect your phone from your PC. Congratulations! You just successfully unlocked the bootloader and rooted your Pixel 4 or the Pixel 4 XL. This is the easiest way to root the Pixel 4 or the Pixel 4 XL.