ZygoteArgsHook: Skip system

This commit is contained in:
Nullptr 2022-09-03 14:09:05 +08:00
commit d22ac92dad
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -35,8 +35,8 @@ fun String.execute(currentWorkingDir: File = file("./")): String {
val minSdkVer by extra(24)
val targetSdkVer by extra(33)
val appVerName by extra("3.0.3-Beta")
val serviceVerCode by extra(85)
val appVerName by extra("3.0.4-Beta")
val serviceVerCode by extra(86)
val minBackupVerCode by extra(65)
val androidSourceCompatibility = JavaVersion.VERSION_11

View file

@ -5,6 +5,7 @@ import android.os.Build
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import de.robv.android.xposed.XC_MethodHook
import icu.nullptr.hidemyapplist.common.Constants
import icu.nullptr.hidemyapplist.xposed.HMAService
import icu.nullptr.hidemyapplist.xposed.logE
import icu.nullptr.hidemyapplist.xposed.logI
@ -26,6 +27,7 @@ class ZygoteArgsHook(private val service: HMAService) : IFrameworkHook {
}.hookBefore { param ->
runCatching {
val uid = param.args[2] as Int
if (uid == Constants.UID_SYSTEM) return@hookBefore
val apps = service.pms.getPackagesForUid(uid) ?: return@hookBefore
for (app in apps) {
if (service.isHookEnabled(app)) {