No hook instrument when non-debuggable

This commit is contained in:
LoveSy 2022-11-20 01:08:25 +08:00
parent 6e0ef3c855
commit a15d854930
No known key found for this signature in database

View File

@ -42,6 +42,9 @@ class Instrumentation {
public:
static bool Init(JNIEnv *env, const HookHandler &handler) {
if (!IsJavaDebuggable(env)) [[likely]] {
return true;
}
int sdk_int = GetAndroidApiLevel();
if (sdk_int >= __ANDROID_API_P__) [[likely]] {
if (!HookSyms(handler, InitializeMethodsCode,