r/androidroot • • 1d ago

Support Help KernelSU Next

Hey guys! I'm a bit new to rooting, mainly using Magisk right now. I'd love to switch to KernelSU Next but since my device isn't fully supported, I'm a little confused about getting started. I've got a Redmi Note 9, the kernel is 4.14.186, and I'm not sure exactly where to begin with the migration. Any help you could offer would be amazing!

1 Upvotes

2 comments sorted by

1

u/Holiday_Data6868 14h ago

Your kernel is pre-GKI, unlike modern kernels that have LKM mode, yours needs the KernelSU code to be compiled directly into the kernel itself, why? Because you don't have the standard LKM interface, with an LKM you load a .ko module into the kernel at runtime because GKI kernels (5.10+) can load external modules, KernelSU-Next needs hooks inside the kernel (functions that intercept system calls such as su) In 4.14 they don't exist, so the KernelSU .ko module simply won't load because it has no way to hook into the kernel. What does this mean? It boils down to this:

You'll need to obtain the kernel sources Apply the KernelSU-Next patches curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash -s next

And then compile it for arm64, you'll need the Android toolchain (clang + binutils) Then package the compiled kernel into a boot.img or init_boot.img, and flash it onto your phone using Odin