Home » Google » Pixel 2 » How to Restore the Stock Kernel on the Pixel 2 and Pixel 2 XL
Pixel 2 Restore Stock Kernel

How to Restore the Stock Kernel on the Pixel 2 and Pixel 2 XL

With the introduction of the dual partition system, restoring the boot image (aka the kernel) isn’t as straightforward as it used to be. Still, the process isn’t very difficult once you know what to do so this tutorial will show you how to flash the original boot.img 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 kernel we just need to execute one command and that was it.

Now that we have two different boot partitions though, we have to do a second one to make sure both partitions have the same stock boot.img contents.

Related:
Dozens of premium Android apps go on sale every single day. Check out the latest over at PlayStoreSales.com.

This is useful if you have installed a custom kernel, or a mod (such as Magisk) which modifies the kernel file so that it will work. Naturally, modifying the kernel file prevents you from accepting an OTA update so if these are the only modifications you’ve made to the Android system then you can restore the Pixel 2 stock kernel. This will then allow you to download and install that official OTA update pushed from Google so that you can keep all of your data.

Requirements:
Before you can complete the tutorial below, you first need to install and enable a few things ahead of time.

 - You need ADB & Fastboot tools installed on your PC. I recommend Minimal ADB & Fastboot, but you could just use Android's SDK Platform Tools which are provided by Google.
 - Next, you will need to enable Android's Developer Mode on your smartphone.
 - Then, you'll want to go ahead and enable USB Debugging Mode on the device as well.
 - Don't forget to make sure your PC can detect the smartphone using the ADB devices command.

Pixel 2 Restore Stock Kernel

  1. Download the same version of Android you have from Google
  2. Extract the contents of that ZIP file
  3. Go into the folder that it extracts and then extract the contents of the second ZIP file
  4. You should see a boot.img extracted from that second ZIP file
  5. Copy/move the boot.img file to the same folder as your ADB and Fastboot tools are in
  6. Launch a Command Prompt (or Windows Powershell) from that folder
  7. Boot the Pixel 2 into Fastboot Mode
  8. Connect a USB cable from the Pixel 2 to the PC
  9. Type the following command. . .
  10. fastboot flash boot_a boot.img
  11. And press Enter on the keyboard
  12. Wait a few seconds for it to complete
  13. Then type out this second command. . .
  14. fastboot flash boot_b boot.img
  15. And again, press Enter on the keyboard.
  16. Now reboot back into Android and you will be using the stock kernel 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.


Explanation

Because of how secure Android has been getting these days, a lot of major modifications require that a modification be made to the boot image. Off the top of my head, I know that TWRP, Magisk, SuperSU and likely Xposed Framework all made modifications to the kernel. The results are the same if you’re using a custom kernel too. Custom kernels can add extra performance or extra battery life to a device but they prevent you from accepting an official OTA update.

With this guide above, you can get rid of any changes made to your kernel and switch back to the stock Pixel 2 boot.img so you can accept an OTA update. I will say that you may have installed other mods that have changed the Android system and will prevent an OTA update. So be aware that restoring back to the stock Pixel 2 kernel isn’t a one trick solution. If you’ve installed other mods (especially Xposed Modules) then they could have also made changes that will prevent you from accepting that OTA update.

Pixel 2 Restore Stock Kernel Success
Make sure you flash the boot.img file to both of the boot partitions on the Pixel 2 and Pixel 2 XL.

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 boot image to both boot partitions (a and b) and can restart the phone back into Android.

Unless you made previous changes to Android with root or other mods, you should now be able to accept that official OTA update. Once it 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 was helpful, please consider supporting the website in any number of ways.

Donations help a lot, but simply sharing & liking things that have helped or are of interest to you (on places like Reddit, Facebook, YouTube) while following & subscribing to Android Explained accounts on sites like Facebook, YouTube can help too.

If you run into any issues with this guide though, please leave a comment to let me know. This will enable me to keep all Android tutorials as up to date as possible.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top