Prioritize sukisu recognition.
Simplified manual hooks
This commit is contained in:
@@ -20,23 +20,8 @@ config KSU_MANUAL_HOOK
|
|||||||
depends on KSU && KSU != m
|
depends on KSU && KSU != m
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Using manual hooks instead of KSU KPROBES hooks.
|
If enabled, Hook required KernelSU syscalls with manually-patched function.
|
||||||
By default the GKI kernel should use the KSU KPROBES hook.
|
If disabled, Hook required KernelSU syscalls with Kernel-probe.
|
||||||
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.
|
|
||||||
|
|
||||||
config KSU_ALLOWLIST_WORKAROUND
|
config KSU_ALLOWLIST_WORKAROUND
|
||||||
bool "KernelSU Session Keyring Init 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 -- SukiSU Manager signature hash: $(KSU_EXPECTED_HASH))
|
||||||
$(info -- Supported Unofficial Manager: 5ec1cff (GKI) rsuntk (Non-GKI) ShirkNeko udochina (GKI and non-GKI and KPM))
|
$(info -- Supported Unofficial Manager: 5ec1cff (GKI) rsuntk (Non-GKI) ShirkNeko udochina (GKI and non-GKI and KPM))
|
||||||
|
|
||||||
ifeq ($(strip $(CONFIG_KSU_HOOK_KPROBES)),y)
|
ifeq ($(strip $(CONFIG_KSU_MANUAL_HOOK)),y)
|
||||||
$(info -- SukiSU: KPROBES hooking enabled!)
|
|
||||||
else
|
|
||||||
$(info -- SukiSU: Manual hooking enabled!)
|
$(info -- SukiSU: Manual hooking enabled!)
|
||||||
ifeq ($(strip $(CONFIG_KSU)),m)
|
else
|
||||||
$(error CONFIG_KSU_MANUAL_HOOK cannot be enabled when compiling SukiSU as LKM!)
|
$(info -- SukiSU: KPROBES hooking enabled!)
|
||||||
endif
|
ccflags-y += -DCONFIG_KSU_KPROBES_HOOK
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KERNEL_VERSION := $(VERSION).$(PATCHLEVEL)
|
KERNEL_VERSION := $(VERSION).$(PATCHLEVEL)
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ static struct apk_sign_key {
|
|||||||
unsigned size;
|
unsigned size;
|
||||||
const char *sha256;
|
const char *sha256;
|
||||||
} apk_sign_keys[] = {
|
} 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_RSUNTK, EXPECTED_HASH_RSUNTK}, // RKSU
|
||||||
{EXPECTED_SIZE_NEKO, EXPECTED_HASH_NEKO}, // Neko/KernelSU
|
{EXPECTED_SIZE_NEKO, EXPECTED_HASH_NEKO}, // Neko/KernelSU
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#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_5EC1CFF, EXPECTED_HASH_5EC1CFF}, // MKSU
|
||||||
{EXPECTED_SIZE_WEISHU, EXPECTED_HASH_WEISHU}, // KSU
|
{EXPECTED_SIZE_WEISHU, EXPECTED_HASH_WEISHU}, // KSU
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user