How to Root Pixel 4 and Unlock Bootloader

If you have something like a Samsung or a OnePlus device, rooting your phone might not seem very necessary. On a Pixel though, features such as network speed indicator in the status bar are still absent. For power users, stock Android is still pretty barebones, although it is a lot more polished and simpler. Google Pixel 4 and Pixel 4 XL, like other Google Pixel devices, are easier to root. For one, unlocking the bootloader is simpler. Moreover,  Google provides easy access to all firmware images for these devices. And you’ll need that to root Pixel 4, right after you unlock the Pixel 4 bootloader.


At this point pretty much everyone who is into rooting their devices knows about the risks. Yet, we’re duty-bound to let you know anyway. It also helps that we can say “told you so” in case you manage to horribly mess up your device.

Unlocking the bootloader will void your Pixel 4 warranty. Once rooted, you will also not be able to directly install OTA updates on your phone, at least, not without losing root access. You should also realize that to root your device, you’re depending on a third-party mod, by someone you don’t know. And the mod affects your device on a system level. Needless to say, it is a risky affair even if you trust the mod maker’s integrity. There is always a chance that you might miss something, or things just go south anyway, no matter how careful you were. So proceed at your own risk. Neither DroidViews nor the developer of the root mod can be held responsible for any damage you do to your device.

Also, keep in mind that unlocking the bootloader will completely wipe all data from the device. This includes apps, settings and even the contents of the internal sd card (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.


Unlock Pixel 4 Bootloader

  1. Power off your phone and connect it to your PC via a USB cable.
  2. Go to the platform-tools folder on your PC.
    • Command Prompt: Type in cmd in the address bar and hit enter.
    • Windows PowerShell: Hold Shift and right-click in an empty space inside the folder then select Open PowerShell here.
    • Terminal (macOS & Linux): Right-click in an empty space inside the folder and select Open in Terminal.
  3. Now check if your device is properly connected by typing the command given below and hit enter.
    • Command Prompt:
      adb devices
    • Windows Powershell:
      .adb devices
    • macOS or Linux:
      ./adb devices
  4. You should see your phone’s serial number. If you don’t, you should check if you have installed all the required drivers.
  5. Reboot your phone fastboot mode using the following command. Change the syntax accordingly as before.
    adb reboot bootloader
  6. Type the command below to unlock your bootloader if your device is detected. Remember this will wipe everything on your phone.
    fastboot flashing unlock
  7. On your phone, you will be warned about unlocking the bootloader.
  8. Press the Volume Up button to highlight Unlock the bootloader and the Power button to select it.
  9. Your device will reboot again in bootloader mode but you will see the text “unlocked” along with a red warning sign.
  10. Use this command then to reboot back to your OS and set up everything again.
    fastboot reboot

Download Pixel 4 & Pixel 4 XL firmware

When you flash the Magisk installer zip from TWRP recovery, it patches the current boot image. That’s how it installs itself. Unfortunately, TWRP recovery is not yet available for the Pixel 4. But since we know how Magisk does things, we can do it manually. You will need the stock boot image for your device though. Google lets users download the firmware images from their firmware download page for Pixel devices. Make sure you download the appropriate firmware. For your convenience, we’ve included the latest firmware links for the devices below.

Pixel 4

Pixel 4 XL

Get Stock Boot Image From Firmware

Pixel 4 bootimage

When you have the firmware, open it using any archive manager. You’ll find another folder inside it, so open that too. In this folder, look for an archive that has a name starting with image-coral or image-flame. Inside this archive, you’ll find several image files (files with .img extension) and also a file named boot.img which is the stock bootloader image that we’re looking for.

How to Root Pixel 4 & Pixel 4 XL

  1. Download the latest Magisk Manager APK and install it on your Pixel 4.
  2. Transfer the extracted boot image to your Pixel 4.
  3. Open Magisk Manager and click on the Install option next to the text “Magisk Manager is not installed”. patch boot image to root Pixel 4
  4. Then tap on Select and Patch a file and a file manager will open.
  5. Navigate to and select the boot image you just transferred to your device.
  6. Magisk will patch the boot image. The patched boot image can be found in the Magisk Manager folder on your device’s internal storage.
  7. Copy it to your adb installation folder over the MTP connection or use the following adb command.
    adb pull /sdcard/MagiskManager/magisk_patched.img
  8. Reboot your phone into fastboot mode again.
    adb reboot bootloader
  9. Flash the patched boot image with this command.  root Pixel 4 & Pixel 4XL

    fastboot flash boot magisk_patched.img
  10. Disconnect and reboot your device.

When your device boots up, launch Magisk Manager again and you will see that Magisk is installed. Do keep in mind that you will have to root every time you install an OTA update.

Read Next: PPI vs DPI: What Are They and What’s the Difference?

Leave a Reply

Your email address will not be published. Required fields are marked *