Prioritize sukisu recognition.
Simplified manual hooks
This commit is contained in:
@@ -16,27 +16,12 @@ config KSU_DEBUG
|
||||
Enable KernelSU debug mode.
|
||||
|
||||
config KSU_MANUAL_HOOK
|
||||
bool "Manual hooking GKI kernels without kprobes"
|
||||
depends on KSU && KSU != m
|
||||
default n
|
||||
help
|
||||
Using manual hooks instead of KSU KPROBES hooks.
|
||||
By default the GKI kernel should use the KSU KPROBES hook.
|
||||
Non-GKI kernels should prioritize the use of manual hooks.
|
||||
|
||||
config KSU_GKI_KERNEL
|
||||
bool
|
||||
default y if VERSION >= 5 && PATCHLEVEL >= 10 || \
|
||||
VERSION >= 6
|
||||
help
|
||||
Internal flag for GKI kernel detection.
|
||||
|
||||
config KSU_HOOK_KPROBES
|
||||
bool
|
||||
depends on KSU && KPROBES && KSU_GKI_KERNEL
|
||||
default y if !KSU_MANUAL_HOOK
|
||||
help
|
||||
Internal flags for hooks based on KSU kprobes.
|
||||
bool "Manual hooking GKI kernels without kprobes"
|
||||
depends on KSU && KSU != m
|
||||
default n
|
||||
help
|
||||
If enabled, Hook required KernelSU syscalls with manually-patched function.
|
||||
If disabled, Hook required KernelSU syscalls with Kernel-probe.
|
||||
|
||||
config KSU_ALLOWLIST_WORKAROUND
|
||||
bool "KernelSU Session Keyring Init workaround"
|
||||
|
||||
@@ -52,13 +52,11 @@ $(info -- SukiSU Manager signature size: $(KSU_EXPECTED_SIZE))
|
||||
$(info -- SukiSU Manager signature hash: $(KSU_EXPECTED_HASH))
|
||||
$(info -- Supported Unofficial Manager: 5ec1cff (GKI) rsuntk (Non-GKI) ShirkNeko udochina (GKI and non-GKI and KPM))
|
||||
|
||||
ifeq ($(strip $(CONFIG_KSU_HOOK_KPROBES)),y)
|
||||
$(info -- SukiSU: KPROBES hooking enabled!)
|
||||
else
|
||||
ifeq ($(strip $(CONFIG_KSU_MANUAL_HOOK)),y)
|
||||
$(info -- SukiSU: Manual hooking enabled!)
|
||||
ifeq ($(strip $(CONFIG_KSU)),m)
|
||||
$(error CONFIG_KSU_MANUAL_HOOK cannot be enabled when compiling SukiSU as LKM!)
|
||||
endif
|
||||
else
|
||||
$(info -- SukiSU: KPROBES hooking enabled!)
|
||||
ccflags-y += -DCONFIG_KSU_KPROBES_HOOK
|
||||
endif
|
||||
|
||||
KERNEL_VERSION := $(VERSION).$(PATCHLEVEL)
|
||||
|
||||
@@ -28,11 +28,11 @@ static struct apk_sign_key {
|
||||
unsigned size;
|
||||
const char *sha256;
|
||||
} apk_sign_keys[] = {
|
||||
{EXPECTED_SIZE, EXPECTED_HASH}, // SukiSU
|
||||
{EXPECTED_SIZE, EXPECTED_HASH},
|
||||
{EXPECTED_SIZE_SHIRKNEKO, EXPECTED_HASH_SHIRKNEKO}, // SukiSU
|
||||
{EXPECTED_SIZE_RSUNTK, EXPECTED_HASH_RSUNTK}, // RKSU
|
||||
{EXPECTED_SIZE_NEKO, EXPECTED_HASH_NEKO}, // Neko/KernelSU
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||
{EXPECTED_SIZE_SHIRKNEKO, EXPECTED_HASH_SHIRKNEKO}, // SukiSU
|
||||
{EXPECTED_SIZE_5EC1CFF, EXPECTED_HASH_5EC1CFF}, // MKSU
|
||||
{EXPECTED_SIZE_WEISHU, EXPECTED_HASH_WEISHU}, // KSU
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user