In this guide, we will show you the steps to unlock the bootloader and then root the Pixel 9, Pro, XL, and Fold via Magisk, KernelSU, and APatch. In the recently concluded Google event, we were treated to a slew of new goodies, both on the hardware and software side. If we talk about the latter, then AI took center stage, with the likes of a new Weather app, Pixel Call Notes, Studio, Screenshot, and Gemini Live, among others.
If we turn our attention towards hardware, the Silicon Valley giant greeted us with four new variants, which concludes its ninth iteration of devices. These devices have always been known to offer the best usage experience, thanks to their clean stock AOSP with little to no bloatware. Likewise, you get among the absolute best cameras that any smartphone has to offer [though there are still a few rough edges such as battery drain and overheating, but they have been ironed out up to a large extent in this latest lineup].
Moreover, the devices have always been the tech enthusiast’s go-to choice, all thanks to the ease of development and the OEM’s decision not to put in any harsh restrictions in this process. And fortunately, the ninth iteration is no different either. There are a plethora of tweaks and tricks that you can carry out on the Pixel 9, Pro, XL, and the Fold, but before that, you’ll have to unlock their bootloader as well. And in this guide, we will show you how to do just that. So without any further ado, let’s get started.
Table of Contents
Benefits and Risks of Bootloader Unlock & Root
Once you unlock the bootloader on your device and subsequently root it, you can flash a plethora of mods. These include the likes of Magisk Modules, Xposed Framework, LSPosed, Substratum Themes, and Viper4Android among others. Likewise, you could also flash a custom kernel and implement your desired CPU Governor profile. However, all these tweaks come at a cost.
Unlocking the bootloader will end up wiping all the data from your device and might also nullify its warranty. Moreover, it will degrade the Widevine L1 certification to L3, thereby preventing you from streaming content in HD [FIXED]. The SafetyNet will be triggered [FIXED] and so will the Play Integrity [FIXED], both of which will prevent you from using banking apps [FIXED]. So if that’s all well and good, then let’s get started with the steps.
The Prerequisites to Unlock and Root
Carrying out the below process will wipe off all the data from your device, so make sure to take a complete device backup beforehand. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
- To begin with, download and extract the Android SDK Platform Tools on your PC.
- Go to Settings > About Phone > Tap on Build Number 7 times. This will enable Developer Options.
- So head over to Settings > System > Developer Options > Enable the toggle next to USB Debugging.
- Now connect your device to your PC via a USB cable.
- Then type in CMD in the platform-tools folder address bar and hit Enter. This will launch the Command Prompt.
- Now type in the below command to boot your device to Fastboot Mode:
adb reboot bootloader
- Finally, type in the below command and make sure that you’re getting a serial ID
fastboot devices
- If you aren’t getting any ID, then install Fastboot Drivers on your PC. That’s it.
How to Unlock Bootloader on Pixel 9/Pro/XL/Fold
- From the Fastboot Mode, type in the below command. You’ll then get a prompt on your device:
fastboot flashing unlock
- Use the Volume keys to highlight Unlock the bootloader and then press the Power key to confirm.
- The device will undergo a reset and it will then boot to the OS, with the bootloader being unlocked.
How to Root Pixel 9/Pro/XL/Fold via Magisk
- First off, carry out STEPS 1 to 5 from the Prerequisites section above.
- Then download the Factory Image for your device from Google’s website [direct link given below]:
Make sure to download the same version that is currently installed on your device. You can verify the same from the Build Number section on your device.
"tokay" for Pixel 9 | "caiman" for Pixel 9 Pro | "komodo" for Pixel 9 Pro XL
- Now extract the firmware and then extract the Images folder within it.
- Then go to the Images folder, copy the init_boot.img file from there, and transfer it to your device.
- Now download and install the Magisk app on your device.
- Then launch it, tap on Install next to Magisk, and select the init_boot.img file.
- Magisk will now patch this file and place it in the Downloads folder.
- You should transfer this file to the platform tools folder on your PC.
- For the ease of convenience, let’s rename the file to patched_init_boot.
- Now open the Command Prompt window inside the platform-tools folder
- Then type the following command to boot your device to Fastboot Mode:
adb reboot bootloader
- Now type in the below command to flash this file to the init_boot partition:
fastboot flash init_boot patched_init_boot.img
- After that, type in the below command to boot your device to the OS.
fastboot reboot
- Now launch Magisk and you’ll get a prompt regarding additional setup, tap OK.
- Your device will auto-reboot to the OS and the rooting process stands complete.
That’s it. These were the steps to unlock the bootloader and root Pixel 9/Pro/XL/Fold via Magisk, KernelSU, and APatch. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution as soon as possible.
How to Root Pixel 9/Pro/XL/Fold via KernelSU
- To begin with, download and install KernelSU on your device.
Download: KernelSU [GitHub]
- Then launch it and patch the stock init_boot.img file using it.
- Boot your device to Fastboot Mode using the below command
adb reboot bootloader
- Then flash the patched init_boot.img file to the init_boot slot:
fastboot flash init_boot patched_init_boot.img
- Now reboot your device to rooted OS via the below command
fastboot reboot
- These steps were to root your Pixel 9/Pro/XL/Fold via KernelSU.
How to Root Pixel 9/Pro/XL/Fold via APatch
- To begin with, download and install APatch on your device.
DOWNLOAD: APatch [GitHub]
- Then launch it, set up the password, and patch the boot.img.
- Now boot your device to Fastboot Mode via the below command:
adb reboot bootloader
- Finally, use the below command to flash the patched boot.img file:
fastboot flash boot patched_boot.img
- Now reboot your device to the rooted OS via the below command:
fastboot reboot
- Launch APatch and type the password you set up earlier. That’s it.
- These were the steps to root your Pixel 9/Pro/XL/Fold via APatch.
FAQ 1: Should I Use Magisk, KernelSU, or APatch for Root
You can use any of these methods for rooting. However, over the past few weeks, we have noticed that some banking banking apps are able to identify Magisk even if the Magisk Hide is enabled. Owing to a similar reason, passing the Play Integrity is also causing issues the maximum in Magisk, when compared with KernelSU or APatch [though these reports are few and far in between].
FAQ 2: Can I Flash Boot.img for Rooting Pixel 9
No, you cannot flash the boot.img for rooting your Pixel 9 device. Any device that came with Android 13 or higher versions out of the box will have to use the init_boot.img file for rooting. Devices shipped with Android 12 or older versions can only use the boot.img for rooting.
FAQ 3: Can I Temporary Boot Init_Boot.img
No, as opposed to a patched boot.img file, you cannot temporarily boot a patched init_boot.img file. You have no choice but to permanently flash the file at one go.
FAQ 4: Pixel 9 Stuck in Bootloop While Rooting
If your Pixel 9 is stuck in a bootloop or softbrick state while rooting, then here’s how to fix this issue:
- First off, extract the stock init_boot from the firmware.
- It should be the same one that is currently installed on your device.
- Then transfer that file to the platform-tools folder.
- Now use the hardware key combo to reboot your device to Fastboot Mode
- Then open a Command Prompt window inside the platform-tools folder.
- Now type in the below command to flash the stock init_boot:
fastboot flash init_boot init_boot.img
- Finally, use the below command to boot your device to the OS:
fastboot reboot
- That’s it. Your device will now reboot to the non-rooted OS.