Skip to content

Comments

manager: Allow patching for devices with other different KMI versions#3185

Merged
aviraxp merged 3 commits intotiann:mainfrom
u9521:patch-enhance
Feb 2, 2026
Merged

manager: Allow patching for devices with other different KMI versions#3185
aviraxp merged 3 commits intotiann:mainfrom
u9521:patch-enhance

Conversation

@u9521
Copy link
Contributor

@u9521 u9521 commented Jan 27, 2026

Allow manager to patch images for devices with other GKI kernels in different KMI version

u9521 added 2 commits January 27, 2026 22:16
- Enable the "Install" button on the Home screen even if the current device is not running a GKI kernel.
- Restrict installation methods to "Select File" for non-GKI devices, disabling direct and A/B partition installs.
- Update strings to clarify that non-GKI devices can still patch images for GKI-compatible devices.
- Redesign `ChooseKmiDialog` to use a selectable list (`SuperCheckbox`) instead of simple arrows, showing the current device's KMI and requiring a confirmation button.
- Ensure the KMI selection dialog is triggered when patching a file or the KMI is unknown and LKM is not selected.

Signed-off-by: u9521 <[email protected]>
Ensure `kmi` returns an empty string instead of attempting to detect the current KMI if `kmod` is provided.

Signed-off-by: u9521 <[email protected]>
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 enables patching of boot images for devices with different KMI (Kernel Module Interface) versions, allowing users on non-GKI devices to create patched images for GKI devices, and vice versa.

Changes:

  • Modified boot patching logic to skip KMI validation when a custom kernel module is provided
  • Updated UI to allow install operations on non-GKI devices for patching external images
  • Refactored KMI selection dialog with improved checkbox-based UI
  • Added localized strings to guide users through cross-device patching

Reviewed changes

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

Show a summary per file
File Description
userspace/ksud/src/boot_patch.rs Returns empty KMI string when kernel module is provided, bypassing KMI version checks
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Install.kt Forces KMI selection in select-file mode and restricts direct install to GKI devices only
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Home.kt Removes GKI check from install button to enable patching on non-GKI devices
manager/app/src/main/java/me/weishu/kernelsu/ui/component/ChooseKmiDialog.kt Refactors dialog from list-based to checkbox-based selection with improved state management
manager/app/src/main/res/values/strings.xml Adds English strings for non-GKI device patching guidance and KMI selection
manager/app/src/main/res/values-zh-rCN/strings.xml Adds Chinese translations for new patching features

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

- Add missing period to `home_unsupported_reason` in Simplified Chinese strings.
- Replace unused parameter with `_` in `ChooseKmiDialog` checkbox callback.

Signed-off-by: u9521 <[email protected]>
@aviraxp aviraxp merged commit 2ba64dc into tiann:main Feb 2, 2026
18 checks passed
bklynali pushed a commit to bklynali/BK-KSU that referenced this pull request Feb 2, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
selfmusing pushed a commit to selfmusing/USlenreK that referenced this pull request Feb 2, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
selfmusing pushed a commit to selfmusing/USlenreK that referenced this pull request Feb 2, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
@u9521 u9521 deleted the patch-enhance branch February 3, 2026 01:31
u9521 added a commit to u9521/KernelSU that referenced this pull request Feb 3, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

selection dialog add clip
---------

Signed-off-by: u9521 <[email protected]>
KOWX712 pushed a commit to KOWX712/KernelSU that referenced this pull request Feb 3, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
PhuScam pushed a commit to PhuScam/KernelSU that referenced this pull request Feb 5, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
PhuScam pushed a commit to PhuScam/KernelSU that referenced this pull request Feb 18, 2026
…tiann#3185)

Allow manager to patch images for devices with other GKI kernels in
different KMI version

---------

Signed-off-by: u9521 <[email protected]>
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.

3 participants