Skip to content

Conversation

@AlexLiuDev233
Copy link
Contributor

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

@AlexLiuDev233 AlexLiuDev233 changed the title feat: if manager incompatible with current kernel, don't save ksud manager: if manager incompatible with current kernel, don't save ksud Nov 9, 2025
@tiann
Copy link
Owner

tiann commented Nov 9, 2025

This will cause lots of bug too.
If user uses manager 2.0 and then upgrade kernel in manager, and then reboot, the ksud is the old one and cannot communicate with the kernel.

@AlexLiuDev233
Copy link
Contributor Author

AlexLiuDev233 commented Nov 9, 2025

This will cause lots of bug too. If user uses manager 2.0 and then upgrade kernel in manager, and then reboot, the ksud is the old one and cannot communicate with the kernel.

hmmm, maybe i need add a ksud update when user update kernel to solve this problem? i will write a new commit

@AlexLiuDev233
Copy link
Contributor Author

@tiann can you review again?

@aviraxp aviraxp requested a review from Copilot November 9, 2025 09:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors when the KernelSU daemon (ksud) installation occurs, moving it from app startup to after successful direct boot installations, with additional guards for outdated kernels.

  • Moved install() call from MainActivity.onCreate() to installBoot() when direct installation succeeds
  • Added kernel version check to prevent install() from running when kernel is outdated
  • Fixed code style issue (removed unnecessary semicolon)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt Moved install() call to occur after successful direct boot installation instead of at app startup; removed semicolon from getRootShell() call
manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt Added kernel version check to prevent install() from running when requireNewKernel() returns true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ylarod Ylarod merged commit 13390ba into tiann:main Nov 9, 2025
KOWX712 pushed a commit to KOWX712/KernelSU that referenced this pull request Nov 10, 2025
…tiann#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
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 3, 2026
…tiann#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
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 3, 2026
…tiann#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
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 5, 2026
…tiann#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants