mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-05 05:56:38 +08:00
No hook instrument when non-debuggable
This commit is contained in:
parent
6e0ef3c855
commit
a15d854930
@ -42,6 +42,9 @@ class Instrumentation {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static bool Init(JNIEnv *env, const HookHandler &handler) {
|
static bool Init(JNIEnv *env, const HookHandler &handler) {
|
||||||
|
if (!IsJavaDebuggable(env)) [[likely]] {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
int sdk_int = GetAndroidApiLevel();
|
int sdk_int = GetAndroidApiLevel();
|
||||||
if (sdk_int >= __ANDROID_API_P__) [[likely]] {
|
if (sdk_int >= __ANDROID_API_P__) [[likely]] {
|
||||||
if (!HookSyms(handler, InitializeMethodsCode,
|
if (!HookSyms(handler, InitializeMethodsCode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user