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:
@@ -75,7 +75,7 @@ class MainActivity : ComponentActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val isManager = Natives.isManager
|
||||
if (isManager) {
|
||||
if (isManager && !Natives.requireNewKernel()) {
|
||||
install()
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user