diff --git a/native/src/core/zygisk/hook.cpp b/native/src/core/zygisk/hook.cpp index d9d6d5721..a70e37482 100644 --- a/native/src/core/zygisk/hook.cpp +++ b/native/src/core/zygisk/hook.cpp @@ -145,11 +145,7 @@ DCL_HOOK_FUNC(int, fork) { // Unmount stuffs in the process's private mount namespace DCL_HOOK_FUNC(static int, unshare, int flags) { int res = old_unshare(flags); - if (g_ctx && (flags & CLONE_NEWNS) != 0 && res == 0 && - // For some unknown reason, unmounting app_process in SysUI can break. - // This is reproducible on the official AVD running API 26 and 27. - // Simply avoid doing any unmounts for SysUI to avoid potential issues. - (g_ctx->info_flags & PROCESS_IS_SYS_UI) == 0) { + if (g_ctx && (flags & CLONE_NEWNS) != 0 && res == 0) { if (g_ctx->flags & DO_REVERT_UNMOUNT) { revert_unmount(); } diff --git a/native/src/core/zygisk/module.cpp b/native/src/core/zygisk/module.cpp index 813d25dc4..dce8815c8 100644 --- a/native/src/core/zygisk/module.cpp +++ b/native/src/core/zygisk/module.cpp @@ -365,13 +365,6 @@ void ZygiskContext::app_specialize_pre() { vector module_fds; int fd = remote_get_info(args.app->uid, process, &info_flags, module_fds); - if (args.app->app_data_dir) { - const auto *app_data_dir = env->GetStringUTFChars(args.app->app_data_dir, nullptr); - if (std::string_view(app_data_dir).ends_with("/com.android.systemui")) { - info_flags |= PROCESS_IS_SYS_UI; - } - env->ReleaseStringUTFChars(args.app->app_data_dir, app_data_dir); - } if ((info_flags & UNMOUNT_MASK) == UNMOUNT_MASK) { ZLOGI("[%s] is on the denylist\n", process); flags |= DO_REVERT_UNMOUNT; diff --git a/native/src/core/zygisk/module.hpp b/native/src/core/zygisk/module.hpp index 83c6a8a4d..fe8e684c8 100644 --- a/native/src/core/zygisk/module.hpp +++ b/native/src/core/zygisk/module.hpp @@ -126,12 +126,11 @@ enum : uint32_t { PROCESS_GRANTED_ROOT = zygisk::StateFlag::PROCESS_GRANTED_ROOT, PROCESS_ON_DENYLIST = zygisk::StateFlag::PROCESS_ON_DENYLIST, - PROCESS_IS_SYS_UI = (1u << 29), DENYLIST_ENFORCING = (1u << 30), PROCESS_IS_MAGISK_APP = (1u << 31), UNMOUNT_MASK = (PROCESS_ON_DENYLIST | DENYLIST_ENFORCING), - PRIVATE_MASK = (PROCESS_IS_SYS_UI | DENYLIST_ENFORCING | PROCESS_IS_MAGISK_APP) + PRIVATE_MASK = (DENYLIST_ENFORCING | PROCESS_IS_MAGISK_APP) }; struct api_abi_base {