With the introduction of the dual partition system, restoring the recovery (after you have installed a custom recovery) isn’t as straightforward as it used to be. Still, the process is quite easy and so this tutorial will show you how to flash the original recovery back on your Pixel 2 smartphone.
The dual partition system that Google (and few other OEMs) have been using on their Android smartphone has created a hurdle for not only community developers, but also enthusiasts who want to tinker with their device. Before, if we wanted to restore the stock recovery then we just needed to grab the recovery.img file and flash it to the recovery partition. This isn’t how things work on the Pixel 2 and the Pixel 2 XL but there is a way to grab the file we need and flash the stock recovery back to our smartphone.
This is a tutorial that you would want to follow if you have installed a custom recovery so that you can create Nandroid backups, flash various mods, flash a custom kernel or even gaining root access. Naturally, modifying the recovery file prevents you from accepting an OTA update so the goal is to restore everything to how it was so that you can accept that OTA update. While I can’t know what other mods you have installed, if you can undo those changes and revert back to the Pixel 2 stock recovery then you can accept those official OTA updates again.
In order to complete the tutorial below, you're going to need some things setup ahead of time. Please follow the how to install ADB and Fastboot tools guide if you haven't done so already. You're also going to need to start the ADB service by executing the "adb devices" command (no quotes) in the Command Prompt. Lastly, you'll need to follow the how to enable Developer Mode guide, as well as the how to enable USB Debugging Mode guide, and make sure to grant USB Debugging access from the PC to your device.
Pixel 2 Restore Stock Recovery
- Download the same version of Android you have from Google
- Extract the contents of that ZIP file
- Go into the folder that it extracts and then extract the contents of the second ZIP file
- You should see a boot.img extracted from that second ZIP file
- Copy/move the boot.img file to the same folder as your ADB and Fastboot tools are in
- Launch a Command Prompt (or Windows Powershell) from that folder
- Boot the Pixel 2 into Fastboot Mode
- Connect a USB cable from the Pixel 2 to the PC
- Type the following command. . .
- fastboot flash boot_a boot.img
- And press Enter on the keyboard
- Wait a few seconds for it to complete
- Then type out this second command. . .
- fastboot flash boot_b boot.img
- And again, press Enter on the keyboard.
- Now reboot back into Android and you will be using the stock recovery file
This step by step tutorial is a detailed explanation of a topic I covered on my Pixel 2 Tips and Tricks article. I recommend you read through that if you're curious about learning the ins and outs of the Pixel 2 or Pixel 2 XL.
For years we have installed various mods on our Android devices by flashing a ZIP file in a custom recovery. This includes Magisk, SuperSU, Xposed Framework, custom ROMs, custom kernels, and many small UI tweaks from the developer community. But even if you haven’t installed any of those, just having TWRP installed as your custom recovery will prevent you from accepting an official OTA update from Google.
Again, I have no way of knowing what you have modded in your Android install with TWRP, but I can show you how to restore the stock recovery image. Your goal will be to undo any changes that you have made in the past and your final step to completing this is to restore the stock recovery. The way Google handles the Pixel 2 and the Pixel 2 XL, there isn’t a simple recovery.img file backed in the factory images of the latest Android update. The recovery is actually combined into the boot.img so we’ll be doing that as detailed in the guide above.
So to begin, we need to visit the website linked in Step 1 of the guide above. From here, you will need to find your device and then match up the build/firmware versions so you can download the sama version of Android you’re currently running. Extract this ZIP file and then extract the second ZIP to find the stock boot.img file that we need. This is where we move or copy the boot image file to the same folder as our ADB and Fastboot tools are in.
From here, boot the Pixel 2 or Pixel 2 XL into Fastboot Mode and then connect a USB cable to it from the PC. Now launch a Command Prompt or Windows Powershell in the same folder as these ADB/boot.img files and execute the command in Step 10 of the guide. After a few seconds you should get a couple of OKAY messages and then you can execute the command in Step 14 of the guide. With that done, we have restore the stock recovery image to both boot partitions (a and b) and can restart the phone back into Android.
Assuming you haven’t made any other changes to Android, you should now be able to accept that official OTA update. Once the OTA update is installed, you can then load up TWRP again, install Magisk or SuperSU and go back to the modded version of Android that you prefer.
If this tutorial helped you in any way, please consider donating at Patreon or PayPal. If you can't afford to donate then sharing this on social networks such as Facebook, Twitter, etc. will also help a lot.