Skip to content

Commit

Permalink
remove unnecessary jni hook logs
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Dec 31, 2023
1 parent 0741a35 commit cd71452
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions loader/src/injector/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,12 @@ void hookJniNativeMethods(JNIEnv *env, const char *clz, JNINativeMethod *methods
if (mid == nullptr) {
env->ExceptionClear();
nm.fnPtr = nullptr;
LOGE("Could not found jni method in class %s: %s(%s)", clz, nm.name, nm.signature);
continue;
}
auto method = lsplant::JNI_ToReflectedMethod(env, clazz, mid, is_static);
auto modifier = lsplant::JNI_CallIntMethod(env, method, member_getModifiers);
if ((modifier & MODIFIER_NATIVE) == 0) {
nm.fnPtr = nullptr;
LOGE("Don't hook method because it's not native method: %s: %s(%s)", clz, nm.name, nm.signature);
continue;
}
auto artMethod = lsplant::art::ArtMethod::FromReflectedMethod(env, method);
Expand Down

0 comments on commit cd71452

Please sign in to comment.