Skip to content

Conversation

@YuKongA
Copy link
Collaborator

@YuKongA YuKongA commented Nov 9, 2025

@YuKongA YuKongA force-pushed the flash branch 2 times, most recently from 2577988 to 0ff79ff Compare November 9, 2025 10:45
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 adds partition selection functionality for boot patching, allowing users to manually choose which partition (init_boot, boot, or vendor_boot) to flash. It also introduces new CLI commands for querying boot information such as slot suffixes, available partitions, and device paths.

Key changes:

  • Added partition override parameter to boot patch CLI and backend logic
  • Implemented new boot-info subcommands for querying device information
  • Enhanced UI with dropdown for partition selection in install screen

Reviewed Changes

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

Show a summary per file
File Description
userspace/ksud/src/cli.rs Added partition parameter to patch command and new boot-info subcommands (is-ab-device, default-device, default-partition, available-partitions, slot-suffix); renamed SupportedKmi to SupportedKmis
userspace/ksud/src/boot_patch.rs Added partition parameter throughout patch flow; implemented new public functions for boot device/partition selection and slot suffix handling; refactored logic into reusable functions
manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt Converted isAbDevice to suspend function using new CLI; added new suspend functions for partition/device queries; removed unused imports
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Install.kt Added partition selection dropdown with animated visibility; replaced isInitBoot() with getDefaultPartitionName(); converted isAbDevice to suspend call
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Flash.kt Added partition parameter to FlashBoot data class and installBoot call
manager/app/src/main/res/values/strings.xml Added install_select_partition string resource
manager/app/src/main/res/values-zh-rCN/strings.xml Added Chinese translation for install_select_partition; simplified install_inactive_slot_warning text
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Module.kt Reordered import for DropdownImpl
manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt Removed unused import
Comments suppressed due to low confidence (1)

userspace/ksud/src/boot_patch.rs:689

  • The slot suffix calculation logic is duplicated from the get_slot_suffix function (lines 777-787). Consider refactoring find_boot_image to call get_slot_suffix(ota) instead of duplicating this logic.
        let mut slot_suffix =
            utils::getprop("ro.boot.slot_suffix").unwrap_or_else(|| String::from(""));

        if !slot_suffix.is_empty() && ota {
            if slot_suffix == "_a" {
                slot_suffix = "_b".to_string()
            } else {
                slot_suffix = "_a".to_string()
            }
        };

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

@Ylarod Ylarod merged commit 37fa8fc into tiann:main Nov 9, 2025
23 checks passed
KOWX712 pushed a commit to KOWX712/KernelSU that referenced this pull request Nov 10, 2025
@YuKongA YuKongA deleted the flash branch November 19, 2025 00:24
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 3, 2026
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 3, 2026
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 5, 2026
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.

direct install and install to inactive slot fails

2 participants