manager: if manager incompatible with current kernel, don't save ksud (#2895)

I think we should'nt install kernelsu's userspace when manager
incompatible with current kernel
this maybe cause a lot of bug, for example, when user install 2.x
kernelsu manager, but not update
his kernel to 2.x, ksud will return "kernel version 0", because ksud
incompatible with old supercall impl
This commit is contained in:
AlexLiuDev233
2025-11-09 19:34:35 +08:00
committed by ShirkNeko
parent cda7e4c6c0
commit 36862d6175
2 changed files with 6 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
val isManager = Natives.isManager
if (isManager) {
if (isManager && !Natives.requireNewKernel()) {
install()
}

View File

@@ -322,6 +322,11 @@ fun installBoot(
// if boot uri is empty, it is direct install, when success, we should show reboot button
onFinish(bootUri == null && result.isSuccess, result.code)
if (bootUri == null && result.isSuccess) {
install()
}
return result.isSuccess
}