Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/src/main/java/toolkit/coderstory/CorePatchForQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,14 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
"isVerificationEnabled",
new ReturnConstant(prefs, "disableVerificationAgent", false)
);

// Allow apk splits with different signatures to be installed together
hookAllMethods(signingDetails, "signaturesMatchExactly", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) {
if (prefs.getBoolean("exactSigCheck", false))
param.setResult(true);
}
});
}
}
10 changes: 10 additions & 0 deletions app/src/main/java/toolkit/coderstory/CorePatchForR.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam)
XposedBridge.log("D/" + MainHook.TAG + " downgrade=" + prefs.getBoolean("downgrade", true));
XposedBridge.log("D/" + MainHook.TAG + " authcreak=" + prefs.getBoolean("authcreak", false));
XposedBridge.log("D/" + MainHook.TAG + " digestCreak=" + prefs.getBoolean("digestCreak", true));
XposedBridge.log("D/" + MainHook.TAG + " exactSigCheck=" + prefs.getBoolean("exactSigCheck", false));
XposedBridge.log("D/" + MainHook.TAG + " UsePreSig=" + prefs.getBoolean("UsePreSig", false));
XposedBridge.log("D/" + MainHook.TAG + " bypassBlock=" + prefs.getBoolean("bypassBlock", true));
XposedBridge.log("D/" + MainHook.TAG + " sharedUser=" + prefs.getBoolean("sharedUser", false));
Expand Down Expand Up @@ -406,6 +407,15 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

hookAllMethods(getIsVerificationEnabledClass(loadPackageParam.classLoader), "isVerificationEnabled", new ReturnConstant(prefs, "disableVerificationAgent", false));

// Allow apk splits with different signatures to be installed together
hookAllMethods(signingDetails, "signaturesMatchExactly", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) {
if (prefs.getBoolean("exactSigCheck", false))
param.setResult(true);
}
});

if (BuildConfig.DEBUG) initializeDebugHook(loadPackageParam);
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<string name="authcreak_summary">Allows install apps after modify file in apk (ignore invalid digest error).</string>
<string name="digestCreak">Disable compare signatures</string>
<string name="digestCreak_summary">Allow re-install app with different signatures.</string>
<string name="exactSigCheck">Disable exact signature match</string>
<string name="exactSigCheck_summary">Disables exact signature match between apks, allowing installs with each apk split having a different signature. Only enable when really needed!</string>
<string name="UsePreSig">Use installed signatures</string>
<string name="UsePreSig_summary">Always use signatures from already installed apps when installing.\n This is extremely <b>dangerous</b>.\n Only enable when really needed!</string>
<string name="settings">Settings</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
android:title="@string/digestCreak"
android:summary="@string/digestCreak_summary"
android:defaultValue="true" />
<SwitchPreference
android:key="exactSigCheck"
android:title="@string/exactSigCheck"
android:summary="@string/exactSigCheck_summary"
android:defaultValue="false"/>

<SwitchPreference
android:key="UsePreSig"
Expand Down