How to Root Google Pixel 7 or Pixel 7 Pro with Magisk

How to Root Google Pixel 7 or Pixel 7 Pro with Magisk

Some people cannot imagine using Android without root access. Although Google Pixel smartphones are among the easiest devices to unlock the bootloader, root and install aftermarket software, it may come as a surprise that the typical boot image fix technique is no longer applicable to the latest Pixel 7 series.

If you bought the Pixel 7 or Pixel 7 Pro and want to learn how to root it, we’ll show you how in this tutorial. You will need to have your PC handy and familiar with ADB.

Google Pixel 7 XDA Forums || Google Pixel 7 Pro XDA Forums

  • You need an unlocked bootloader to root Google Pixel 7 or 7 Pro.
  • Unlocking the bootloader will erase your Pixel 7/7 Pro.
  • Instead of the boot image, you need to patch the init_boot image with Magisk for root access.

Browse this article:

Google Pixel 7 Pro in hand

How to Root Google Pixel 7 and 7 Pro

Before discussing how to root Pixel 7, remember to make an off-device backup. This is because the rooting process requires erasing all data from your phone, including files from internal storage.

Step 1 – Get the stock init_boot image for the Pixel 7/7 Pro

For devices launched with Android 13 like the Pixel 7 series, the generic ramdisk is removed from the boot image and placed in a separate location called “init_boot”. The boot.img file only contains the generic kernel image (GKI).

Therefore, fixing the boot.img for root access will not work for these devices. Instead, we need to get our hands on the image corresponding to the init_boot partition that corresponds to the current version of software the phone is running.

Luckily, we don’t need any specialized tools to extract the init_boot image from the target device. It can be easily extracted from the factory image released by Google for the Pixel 7/7 Pro.

To make sure you are downloading the correct factory image, you need to check the software version your phone is currently using. To check it out, go to Settings > About the phone. Below, look for the Build number section. Find the corresponding build number on the factory image download page and download this file.

Download Android 13 for Google Pixel phones

Next, extract the factory image ZIP file. Locate the image-[device codename]-[version].zip (yes, there is a ZIP within a ZIP) and extract the init_boot.img file from it. This is the file you need to transfer to your phone’s internal storage for the patch.

Google Pixel 7 Pro factory image stock init_boot image

Step 2 – Fix the stock init_boot image using Magisk

Now that we have the init_boot image in our hands, we can easily fix it with Magisk. In fact, you can patch it on a different Android device than the Pixel 7, but you also need to install the Magisk app on the secondary device.

While the current stable version of Magisk can fix the Pixel 7’s init_boot image, you might want to upgrade to the state-of-the-art canary version of Magisk for additional fixes.

Download Magisk: Stable || Canary

After installing the Magisk APK, open the app and locate the Install button on the highest card. Picking out Select and patch a file below Method, and select the stock init_boot image. This will open the Android file picker. Go ahead and find the init_boot.img file that you transferred from your PC and select it. The Magisk app will patch the image to the phone’s download folder. You need to upload this patched file (must be named “magisk_patched_[random_strings].img”) on your PC because next, we will unlock the bootloader which will erase all data as we previously warned.

Notably, if you browse the XDA forums for the Pixel 7 or 7 Pro, you might be lucky enough to find a pre-patched init_boot image. However, we always recommend that you grab the official firmware and patch the original boot image yourself to avoid unforeseen issues due to image version mismatch.

Step 3 – Enable OEM Unlock and Unlock Bootloader

To flash third-party software on the Pixel 7, we need to unlock the bootloader. To do this, go to Settings > About the phone > Build number and press this entry 7 times to activate Developer Options. After enabling it, go back to the main settings page and tap Systemthen go to Developer Options. From there, switch the OEM Unlock option. Keep in mind that you need to enter your password/pattern/PIN to validate certain actions.

It is important to note that some US carriers like Verizon do not allow unlocking the bootloader at all, which makes it impossible to root your phone. Sometimes, however, people find unofficial workarounds, and we’ll let you know if they’re found.

After enabling OEM unlocking, turn off your phone. Press and hold Volume Down and Power button to turn your phone back on and boot into the bootloader menu. Assuming the latest ADB and Fastboot binaries are already installed, you can also use the following command to reboot into bootloader mode directly from Android.

adb reboot bootloader

Make sure to keep your phone plugged into your PC/Mac/Chromebook. Then, in a terminal window, type:

fastboot flashing unlock

You will see a screen telling you that you are about to start the bootloader unlock process. Use volume button to navigate and power button to accept. Again, this will erase all data on your phone, so make sure you have backed up your data before proceeding..

Step 4 – Flash Magisk Patched init_boot Image

With your Pixel 7 (or 7 Pro) bootloader unlocked and the init_boot image patched, you’re just one step away from root.

As soon as the bootloader unlocking process is completed, the phone will reboot after a few minutes. Skip the setup wizard at this point and power off the phone. Now you want to reboot into the bootloader by holding down the volume and power buttons again. Once there, connect the phone to your PC/Mac/Chromebook and run the following command:

fastboot flash init_boot path/to/magisk_patched.img

As soon as you hit enter, the patched init_boot image will be flashed to your phone. Then reboot using fastboot reboot and the Magisk app should appear on your home screen and/or app drawer. If not (for example, you can only see a stub icon), just install the Magisk APK manually. You are now rooted!

Google Pixel 7 Pro rooted

Screenshot courtesy: XDA member edcsxz

Remember that you will need to repeat steps 1, 2 and 4 each time you update your phone, as the init_boot image changes with each update. To learn more, check out our tutorial on how to install OTA updates and stay root on your Google Pixel phone.

And after?

Once your Pixel 7 is rooted, you open the device to some cool tweaks like Magisk mods and Xposed mods. Sure, there’s already a ton of stuff you can do without root on Google devices, but having root access is an added bonus nonetheless, especially when you consider the best root apps.

    Google Pixel 7

    The vanilla Google Pixel 7 is very similar to the top-end Pro model, but is $300 cheaper and offers better value.

    Google Pixel 7 Pro

    The top-end Pixel 7 Pro has a better display, higher resolution and refresh rate, bigger battery and an extra telephoto lens on the back.

#Root #Google #Pixel #Pixel #Pro #Magisk

Leave a Comment

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