Today I am going to show you how to restore the stock kernel boot.img file that the OnePlus 6 uses for OxygenOS.
There are a lot of reasons why someone would want to modify the stock boot image file that comes one the OnePlus 6. This boot image file is also referred to as the kernel and you may have already heard of the plethora of custom kernels that are available. Being able to take advantage of the battery saving or performance optimization kernels means that we need to replace the current boot.img file we have on the device. So if you ever find yourself wanting to go back to the stock kernel then you need to follow this tutorial.
However, there are other reasons why you may want to restore to the OnePlus 6 stock kernel too. Some of the more popular customization mods available for Android require that your OnePlus 6 boot.img file be modified so that it works properly. A bit example of this is any of the available root methods as each of them requires the stock kernel to be patched. The same is true with the custom recovery known as TWRP since the recovery is now part of the OnePlus 6 kernel and not in its own partition.
Again, there are many reasons why you would want to restore to the OnePlus 6 stock kernel boot image and this guide shows you exactly how to do it. This guide assumes you have a custom recovery to flash the boot.img file but I will explain how to do this via the command line in the Explanation section below.
How to Restore the OnePlus 6 Stock Kernel Boot.img
- Download the OnePlus 6 stock kernel for your version of OxygenOS
- Move or copy that file to the OnePlus 6
- Boot the OnePlus 6 into Recovery Mode
- Tap the Install button
- Browse to where your OnePlus 6 stock boot.img file is
- Tap the Install Image button at the bottom right
- Choose the OnePlus 6 stock boot image file that we downloaded
- Then pick the Boot partition
- And swipe the white arrows to the right to proceed
- So we can then tap the Reboot System button and boot us right back into Android
Note – Doing this in TWRP means that we only have to flash the stock kernel image to one partition slot because once we boot into Android it wipes any modifications to our boot image anyway. If you do the command line method listed below then you will need to do things for both partitions.
As mentioned, this guide assumes you have TWRP fully installed but you could actually temporarily boot into TWRP if you like. If you don’t have TWRP then it’s likely best for you to just restore the OnePlus 6 stock kernel from the command line. If that is the case for you, then download the OnePlus 6 boot.img file from Step 1 of the guide above and then move or copy it to the same folder you have your ABD and Fastboot tools in. You can then open up a command prompt from that folder to execute two commands since it uses the A/B partition system.
The first command you need to do is “fastboot flash boot_a boot.img” and then you will want to follow that up with the “fastboot flash boot_b boot.img” command. This ensures that you have replaced your current boot image file with the OnePlus 6 stock kernel for both the A and B partitions. The boot.img part will need to match the OnePlus 6 stock kernel filename that we downloaded. Also, you must remember that you need to flash the OnePlus 6 stock boot image that matches your version of OxygenOS.
If you have TWRP installed then the process is much easier to do. To do it the TWRP method we just need to download that file in Step 1 and then move or copy it to any place on the OnePlus 6. Then we can boot the device into Recovery Mode (which should be the TWRP main menu) and tap the Install button.
You can then browse to where you moved or copied the OnePlus 6 stock boot image file but you won’t actually see it there. First, you need to tap the Install Image button at the bottom right so that we can switch from ZIP view to IMG view. You should then see the OnePlus 6 stock boot.img file appear and then you can go ahead and tap it. It will then ask you which partition you want to flash it to and naturally we want to choose the Boot partition here. Just swipe the white arrows to the right after that and the process should be completed in a second or two.
Now, you have two choices to go from here. You could just tap the Reboot System button that appears at the bottom right of the screen. This will take you right back into the Android OS (although the boot cycle will take longer than normal) and you can go about your day. Or, you can tap the Home button before tapping the Reboot button and then tapping the Recovery button to reboot from TWRP back into Recovery Mode. I did this in the video to show you that we booted into TWRP before but now that the OnePlus 6 stock kernel image is restored you will now be taken into the stock OnePlus Recovery.
If this tutorial helped you in any way, please consider donating via PayPal, Patreon, Cryptocurrency, or GoFundMe. If you can't afford to donate then sharing this on social networks such as Facebook, Twitter, XDA, forums, etc. will also help a lot. I would also appreciate suggestions for Android tips and tutorials that you would like to see in the future.