In recent times, the preferred way of installing Magisk and rooting your Google Pixel device is by patching the stock boot image via Magisk and flashing the resulting patched boot image. This method is pretty simple and does not necessarily rely on an external utility like TWRP. To use this method, you’ll first have to acquire the stock boot image. The great thing is Google provides factory images of the firmware/software versions released for their Pixel smartphones. In this guide, you will get to know how to get Stock Boot Image for Google Pixel devices.
How to get Stock Boot Image for Google Pixel devices
Step 1: Verify the build number
The first step would be to verify the build number, which is also referred to as the software version. For doing that, head over to Settings before going to “About Phone” on your Pixel device. After that, scroll down to the bottom and locate the “Build Number” entry. The text below the label will be the software’s build number. You should write down the build number as you’ll need it in the next step.
Step 2: Download the Factory Image for your Pixel device
The next step would be to download the factory image for your Google Pixel device. For doing that, you should visit the official Google portal on your computer or your phone.
After that, scroll down through the page before finding the section for your Pixel smartphone. There will be a table below the device label that includes the download links of factory images for corresponding Android versions and their build numbers.
You should look for the factory image for the build number you wrote down in the previous step. You can manually look it up or use the search function of the web browser. Once you’ve found it, you should click on the “Link” to download the factory image that corresponds to your build number.
Step 3: Extract the Stock Boot Image
Once you have the correct factory image as per the installed software build number, it’ll be time to finally extract the boot image from it. The factory image is essentially a compressed ZIP archive and the file makes use of the following naming convention -> device codename – build number – factory – random string.zip. For instance, the factory image for the Google Pixel 7 Pro with the TQ1A.2204305.002 build number will be named: cheetah-TQ1A.2204305.002-factory-34d93cd.zip.
The factory image archive features the image files for the bootloader, a few flash scripts, and another ZIP archive. The ZIP archive among the extracted file will contain the stock boot image alongside other partition image files. For reference, you can call this the partition image archive.
Lastly, you’ll need to unzip and extract the boot image from the factory image on your Pixel smartphone. That’s it, the extracted directory will have to stock boot image for your Pixel smartphone.