Refactoring Kconfig to optimize KernelSU-related configuration and simplify conditional dependency logic
This commit is contained in:
@@ -1,60 +1,59 @@
|
||||
menu "KernelSU"
|
||||
|
||||
config KSU
|
||||
tristate "KernelSU function support"
|
||||
depends on OVERLAY_FS
|
||||
default y
|
||||
help
|
||||
Enable kernel-level root privileges on Android System.
|
||||
To compile as a module, choose M here: the
|
||||
module will be called kernelsu.
|
||||
tristate "KernelSU function support"
|
||||
depends on OVERLAY_FS
|
||||
default y
|
||||
help
|
||||
Enable kernel-level root privileges on Android System.
|
||||
To compile as a module, choose M here: the
|
||||
module will be called kernelsu.
|
||||
|
||||
config KSU_DEBUG
|
||||
bool "KernelSU debug mode"
|
||||
depends on KSU
|
||||
default n
|
||||
help
|
||||
Enable KernelSU debug mode.
|
||||
bool "KernelSU debug mode"
|
||||
depends on KSU
|
||||
default n
|
||||
help
|
||||
Enable KernelSU debug mode.
|
||||
|
||||
config KSU_MANUAL_HOOK
|
||||
bool "Manual hooking GKI kernels without kprobes"
|
||||
depends on KSU && KSU != m
|
||||
depends on KPROBES
|
||||
default y if KSU_GKI_KERNEL
|
||||
default n
|
||||
help
|
||||
Keep KPROBES enabled but do not use KPROBES to implement
|
||||
the hooks required by KernelSU, but instead hook them manually.
|
||||
This function is automatically enabled for GKI kernels.
|
||||
bool "Manual hooking GKI kernels without kprobes"
|
||||
depends on KSU && KSU != m
|
||||
default n
|
||||
help
|
||||
Keep KPROBES enabled but do not use KPROBES to implement
|
||||
the hooks required by KernelSU, but instead hook them manually.
|
||||
This function is automatically enabled for GKI kernels.
|
||||
|
||||
config KSU_GKI_KERNEL
|
||||
bool
|
||||
default y if (VERSION >= 5 && PATCHLEVEL >= 10)
|
||||
help
|
||||
Internal flag to indicate whether the kernel is GKI.
|
||||
bool
|
||||
default y if (VERSION >= 5 && PATCHLEVEL >= 10)
|
||||
help
|
||||
Internal flag to indicate whether the kernel is GKI.
|
||||
|
||||
config KSU_HOOK_KPROBES
|
||||
bool
|
||||
default y if !KSU_MANUAL_HOOK
|
||||
default n
|
||||
help
|
||||
Internal flag to indicate whether KPROBES should be used for hooking.
|
||||
bool
|
||||
depends on KPROBES
|
||||
depends on KSU_GKI_KERNEL
|
||||
default y if !KSU_MANUAL_HOOK
|
||||
help
|
||||
Internal flag to indicate whether KPROBES should be used for hooking.
|
||||
|
||||
config KSU_ALLOWLIST_WORKAROUND
|
||||
bool "KernelSU Session Keyring Init workaround"
|
||||
depends on KSU
|
||||
default n
|
||||
help
|
||||
Enable session keyring init workaround for problematic devices.
|
||||
Useful for situations where the SU allowlist is not kept after a reboot
|
||||
bool "KernelSU Session Keyring Init workaround"
|
||||
depends on KSU
|
||||
default n
|
||||
help
|
||||
Enable session keyring init workaround for problematic devices.
|
||||
Useful for situations where the SU allowlist is not kept after a reboot
|
||||
|
||||
config KPM
|
||||
bool "Enable SukiSU KPM"
|
||||
default n
|
||||
help
|
||||
Enabling this option will activate the KPM feature of SukiSU.
|
||||
This option is suitable for scenarios where you need to force KPM to be enabled.
|
||||
but it may affect system stability.
|
||||
bool "Enable SukiSU KPM"
|
||||
default n
|
||||
help
|
||||
Enabling this option will activate the KPM feature of SukiSU.
|
||||
This option is suitable for scenarios where you need to force KPM to be enabled.
|
||||
but it may affect system stability.
|
||||
|
||||
menu "KernelSU - SUSFS"
|
||||
config KSU_SUSFS
|
||||
|
||||
Reference in New Issue
Block a user