Commit fbbba627 authored by swift_gan's avatar swift_gan

[Xposed]can load lib extern

parent 9fd0e9c9
......@@ -449,4 +449,22 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
LOGW("JNI Loaded");
return JNI_VERSION_1_6;
}
JNIEXPORT bool JNI_Load_Ex(JNIEnv* env, jclass classSandHook, jclass classNeverCall) {
int jniMethodSize = sizeof(JNINativeMethod);
if (env == nullptr || classSandHook == nullptr || classNeverCall == nullptr)
return false;
if (env->RegisterNatives(classSandHook, jniSandHook, sizeof(jniSandHook) / jniMethodSize) < 0) {
return false;
}
if (env->RegisterNatives(classNeverCall, jniNeverCall, sizeof(jniNeverCall) / jniMethodSize) < 0) {
return false;
}
LOGW("JNI Loaded");
return true;
}
\ No newline at end of file
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