Rooting is a process of enabling administrative access to the Android operating system devices. Activating the root access allows Android device users to bypass specific restrictions configured by smartphone OEMs. Due to user safety and data privacy, manufacturers don’t allow tweaking Android subsystems. So, if you want to enable full control over your Android handset, don’t worry. Here you can check out How to Root Android Devices via KernelSU.
Magisk is a reliable and popular way to root Android devices that don’t break Android subsystem files and easily bypass Google’s safety protocols like online banking. Well, KernelSU also become one of the best rooting solutions for Android. However, it’s not a system-level rooting procedure, as we get in Magisk. Luckily, KernelSU creates more control over Android apps and subsystems than Magisk. So, if you haven’t heard of KernelSU yet, this article is for you.
Page Contents
What is KernelSU?
As the name suggests, KernelSU comes under the Linux kernel that lets users more control over installed applications. Only permitted apps may allow `su` and other apps won’t notice it. KernelSU offers customization of `su` uid, gid, groups, capabilities, and SELinux rules. KernelSU Modules may modify /system
using overlayfs
systemlessly.
KernelSU is a new rooting solution for Android devices that enables root permissions at the kernel level directly. It allows more advanced rooting access than the traditional method. KernelSU supports Android GKI (Generic Kernel Image) devices and is easily customizable to older kernels. The best part is that it doesn’t modify system files and makes the rooted device stable.
Key Features of KernelSU
Here we’ve mentioned a couple of key features of KernelSU below that you should go through to understand things better.
1. Kernel-Based Root Management:
It works with the kernel level that allows root access directly to improve overall security and control.
2. Customizable Root Privileges:
Rooted users can easily customize multiple attributes of the root user (`su`) such as user ID, group ID, capabilities, SELinux rules, etc.
3. Module System:
As compared to Magisk, the KernelSU method uses a module system via OverlayFS which enables modifications to the `/system` directory without tweaking the original system partition.
4. Compatibility:
The KernelSU officially supports GKI 2.0 devices (kernel 5.10+) and older kernels (4.14+). Do keep in mind that older kernels require manual adjustments. It’s open-source and comes under the GPL-3.0 license.
Difference Between KernelSU GKI Mode and LKM Mode
There are two different KernelSU modes available that you can use to root your Android handset Generic Kernel Image (GKI) and Loadable Kernel Module (LKI). The GKI mode brings the original kernel of the Android device that will be replaced with the generic kernel image. Whereas the LKM mode is the handset’s original kernel, which isn’t replaceable and the loadable kernel module will be loaded into the device kernel.
Advantages of GKI Mode
- GKI module is compatible with a wide range of devices as compared to LKM.
- You don’t have to depend on the device manufacturer to release kernel updates.
Advantages of LKM Mode
- To adjust the stock kernel or use a custom kernel, LKM mode is a better option.
- The LKM mode will be easy enough to update devices and install OTA updates as compared to GKI.
- By using LKM mode, you’ll be able to enable root permissions temporarily. So, whenever required, you can disable the root access.
Please Note: For an Android device, LKM is good. For an Emulator or Windows Subsystem, you can use GKI.
How to Root Android Devices via KernelSU
Before jumping into the steps, ensure to follow all requirements properly to avoid potential errors while or after installing root. So, without further ado, let’s get into it.
Disclaimer: GetDroidTips won’t be held responsible for any kind of error that may happen during or after installing the root access on your respective device. Make sure to take a complete backup of the data and then follow the steps completely.
Requirements:
- Keep more than 50% of the battery level.
- A computer and a USB data cable are required.
- Download and Install Android SDK Platform Tools for Windows or Mac.
- Install the latest Android USB Drivers on your PC.
- Download the stock ROM file for your device model on your PC depending on the region/variant. [same version is required]
Step 1: Check for GKI Kernel
So, you’ll have to verify whether your Android handset has a GKI Kernel. To do so, check the steps below:
- Download and Install the KernelSU app via GitHub.
- Launch the KernelSU app > If it shows ‘Not Installed’, you can root your device via KernelSU.
- If it shows ‘Unsupported’, your device doesn’t support root via KernelSU.
- Once you’re confirmed, you can head over to the next method.
Step 2: Download ADB SDK Platform Tools
- We’ve already provided the ADB SDK Platform Tools download link in the requirements section, so make sure to download it on your computer.
- The full guide is provided in the same article.
Step 3: Turn On USB Debugging and OEM Unlocking
- Now, you’ll have to manually turn on the USB Debugging option on your Android handset which comes hidden from the OEM. It opens up multiple developer settings that you can use.
- You can check this guide to Enable USB Debugging and OEM Unlocking on your Android device.
- Once done, go to the next method.
Step 4: Unlock the Bootloader on your Device
To install root access on your Android phone, you must unlock the bootloader first. The bootloader comes locked out of the box from the manufacturer. You can check the complete guide here to unlock the device bootloader.
Step 5: Locate the Kernel Module Interface
You’ll have to discover the kernel module interface for the installed kernel on your handset. To do so, check the steps below:
- Open the KernelSU app > Check the Kernel Version.
- Go to your device Settings > About Phone > Kernel version to check for the same.
Note: If the Kernel version is 5.10.149-android13–4-00003-gebdbc9fbe2e2, the KMI version will be 5.10-android13-4.
Step 6: Verify the Security Patch Level
Along with the kernel module interface (KMI) version, you should also check the security patch level installed on your device. It means you shouldn’t download a kernel that has a lower security patch version. The kernel’s security patch version should be similar to the installed security patch level on the handset. Having a different security patch version can lead to device bootloop or bricking.
Steps to Root Android Devices via KernelSU LKM
You can use multiple methods to enable root access on an Android device via LKM in KernelSU. Choose the method that suits you best.
Via Stock Firmware
- Download the patched boot.img file to your device’s GKI from Github.
- You may find multiple kernels for a similar KMI. But the kernel compression format will be different.
- Once you got the boot.img file, transfer it to the ADB Platform Tools folder on the PC.
- Ensure to attach your device to the PC via a USB cable.
- Next, open the command prompt window inside the ADB Platform Tools folder.
- Then type the command below and hit Enter to boot your device to the Fastboot Mode:
adb reboot bootloader
- Now, run the following command line to temporarily boot via the patched boot.img:
fastboot boot boot.img
- If your device boots on the system, verify it. If yes, this is a temporary root.
- If it doesn’t, reboot your device, and it’ll boot to the non-rooted system.
You can either launch the KernelSU app > Tap on Install > Hit Direct Install > Reboot the device.
OR, boot to Fastboot Mode > Type the following command to permanently flash the boot.img:
fastboot flash boot boot.img
- Run the command below to boot your Android handset to the rooted operating system:
fastboot reboot
- Once done, wait for the device to boot.
- Open the KernelSU app and you’ll get the ‘Working’ status.
Via KernelSU Manager
In case, your Android handset doesn’t support the fastboot boot or the kernels aren’t compatible with your handset, make sure to follow this specific method.
- Launch the KernelSU Manager app.
- Tap on the Install icon at the top right corner.
- Choose Select and patch a file.
- Then select the official stock firmware file.
- KernelSU will patch it immediately.
- Now, transfer the patched file to the ADB platform tools folder on the PC.
- Open the Command Prompt window inside the folder.
- Run the following command by pressing the Enter key:
adb reboot bootloader
- You can execute the command below to flash the KernelSU patched boot:
fastboot flash boot boot.img
- Then use the following command to boot your device to the rooted system:
fastboot reboot
- Once done, launch the KernelSU app and check for success.
Install Directly
If your Android handset is already rooted, you can check this method to upgrade the KernelSU. Select this option and the KernelSU Manager will automatically fetch the device information, patch the official firmware, and install it. Now, your device will boot into the upgraded KernelSU module.
Install to Another Partition
You can use this specific method if you want to keep the root access after installing the OTA update on your device. Make sure that your device should support an A/B partition (You can use the Treble Info app to check for it). Now, you can follow the steps below to install to another partition:
- Download and Install the OTA update on your device.
- Launch the KernelSU app > Tap on the Install icon at the top right corner.
- Hit Install to Another Partition.
- The KernelSU Manager will now automatically patch the official firmware.
- Next, install it to another partition.
- Wait for it to complete and restart the phone.
- The slots will be changed and your handset will boot to the rooted system.
Steps to Root Android Devices via KernelSU GKI
You can check this method under GKI Mode to root your Android device.
Via Boot.img by KernelSU
If you can verify the kernel compression format and your device supports the fastboot boot command, you can follow this method.
- Download the accurate boot.img file from GitHub with the KMI version of your kernel.
- Check the kernel compression format as per your device for the stock boot.img file.
- Next, download the file > Transfer this boot.img file to the adb platform-tools folder on your PC.
- Open the Command Prompt window inside the platform-tools folder.
- Type the command below and hit Enter to boot your device to Fastboot Mode:
adb reboot bootloader
- If your device is compatible with the temporary boot, you can use the command below to temporarily boot your device to the rooted system.
fastboot boot boot.img
- If everything works well, you can proceed to permanent installation.
Note: In case, the device gets stuck in a bootloop, simply reboot your device. The patched boot will replace the stock firmware and your device will boot to the non-rooted system. Then you can try any other method to root it.
- If your device doesn’t support fastboot boot or doesn’t, you can use two different ways to root your device permanently.
- Launch the KernelSU app > Tap on Install > Select Direct Install > Reboot the device.
OR, boot your device to Fastboot Mode and run the command below to permanently flash the boot.img file:
fastboot flash boot boot.img
- Run the command below to boot your device to the rooted system:
fastboot reboot
- Wait for the device to boot.
Install KernelSU via TWRP and Root Android
You can install KernelSU to root your Android handset by TWRP. But not every device model has an official TWRP file. So, if your handset has TWRP access, you can follow this specific method.
- Download the TWRP from the official website or via XDA Developers for your device model.
- Now, follow this complete guide to install TWRP on your handset.
- Download AnyKernel3 ZIP according to the KMI version.
For Example, If your KMI is 5.10.149-android13-4, you should download AnyKernel3-android13-5.10.149_yyyy-mm.zip.
- Once downloaded, transfer it to your device.
- Launch the Command Prompt inside the platform-tools folder.
- Type the following command and hit Enter to boot your device to TWRP:
adb reboot recovery
- Tap on Install > Select the kernel.zip file.
- Make a right swipe to flash it.
- Once done, go to Reboot > Select System.
- Now, your Android device will boot to the rooted system.
- Open the KernelSU app and check for the status.
How to Flash Modules via KernelSU
Check out the steps below to flash a module ZIP file using KernelSU.
- Download the specific module ZIP file to your device.
- Launch the KernelSU app > Go to Modules.
- Tap on Install > Go to the module (zip).
- Please select it and the file will be flashed.
- Please wait for it to complete.
- Then tap on the Reboot button.
- Once your device boots into the system, modules will be enabled.
That’s it, guys. We assume this guide was helpful to you. For further queries, you can comment below.