SandHook : update sandhook to fix some crash on Q

This commit is contained in:
swift_gan 2019-11-08 17:39:53 +08:00 committed by ganyao114
parent 7ea869e600
commit e4a6706f06
6 changed files with 15 additions and 3 deletions

View File

@ -28,7 +28,7 @@ dependencies {
compileOnly files("${hiddenApiStubJarFilePath}") compileOnly files("${hiddenApiStubJarFilePath}")
implementation project(':edxp-common') implementation project(':edxp-common')
implementation project(':xposed-bridge') implementation project(':xposed-bridge')
implementation 'com.swift.sandhook:hooklib:4.0.2' implementation 'com.swift.sandhook:hooklib:4.1.2'
compileOnly project(':dexmaker') compileOnly project(':dexmaker')
} }

View File

@ -5,8 +5,8 @@ import android.os.Process;
import android.text.TextUtils; import android.text.TextUtils;
import com.elderdrivers.riru.edxp.config.ConfigManager; import com.elderdrivers.riru.edxp.config.ConfigManager;
import com.swift.sandhook.SandHook;
import com.elderdrivers.riru.edxp.util.ComposeClassLoader; import com.elderdrivers.riru.edxp.util.ComposeClassLoader;
import com.swift.sandhook.wrapper.HookWrapper;
import com.swift.sandhook.xposedcompat.methodgen.SandHookXposedBridge; import com.swift.sandhook.xposedcompat.methodgen.SandHookXposedBridge;
import com.swift.sandhook.xposedcompat.utils.ApplicationUtils; import com.swift.sandhook.xposedcompat.utils.ApplicationUtils;
import com.swift.sandhook.xposedcompat.utils.FileUtils; import com.swift.sandhook.xposedcompat.utils.FileUtils;
@ -38,7 +38,7 @@ public class XposedCompat {
return; return;
for (Class hooker : hookers) { for (Class hooker : hookers) {
try { try {
SandHook.addHookClass(classLoader, hooker); HookWrapper.addHookClass(classLoader, hooker);
} catch (Throwable throwable) { } catch (Throwable throwable) {
} }
} }

View File

@ -1,5 +1,6 @@
package com.swift.sandhook.xposedcompat.methodgen; package com.swift.sandhook.xposedcompat.methodgen;
import android.os.Build;
import android.os.Process; import android.os.Process;
import android.os.Trace; import android.os.Trace;
@ -137,6 +138,17 @@ public final class SandHookXposedBridge {
} }
}; };
SandHookConfig.DEBUG = true; SandHookConfig.DEBUG = true;
SandHookConfig.compiler = false;
//already impl in edxp
SandHookConfig.delayHook = false;
//use when call origin
HookBlackList.methodBlackList.add("java.lang.reflect.isStatic");
HookBlackList.methodBlackList.add("java.lang.reflect.Method.getModifiers");
if (Build.VERSION.SDK_INT >= 29) {
//unknown bug, disable tmp
//TODO Fix
XposedCompat.useInternalStub = false;
}
//in zygote disable compile //in zygote disable compile
} }
} }

Binary file not shown.

Binary file not shown.