revert changes
This commit is contained in:
parent
86cacb5f53
commit
0dd0001f2c
5 changed files with 11 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ public class CorePatchForQ extends XposedHelper implements IXposedHookLoadPackag
|
|||
hookAllMethods("java.security.MessageDigest", loadPackageParam.classLoader, "isEqual",
|
||||
new ReturnConstant(prefs, "authcreak", true));
|
||||
hookAllMethods("com.android.server.pm.PackageManagerServiceUtils", loadPackageParam.classLoader, "verifySignatures",
|
||||
new ReturnConstant(prefs, "authcreak", true));
|
||||
new ReturnConstant(prefs, "authcreak", false));
|
||||
|
||||
Class<?> signingDetails = XposedHelpers.findClass("android.content.pm.PackageParser.SigningDetails", loadPackageParam.classLoader);
|
||||
Constructor<?> findConstructorExact = XposedHelpers.findConstructorExact(signingDetails, Signature[].class, Integer.TYPE);
|
||||
|
|
@ -62,7 +62,7 @@ public class CorePatchForQ extends XposedHelper implements IXposedHookLoadPackag
|
|||
final Object newInstance = findConstructorExact.newInstance(signingDetailsArgs);
|
||||
hookAllMethods("android.util.apk.ApkSignatureVerifier", loadPackageParam.classLoader, "verifyV1Signature", new XC_MethodHook() {
|
||||
public void afterHookedMethod(MethodHookParam methodHookParam) throws Throwable {
|
||||
if (prefs.getBoolean("authcreak", true)) {
|
||||
if (prefs.getBoolean("authcreak", false)) {
|
||||
Throwable throwable = methodHookParam.getThrowable();
|
||||
if (throwable != null) {
|
||||
Throwable cause = throwable.getCause();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class CorePatchForR extends XposedHelper implements IXposedHookLoadPackag
|
|||
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
if (BuildConfig.DEBUG) {
|
||||
XposedBridge.log("D/" + MainHook.TAG + " downgrade=" + prefs.getBoolean("downgrade", true));
|
||||
XposedBridge.log("D/" + MainHook.TAG + " authcreak=" + prefs.getBoolean("authcreak", 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 + " UsePreSig=" + prefs.getBoolean("UsePreSig", false));
|
||||
XposedBridge.log("D/" + MainHook.TAG + " bypassBlock=" + prefs.getBoolean("bypassBlock", true));
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class CorePatchForT extends CorePatchForS {
|
|||
XposedBridge.hookMethod(assertMinSignatureSchemeIsValid, new XC_MethodHook() {
|
||||
@Override
|
||||
protected void afterHookedMethod(MethodHookParam param) {
|
||||
if (prefs.getBoolean("authcreak", true)) {
|
||||
if (prefs.getBoolean("authcreak", false)) {
|
||||
param.setResult(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class CorePatchForU extends CorePatchForT {
|
|||
new XC_MethodHook() {
|
||||
@Override
|
||||
protected void afterHookedMethod(MethodHookParam param) {
|
||||
if (prefs.getBoolean("authcreak", true)) {
|
||||
if (prefs.getBoolean("authcreak", false)) {
|
||||
param.setResult(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ public class SettingsActivity extends Activity {
|
|||
//noinspection deprecation
|
||||
getSharedPreferences("conf", Context.MODE_WORLD_READABLE);
|
||||
} catch (SecurityException exception) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.config_error)
|
||||
.setMessage(R.string.not_supported)
|
||||
.setPositiveButton(android.R.string.ok, (dialog12, which) -> finish())
|
||||
.setNegativeButton(R.string.ignore, null)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue