kernel: Prune allowlist only after boot completed

For unknown reason, packages.list is not reliable during boot for oplus
devices, so we have to disable pruning and re-run pruning after boot.
This commit is contained in:
Wang Han
2025-11-12 21:43:02 +08:00
committed by ShirkNeko
parent 906c4bdb01
commit 01ac06c3fd
5 changed files with 15 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
#include "ksud.h"
#include "selinux/selinux.h"
#include "syscall_hook_manager.h"
#include "throne_tracker.h"
bool ksu_module_mounted __read_mostly = false;
bool ksu_boot_completed __read_mostly = false;
@@ -126,6 +127,7 @@ void on_module_mounted(void){
void on_boot_completed(void){
ksu_boot_completed = true;
pr_info("on_boot_completed!\n");
track_throne(true);
// remark process, we don't want to mark other init
// forked process excepte zygote and adbd
ksu_mark_running_process();