For example, you could overclock or underclock the device’s CPU/GPU, select from a plethora of CPU governor profiles depending on whether you give higher preference to battery life or to usage performance, force fast charging (if supported by the chipset), tweak the memory, enable certain schedulers or create your own custom tunables. Along the same lines, some devices (such as Pixel 4A) require you to flash a custom kernel that supports (LZMA/LZ4 Ramdisk) before you could install a custom recovery like TWRP. Hence owing to all these benefits, these kernels are still in demand. So if you are also in the same boat and wish to flash or install a custom kernel on your Android device, then this guide is here to help you out. Follow along for the instructions.

How to Flash a Custom Kernel in Android via its Config File

There exist two different methods through which you could flash a custom kernel- via TWRP and using the kernel’s configuration file. As far as this guide goes, we will be focusing on the latter method. This is because nowadays many devices require you to have a custom kernel installed before you could flash the TWRP (because of the LZMA/LZ4 Ramdisk support). So this would straightaway nullify the method of flashing kernel via TWRP. As a result, the only method that we would have is to flash via its config file. Owing to this reason, we will show you the steps to flash or install a custom kernel on your Android device. Follow along. 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.

STEP 1: Root your device

First and foremost. your device needs to be rooted. You could either do so by flashing Magisk ZIP via TWRP or patching the Magisk boot.img via Magisk and flashing it via Fastboot.

Considering most of you might not be having a custom recovery installing, you could opt for the second (patch and flash) method. We have shared the resources for both these methods, you may refer to the one that is in sync with your requirement:

Root without TWRP

How to Root Android 12 via Magisk patched boot.img (without TWRP)Root Android 11 via Magisk Patched boot.img (without TWRP)Patch Stock Boot Image via Magisk and Flash it using Fastboot

Root Using TWRP Recovery

How to Root Android Devices via TWRP RecoveryGuide to Install TWRP Recovery on AndroidHow to Flash Stock and Magisk Patched Boot.img via TWRP

STEP 2: Download a Kernel Manager app

STEP 3: Copy the Kernel Config File’s URL

You will now have to download your custom kernel’s configuration file URL. In this regard, most of the developers over at XDA Developers tend to upload their kernel’s JSON configuration file URL along with the flashable ZIP. So all you need to do is just copy that URL (no need to download that JSON file). As for reference, here’s the BlueSpark custom kernel for Pixel 4A where the Dev has shared the config URL’s file as well.

STEP 4: Take a Backup of Stock Kernel

[From now on, we will be listing the steps using the Franco Kernel Manager. The steps for other Kernel Manager apps should be along the same lines as well]. Let’s start off with taking a backup of the current stock kernel so that if anything goes south after flashing the custom kernel, we could easily restore the stock one.

That’s it. You have successfully taken the backup of the Stock Kernel. Let’s now proceed ahead with the steps to flash the custom kernel on your Android device.

STEP 5: Flash Custom Kernel on Android via its Config File

So with this, we round off the guide on how you could flash or install a custom kernel on your Android device using the config file. 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 at the earliest.

About Chief Editor

How to Flash a Custom Kernel in Android - 56How to Flash a Custom Kernel in Android - 38How to Flash a Custom Kernel in Android - 93How to Flash a Custom Kernel in Android - 37How to Flash a Custom Kernel in Android - 7How to Flash a Custom Kernel in Android - 72How to Flash a Custom Kernel in Android - 28