What is KernelSU
KernelSU is a root solution for Android devices that beholds a Generic Kernel Image, it works in kernel mode and grants root permission to applications directly in the kernel space. Similar to how you could flash a single GSI file to any project treble device, similarly you will be able to root your device via a generic kernel image. There is just one requirement for this tweak to work- your device should have a GKI Kernel [we will show you how to check that as well]. Moroever, since this is kernel-based aka it works in kernel mode, so it can easily provide a kernel interface that will allow you to open floodgates to a plethora of tweaks such as adding a hardware breakpoint to any process in kernel mode
The Prerequisites to Root Android Device via KernelSU
Before proceeding ahead, please take a backup of all the data on your device. 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: Check if Device has GKI Kernel
STEP 2: Download Android SDK Platform Tools
Next up, you have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.
STEP 3: Enable USB Debugging and OEM Unlocking
Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking.
So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Developer Options > Enable USB Debugging and OEM Unlocking.
STEP 4: Find the Kernel Module Interface
First off, let’s find the kernel module interface for the kernel installed on your device. All the kernels that have the same KMI are cross-compatible [hence the term Generic in GKI Kernel]. NOTE: The SubLevel in the kernel version is not part of the KMI. So 5.10.137-android13-4-gebdbc9fbe2e2 has the same KMI as 5.10.149-android13-4-gebdbc9fbe2e2.
Install KernelSU via TWRP and Root Android
The benefit of this method is that it’s quite easy to execute. But on the flip side, not every device has a working custom recovery like TWRP. If yours has one, then let’s get started.
Install KernelSU via Boot.img and Root Android
This is the generic method of installing and rooting your Android device via KernelSU and is supported across all GKI kernels. On the flip side, it is the lengthiest and most technical method out of the three out there.
Automatic Approach
This is for those sets of users who are aware of the kernel compression format of your official boot.img [such as gz for Xiaomi devices]. if you are;t aware of this, then please try out the manual approach
Manual Approach
If you are not sure of the format or if the patched boot.img is not available for your device [such as Pixel uses lz4_legacy, for which the boot.img is not present], then you’ll have to manually get this job done, as explained below:
Install KernelSU via Kernel Flasher and Root Android
The benefit of this method is that it’s extremely easy to carry out. However, its prerequisite is its biggest drawback- your device needs to eb rooted beforehand. So in what case will it come in handy? Well, if you have installed an older version of KernelSU and want to update it to the latest version, then this should be your go-to choice. That’s it. These were the three different methods that should help you root your Android device via KernelSu. 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.
How to Extract Boot.img for Root via DSU SideloaderHow to Freeze Apps on your Android Device [Without Root]Signature verification failed: How to Sideload Magisk & Root [Video]How to Set up and Run Shizuku [Wireless Debugging, Root, ADB]