privatefunfix() { val pathList = on(javaClass.classLoader).field("pathList").get<Any>() val dexElements = on(pathList).field("dexElements").get<Array<Any>>() val apkPath = on(dexElements[0]).field("path").get<File>().absolutePath val cpuAbi = Reflect.onClass("android.os.SystemProperties").call("get", "ro.product.cpu.abi")
private ClassLoader getClassLoader(String zip, int targetSdkVersion, boolean isBundled, String librarySearchPath, String libraryPermittedPath, ClassLoader parent, String cacheKey, String classLoaderName, List<ClassLoader> sharedLibraries, List<String> nativeSharedLibraries, List<ClassLoader> sharedLibrariesLoadedAfterApp) { /* * This is the parent we use if they pass "null" in. In theory * this should be the "system" class loader; in practice we * don't use that and can happily (and more efficiently) use the * bootstrap class loader. */ ClassLoaderbaseParent= ClassLoader.getSystemClassLoader().getParent();
/* * If we're one step up from the base class loader, find * something in our cache. Otherwise, we create a whole * new ClassLoader for the zip archive. */ if (parent == baseParent) { ClassLoaderloader= mLoaders.get(cacheKey); if (loader != null) { return loader; }