How to Root Google Pixel 4 / Pixel 4 XL

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…

  1. Take a complete backup of your device before proceeding.
  2. Please note that your device warranty will be void upon rooting your device.
  3. Download and install Pixel 4 USB Drivers:
  4. Download and install ADB and Fastboot on your computer using this tool: 15 Seconds ADB and Fastboot Installer
  5. 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

  1. Go to Settings > Software information > Build number.
  2. Once you have that information, visit Google’s firmware download page for Pixel devices and download the appropriate firmware file according to your device.
  3. Once downloaded, extract the firmware zip file using any archive manager and look for another archive.
  4. Extract this archive as well and look for the stock image file. It will be named as boot.img.
  5. Transfer this stock image file to your phone’s internal storage.

Patching the Stock Boot Image

  1. Download the latest Magisk Manager APK file from the link appearing below and sideload it in your phone.
  2. Once installed, open the Magisk Manager app.
  3. 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.
  4. Tap on “Settings” followed by a tap on the “Patched Boot Output Format” option and select “.img.”
  5. 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.”
  6. 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.
  7. 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

  1. Open PowerShell window in the fastboot folder like you did while unlocking the bootloader.
  2. Use the following adb command to reboot it into bootloader mode as before.
    adb reboot bootloader
  3. 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.

1 thought on “How to Root Google Pixel 4 / Pixel 4 XL”

Leave a Comment