Commit 320c7189 authored by swift_gan's avatar swift_gan Committed by swift_gan

when libart.so can not load

parent b9355783
...@@ -30,7 +30,7 @@ ext { ...@@ -30,7 +30,7 @@ ext {
userOrg = 'ganyao114' userOrg = 'ganyao114'
groupId = 'com.swift.sandhook' groupId = 'com.swift.sandhook'
repoName = 'SandHook' repoName = 'SandHook'
publishVersion = '2.5.1' publishVersion = '2.5.2'
desc = 'android art hook' desc = 'android art hook'
website = 'https://github.com/ganyao114/SandHook' website = 'https://github.com/ganyao114/SandHook'
licences = ['Apache-2.0'] licences = ['Apache-2.0']
......
...@@ -40,8 +40,12 @@ extern "C" { ...@@ -40,8 +40,12 @@ extern "C" {
} }
if (SDK_INT >= 24) { if (SDK_INT >= 24) {
art_lib = fake_dlopen(art_lib_path, RTLD_NOW); art_lib = fake_dlopen(art_lib_path, RTLD_NOW);
innerSuspendVM = reinterpret_cast<void (*)()>(fake_dlsym(art_lib, "_ZN3art3Dbg9SuspendVMEv")); if (art_lib > 0) {
innerResumeVM = reinterpret_cast<void (*)()>(fake_dlsym(art_lib, "_ZN3art3Dbg8ResumeVMEv")); innerSuspendVM = reinterpret_cast<void (*)()>(fake_dlsym(art_lib,
"_ZN3art3Dbg9SuspendVMEv"));
innerResumeVM = reinterpret_cast<void (*)()>(fake_dlsym(art_lib,
"_ZN3art3Dbg8ResumeVMEv"));
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment