From 70415a396a4e1eae85d74672c11f6b675a8edff1 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sat, 29 Jan 2022 12:27:54 +0800 Subject: [PATCH] Do not filter uid == 1000 for process info --- native/jni/zygisk/entry.cpp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/native/jni/zygisk/entry.cpp b/native/jni/zygisk/entry.cpp index 8712684e0..d103143a4 100644 --- a/native/jni/zygisk/entry.cpp +++ b/native/jni/zygisk/entry.cpp @@ -332,26 +332,24 @@ static void get_process_info(int client, const sock_cred *cred) { // really want to cache the app ID value. inotify will invalidate the app ID // cache for us. - if (uid != 1000) { - int manager_app_id = cached_manager_app_id; + int manager_app_id = cached_manager_app_id; - if (manager_app_id < 0) { - manager_app_id = get_manager_app_id(); - cached_manager_app_id = manager_app_id; - } + if (manager_app_id < 0) { + manager_app_id = get_manager_app_id(); + cached_manager_app_id = manager_app_id; + } - if (to_app_id(uid) == manager_app_id) { - flags |= PROCESS_IS_MAGISK_APP; - } - if (denylist_enforced) { - flags |= DENYLIST_ENFORCING; - } - if (is_deny_target(uid, process)) { - flags |= PROCESS_ON_DENYLIST; - } - if (uid_granted_root(uid)) { - flags |= PROCESS_GRANTED_ROOT; - } + if (to_app_id(uid) == manager_app_id) { + flags |= PROCESS_IS_MAGISK_APP; + } + if (denylist_enforced) { + flags |= DENYLIST_ENFORCING; + } + if (is_deny_target(uid, process)) { + flags |= PROCESS_ON_DENYLIST; + } + if (uid_granted_root(uid)) { + flags |= PROCESS_GRANTED_ROOT; } xwrite(client, &flags, sizeof(flags));