Skip to content

Commit 0d61724

Browse files
author
swift_gan
committed
can not call jni origin in 4.4
1 parent 2209c18 commit 0d61724

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/swift/sandhook/testHookers/JniHooker.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.swift.sandhook.testHookers;
22

3+
import android.os.Build;
34
import android.util.Log;
45

56
import com.swift.sandhook.annotation.HookMode;
@@ -16,7 +17,12 @@ public class JniHooker {
1617
@HookMode(HookMode.INLINE)
1718
public static int onJni(@ThisObject TestClass thiz) {
1819
Log.e("JniHooker", "hooked success ");
19-
return onJniBackup(thiz);
20+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
21+
return onJniBackup(thiz);
22+
} else {
23+
//can not call jni origin in 4.4 tmp
24+
return 0;
25+
}
2026
}
2127

2228
@HookMethodBackup("jni_test")

0 commit comments

Comments
 (0)