diff --git a/app/src/main/java/toolkit/coderstory/CorePatchForQ.java b/app/src/main/java/toolkit/coderstory/CorePatchForQ.java
index fc2ddb7..0923c58 100644
--- a/app/src/main/java/toolkit/coderstory/CorePatchForQ.java
+++ b/app/src/main/java/toolkit/coderstory/CorePatchForQ.java
@@ -146,6 +146,11 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
});
}
+ hookAllMethods(
+ XposedHelpers.findClass("com.android.server.pm.PackageManagerService", loadPackageParam.classLoader),
+ "isVerificationEnabled",
+ new ReturnConstant(prefs, "disableVerificationAgent", false)
+ );
}
@Override
diff --git a/app/src/main/java/toolkit/coderstory/CorePatchForR.java b/app/src/main/java/toolkit/coderstory/CorePatchForR.java
index 3801739..a940bb5 100644
--- a/app/src/main/java/toolkit/coderstory/CorePatchForR.java
+++ b/app/src/main/java/toolkit/coderstory/CorePatchForR.java
@@ -71,6 +71,7 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam)
XposedBridge.log("D/" + MainHook.TAG + " enhancedMode=" + prefs.getBoolean("enhancedMode", false));
XposedBridge.log("D/" + MainHook.TAG + " bypassBlock=" + prefs.getBoolean("bypassBlock", true));
XposedBridge.log("D/" + MainHook.TAG + " sharedUser=" + prefs.getBoolean("sharedUser", false));
+ XposedBridge.log("D/" + MainHook.TAG + " disableVerificationAgent=" + prefs.getBoolean("disableVerificationAgent", true));
}
var pmService = XposedHelpers.findClassIfExists("com.android.server.pm.PackageManagerService",
@@ -392,6 +393,8 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
}
);
+ hookAllMethods(getIsVerificationEnabledClass(loadPackageParam.classLoader), "isVerificationEnabled", new ReturnConstant(prefs, "disableVerificationAgent", false));
+
if (BuildConfig.DEBUG) initializeDebugHook(loadPackageParam);
}
@@ -410,6 +413,10 @@ static Object callOriginMethod(Object obj, String methodName, Object... args) {
}
}
+ Class> getIsVerificationEnabledClass(ClassLoader classLoader) {
+ return XposedHelpers.findClass("com.android.server.pm.PackageManagerService", classLoader);
+ }
+
Class> getSigningDetails(ClassLoader classLoader) {
return XposedHelpers.findClass("android.content.pm.PackageParser.SigningDetails", classLoader);
}
diff --git a/app/src/main/java/toolkit/coderstory/CorePatchForT.java b/app/src/main/java/toolkit/coderstory/CorePatchForT.java
index 70023ad..8380e1e 100644
--- a/app/src/main/java/toolkit/coderstory/CorePatchForT.java
+++ b/app/src/main/java/toolkit/coderstory/CorePatchForT.java
@@ -112,4 +112,9 @@ protected Object SharedUserSetting_packages(Object sharedUser) {
protected Object SigningDetails_mergeLineageWith(Object self, Object other) {
return XposedHelpers.callMethod(self, "mergeLineageWith", other, 2 /*MERGE_RESTRICTED_CAPABILITY*/);
}
+
+ @Override
+ Class> getIsVerificationEnabledClass(ClassLoader classLoader) {
+ return XposedHelpers.findClass("com.android.server.pm.VerificationParams", classLoader);
+ }
}
diff --git a/app/src/main/java/toolkit/coderstory/CorePatchForU.java b/app/src/main/java/toolkit/coderstory/CorePatchForU.java
index 85ef662..bf146e6 100644
--- a/app/src/main/java/toolkit/coderstory/CorePatchForU.java
+++ b/app/src/main/java/toolkit/coderstory/CorePatchForU.java
@@ -49,4 +49,9 @@ protected void afterHookedMethod(MethodHookParam param) {
new ReturnConstant(prefs, "bypassBlock", false));
}
}
+
+ @Override
+ Class> getIsVerificationEnabledClass(ClassLoader classLoader) {
+ return XposedHelpers.findClass("com.android.server.pm.VerifyingSession", classLoader);
+ }
}
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 47939d7..af57c35 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -22,4 +22,6 @@
配置初始化失败
绕过共享用户签名验证
允许安装与其共享用户签名不同的 app(需要同时打开“禁用APK签名验证”)
+ 禁用安装包验证代理
+ 如 Play 商店的保护机制
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 74a4194..505c87d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -22,4 +22,6 @@
!! Any apk can override the installed one !!\nBe carefully when installing unknown apk
Bypass shared user verify
Allow install app with signature differ from its shared user (\'Disable compare signatures\' must be enabled too)
+ Disable Package Verification Agent
+ e.g. Google Play Protection
diff --git a/app/src/main/res/xml/prefs.xml b/app/src/main/res/xml/prefs.xml
index ffbb0da..7c884e6 100644
--- a/app/src/main/res/xml/prefs.xml
+++ b/app/src/main/res/xml/prefs.xml
@@ -40,6 +40,12 @@
android:title="@string/shared_user_title"
android:summary="@string/shared_user_summary"
android:defaultValue="false" />
+
+