单独使用NativeHook出现崩溃
yhnu opened this issue · comments
我只想使用SandHook中的NativeHook库,修改如下:
遇到如下问题:
- InlineHook::instance is NULL
05-13 12:31:00.004 27279 27279 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-13 12:31:00.004 27279 27279 F DEBUG : Build fingerprint: 'Xiaomi/jason/jason:8.1.0/OPM1.171019.019/8.12.20:user/release-keys'
05-13 12:31:00.004 27279 27279 F DEBUG : Revision: '0'
05-13 12:31:00.004 27279 27279 F DEBUG : ABI: 'arm64'
05-13 12:31:00.004 27279 27279 F DEBUG : pid: 27268, tid: 27268, name: com.lingdong.t >>> zygote64 <<<
05-13 12:31:00.004 27279 27279 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-13 12:31:00.004 27279 27279 F DEBUG : Cause: null pointer dereference
05-13 12:31:00.004 27279 27279 F DEBUG : x0 000000701ddf4c50 x1 000000701ddf4c50 x2 0000006f801ddb0c x3 0000000000000003
05-13 12:31:00.004 27279 27279 F DEBUG : x4 0000000040100401 x5 40404000a800a800 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
05-13 12:31:00.004 27279 27279 F DEBUG : x8 0000000000000000 x9 fe40a393c9dd16d7 x10 0000007fd49e81f0 x11 000000000000001e
05-13 12:31:00.004 27279 27279 F DEBUG : x12 000000000000000b x13 ffffffffffffffff x14 ff00000000000000 x15 ffffffffffffffff
05-13 12:31:00.004 27279 27279 F DEBUG : x16 0000006f80349470 x17 0000006f801fbb78 x18 000000004b488bb4 x19 000000701db06dd0
05-13 12:31:00.004 27279 27279 F DEBUG : x20 000000701deb054b x21 0000006f8033df58 x22 0000000000000000 x23 000000701dead654
05-13 12:31:00.004 27279 27279 F DEBUG : x24 000000701deb072b x25 000000701dee3000 x26 000000701dee33d8 x27 000000000000000c
05-13 12:31:00.004 27279 27279 F DEBUG : x28 0000006f801dd88c x29 0000007fd49e8750 x30 0000006f801dd9f4
05-13 12:31:00.005 27279 27279 F DEBUG : sp 0000007fd49e8730 pc 0000006f801fbba0 pstate 0000000060000000
05-13 12:31:00.496 27279 27279 F DEBUG :
05-13 12:31:00.496 27279 27279 F DEBUG : backtrace:
05-13 12:31:00.496 27279 27279 F DEBUG : #00 pc 00000000000aeba0 /data/local/tmp/drogon/app_arm64/libhacku3d.10146.so (SandInlineHook+40)
05-13 12:31:00.496 27279 27279 F DEBUG : #1 pc 00000000000909f0 /data/local/tmp/drogon/app_arm64/libhacku3d.10146.so (my_init()+356)
05-13 12:31:00.496 27279 27279 F DEBUG : #2 pc 0000000000020ad4 /system/bin/linker64 (_dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5+276)
05-13 12:31:00.496 27279 27279 F DEBUG : #3 pc 0000000000020d04 /system/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+396)
05-13 12:31:00.496 27279 27279 F DEBUG : #4 pc 000000000000c34c /system/bin/linker64 (__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv+1788)
05-13 12:31:00.496 27279 27279 F DEBUG : #5 pc 0000000000009040 /system/bin/linker64 (__dl__Z8__dlopenPKciPKv+68)
05-13 12:31:00.496 27279 27279 F DEBUG : #6 pc 000000000000114c /system/lib64/libdl.so (dlopen+12)
05-13 12:31:00.496 27279 27279 F DEBUG : #7 pc 0000000000002be8 /system/lib64/libnativeloader.so (android::OpenNativeLibrary(_JNIEnv*, int, char const*, _jobject*, _jstring*, bool*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>)+204)
05-13 12:31:00.496 27279 27279 F DEBUG : #8 pc 000000000030053c /system/lib64/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&, _jobject*, _jstring*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>)+2124)
05-13 12:31:00.496 27279 27279 F DEBUG : #9 pc 0000000000004164 /system/lib64/libopenjdkjvm.so (JVM_NativeLoad+268)
05-13 12:31:00.496 27279 27279 F DEBUG : #10 pc 00000000003b0e64 /system/framework/arm64/boot-core-oj.oat (offset 0x2ec000) (java.lang.Runtime.nativeLoad+228)
05-13 12:31:00.496 27279 27279 F DEBUG : #11 pc 00000000003b067c /system/framework/arm64/boot-core-oj.oat (offset 0x2ec000) (java.lang.Runtime.doLoad+220)
05-13 12:31:00.496 27279 27279 F DEBUG : #12 pc 00000000003b2414 /system/framework/arm64/boot-core-oj.oat (offset 0x2ec000) (java.lang.Runtime.load0+756)
05-13 12:31:00.496 27279 27279 F DEBUG : #13 pc 00000000003d78f0 /system/framework/arm64/boot-core-oj.oat (offset 0x2ec000) (java.lang.System.load+96)
05-13 12:31:00.496 27279 27279 F DEBUG : #14 pc 000000000054984c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
05-13 12:31:00.496 27279 27279 F DEBUG : #15 pc 00000000000dd1b4 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int*, unsigned int, art::JValue*, char const*)+260)
05-13 12:31:00.496 27279 27279 F DEBUG : #16 pc 000000000046d400 /system/lib64/libart.so (art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*)+100)
05-13 12:31:00.496 27279 27279 F DEBUG : #17 pc 000000000046d02c /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+420)
05-13 12:31:00.496 27279 27279 F DEBUG : #18 pc 0000000000373f60 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+620)
05-13 12:31:00.496 27279 27279 F DEBUG : #19 pc 0000000000010c88 /data/local/tmp/libzyghk64.so (deleted)
05-13 12:31:00.496 27279 27279 F DEBUG : #20 pc 0000000000010e38 /data/local/tmp/libzyghk64.so (deleted)
05-13 12:31:00.496 27279 27279 F DEBUG : #21 pc 0000000000007bf4 /data/local/tmp/libzyghk64.so (deleted)
05-13 12:31:00.496 27279 27279 F DEBUG : #22 pc 0000000000007844 /data/local/tmp/libzyghk64.so (deleted)
05-13 12:31:00.496 27279 27279 F DEBUG : #23 pc 0000000000007e44 /data/local/tmp/libzyghk64.so (deleted)
05-13 12:31:00.496 27279 27279 F DEBUG : #24 pc 0000000000524d24 /system/framework/arm64/boot-core-libart.oat (offset 0x17c000) (dalvik.system.ZygoteHooks.nativePostForkChild [DEDUPED]+196)
05-13 12:31:00.496 27279 27279 F DEBUG : #25 pc 0000000000524fb8 /system/framework/arm64/boot-core-libart.oat (offset 0x17c000) (dalvik.system.ZygoteHooks.postForkChild+56)
05-13 12:31:00.496 27279 27279 F DEBUG : #26 pc 000000000227b634 /system/framework/arm64/boot-framework.oat (offset 0x9c9000) (com.android.internal.os.Zygote.callPostForkChildHooks+84)
05-13 12:31:00.496 27279 27279 F DEBUG : #27 pc 000000000054984c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
05-13 12:31:00.496 27279 27279 F DEBUG : #28 pc 00000000000dd1b4 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+260)
05-13 12:31:00.496 27279 27279 F DEBUG : #29 pc 000000000046d400 /system/lib64/libart.so (art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*)+100)
05-13 12:31:00.497 27279 27279 F DEBUG : #30 pc 000000000046d02c /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+420)
05-13 12:31:00.497 27279 27279 F DEBUG : #31 pc 0000000000373f60 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+620)
05-13 12:31:00.497 27279 27279 F DEBUG : #32 pc 00000000000a8b78 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
05-13 12:31:00.497 27279 27279 F DEBUG : #33 pc 000000000017a028 /system/lib64/libandroid_runtime.so ((anonymous namespace)::ForkAndSpecializeCommon(_JNIEnv*, unsigned int, unsigned int, _jintArray*, int, _jobjectArray*, long, long, int, _jstring*, _jstring*, bool, _jintArray*, _jintArray*, _jstring*, _jstring*)+5264)
05-13 12:31:00.497 27279 27279 F DEBUG : #34 pc 00000000001781fc /system/lib64/libandroid_runtime.so (android::com_android_internal_os_Zygote_nativeForkAndSpecialize(_JNIEnv*, _jclass*, int, int, _jintArray*, int, _jobjectArray*, int, _jstring*, _jstring*, _jintArray*, _jintArray*, _jstring*, _jstring*)+536)
05-13 12:31:00.497 27279 27279 F DEBUG : #35 pc 000000000227bc28 /system/framework/arm64/boot-framework.oat (offset 0x9c9000) (com.android.internal.os.Zygote.nativeForkAndSpecialize+408)
05-13 12:31:00.497 27279 27279 F DEBUG : #36 pc 0000000002278154 /system/framework/arm64/boot-framework.oat (offset 0x9c9000) (com.android.internal.os.ZygoteConnection.processOneCommand+1508)
05-13 12:31:00.497 27279 27279 F DEBUG : #37 pc 00000000022794c8 /system/framework/arm64/boot-framework.oat (offset 0x9c9000) (com.android.internal.os.ZygoteServer.runSelectLoop+968)
05-13 12:31:00.497 27279 27279 F DEBUG : #38 pc 000000000227f980 /system/framework/arm64/boot-framework.oat (offset 0x9c9000) (com.android.internal.os.ZygoteInit.main+2752)
05-13 12:31:00.497 27279 27279 F DEBUG : #39 pc 000000000054984c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
05-13 12:31:00.497 27279 27279 F DEBUG : #40 pc 00000000000dd1b4 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+260)
05-13 12:31:00.497 27279 27279 F DEBUG : #41 pc 000000000046d400 /system/lib64/libart.so (art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*)+100)
05-13 12:31:00.497 27279 27279 F DEBUG : #42 pc 000000000046d02c /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+420)
05-13 12:31:00.497 27279 27279 F DEBUG : #43 pc 0000000000373f60 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+620)
05-13 12:31:00.497 27279 27279 F DEBUG : #44 pc 00000000000a8b78 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
05-13 12:31:00.497 27279 27279 F DEBUG : #45 pc 00000000000ab424 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+920)
05-13 12:31:00.497 27279 27279 F DEBUG : #46 pc 00000000000025b4 /system/bin/app_process64 (main+1516)
05-13 12:31:00.497 27279 27279 F DEBUG : #47 pc 00000000000a1b2c /system/lib64/libc.so (__libc_init+88)
05-13 12:31:00.497 27279 27279 F DEBUG : #48 pc 0000000000001f28 /system/bin/app_process64 (_start_main+80)