MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / init

Function init

Bcore/src/main/cpp/VmCore.cpp:156–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void init(JNIEnv *env, jobject clazz, jint api_level) {
157 ALOGD("VmCore init.");
158 VMEnv.api_level = api_level;
159 VMEnv.VMCoreClass = (jclass) env->NewGlobalRef(env->FindClass(VMCORE_CLASS));
160 VMEnv.getCallingUidId = env->GetStaticMethodID(VMEnv.VMCoreClass, "getCallingUid", "(I)I");
161 VMEnv.redirectPathString = env->GetStaticMethodID(VMEnv.VMCoreClass, "redirectPath",
162 "(Ljava/lang/String;)Ljava/lang/String;");
163 VMEnv.redirectPathFile = env->GetStaticMethodID(VMEnv.VMCoreClass, "redirectPath",
164 "(Ljava/io/File;)Ljava/io/File;");
165 VMEnv.loadEmptyDex = env->GetStaticMethodID(VMEnv.VMCoreClass, "loadEmptyDex",
166 "()[J");
167 VMEnv.findMethod = env->GetStaticMethodID(VMEnv.VMCoreClass, "findMethod",
168 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;");
169
170 ArtM::InitArtMethod(env, api_level);
171 JniHook::InitJniHook(env, api_level);
172}
173
174void addIORule(JNIEnv *env, jclass clazz, jstring target_path,
175 jstring relocate_path) {

Callers 2

nativeHookFunction · 0.70
enableIOFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected