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 39eea87d..c79c6311 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