diff --git a/edxp-sandhook/build.gradle b/edxp-sandhook/build.gradle index a0bf289b..67448739 100644 --- a/edxp-sandhook/build.gradle +++ b/edxp-sandhook/build.gradle @@ -24,7 +24,7 @@ dependencies { compileOnly files("libs/framework-stub.jar") implementation project(':edxp-common') implementation project(':xposed-bridge') - implementation 'com.swift.sandhook:hooklib:3.3.3' + implementation 'com.swift.sandhook:hooklib:3.3.4' compileOnly project(':dexmaker') } diff --git a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java index 44a807da..c7b2f62b 100644 --- a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java +++ b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java @@ -1,10 +1,12 @@ package com.swift.sandhook.xposedcompat.methodgen; +import android.os.Build; import android.os.Process; import android.os.Trace; import com.swift.sandhook.SandHook; import com.swift.sandhook.SandHookConfig; +import com.swift.sandhook.annotation.HookMode; import com.swift.sandhook.wrapper.HookWrapper; import com.swift.sandhook.xposedcompat.XposedCompat; import com.swift.sandhook.xposedcompat.hookstub.HookMethodEntity; @@ -124,6 +126,9 @@ public final class SandHookXposedBridge { @Override public void loadLib() { //do it in loadDexAndInit + if (SandHookConfig.SDK_INT >= Build.VERSION_CODES.O) { + SandHook.setHookMode(HookMode.REPLACE); + } } }; SandHookConfig.DEBUG = true; diff --git a/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so b/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so index 18596562..e4f0a55e 100755 Binary files a/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so and b/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so differ diff --git a/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so b/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so index d0c13135..1b9e9f52 100755 Binary files a/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so and b/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so differ