From 50ab11ae2ee2a27fce49afa0251059021de37c68 Mon Sep 17 00:00:00 2001 From: 327135569 Date: Sat, 1 May 2021 13:47:04 +0800 Subject: [PATCH] fix bypass signature --- .../main/java/org/lsposed/lspatch/loader/LSPApplication.java | 5 ++++- .../java/org/lsposed/lspatch/appstub/LSPApplicationStub.java | 4 +++- gradle/wrapper/gradle-wrapper.properties | 2 +- mmp | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/lsposed/lspatch/loader/LSPApplication.java b/app/src/main/java/org/lsposed/lspatch/loader/LSPApplication.java index be2bdc28..9c6b9371 100644 --- a/app/src/main/java/org/lsposed/lspatch/loader/LSPApplication.java +++ b/app/src/main/java/org/lsposed/lspatch/loader/LSPApplication.java @@ -11,6 +11,7 @@ import android.os.Build; import android.os.IBinder; import android.os.Parcel; +import android.util.Log; import org.lsposed.lspatch.loader.util.FileUtils; import org.lsposed.lspatch.loader.util.XLog; @@ -64,6 +65,8 @@ static public boolean isIsolated() { } static { + cacheSigbypassLv = -1; + if (isIsolated()) { XLog.d(TAG, "skip isolated process"); } @@ -236,7 +239,7 @@ private static void doHook() throws IllegalAccessException, ClassNotFoundExcepti } } - private static int cacheSigbypassLv = -1; + private static int cacheSigbypassLv; private static int fetchSigbypassLv() { if (cacheSigbypassLv != -1) { diff --git a/appstub/src/main/java/org/lsposed/lspatch/appstub/LSPApplicationStub.java b/appstub/src/main/java/org/lsposed/lspatch/appstub/LSPApplicationStub.java index e573020d..4a40432f 100644 --- a/appstub/src/main/java/org/lsposed/lspatch/appstub/LSPApplicationStub.java +++ b/appstub/src/main/java/org/lsposed/lspatch/appstub/LSPApplicationStub.java @@ -73,7 +73,9 @@ protected void attachBaseContext(Context base) { if (realLSPApplication != null) { try { - realLSPApplication.getClass().getDeclaredMethod("attachBaseContext", Context.class).invoke(realLSPApplication, base); + Method method = realLSPApplication.getClass().getDeclaredMethod("attachBaseContext", Context.class); + method.setAccessible(true); + method.invoke(realLSPApplication, base); } catch (Exception e) { throw new IllegalStateException("wtf", e); diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17a871c1..fc0e207c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Apr 08 14:13:08 CST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/mmp b/mmp index 41668cd0..64e74491 160000 --- a/mmp +++ b/mmp @@ -1 +1 @@ -Subproject commit 41668cd0ad080e18b527ad70db4b8828059e3257 +Subproject commit 64e74491257a3bc27ec4050789b768c45fd69171