| 86 | } |
| 87 | |
| 88 | void init(JNIEnv *env, jobject clazz, jint api_level) { |
| 89 | ALOGD("NativeCore init."); |
| 90 | VMEnv.api_level = api_level; |
| 91 | VMEnv.NativeCoreClass = (jclass) env->NewGlobalRef(env->FindClass(VMCORE_CLASS)); |
| 92 | VMEnv.getCallingUidId = env->GetStaticMethodID(VMEnv.NativeCoreClass, "getCallingUid", "(I)I"); |
| 93 | VMEnv.redirectPathString = env->GetStaticMethodID(VMEnv.NativeCoreClass, "redirectPath", |
| 94 | "(Ljava/lang/String;)Ljava/lang/String;"); |
| 95 | VMEnv.redirectPathFile = env->GetStaticMethodID(VMEnv.NativeCoreClass, "redirectPath", |
| 96 | "(Ljava/io/File;)Ljava/io/File;"); |
| 97 | VMEnv.loadEmptyDex = env->GetStaticMethodID(VMEnv.NativeCoreClass, "loadEmptyDex", |
| 98 | "()[J"); |
| 99 | |
| 100 | JniHook::InitJniHook(env, api_level); |
| 101 | } |
| 102 | |
| 103 | void addIORule(JNIEnv *env, jclass clazz, jstring target_path, |
| 104 | jstring relocate_path) { |
no outgoing calls
no test coverage detected