public static void onOpenDexFileNative(String[] params) { String dexOrJarPath = params[0]; String outputPath = params[1]; VLog.d(TAG, "DexOrJarPath = %s, OutputPath = %s.", dexOrJarPath, outputPath); try { String canonical = new File(dexOrJarPath).getCanonicalPath(); InstalledAppInfo info = sDexOverrideMap.get(canonical); if (info != null && !info.dependSystem || info != null && DeviceUtil.isMeizuBelowN() && params[1] == null) { outputPath = info.getOdexFile().getPath(); params[1] = outputPath; } } catch (IOException e) { e.printStackTrace(); } }
List<InstalledAppInfo> modules = VirtualCore.get().getInstalledApps(0); for (InstalledAppInfo module : modules) { ExposedBridge.loadModule(module.apkPath, module.getOdexFile().getParent(), module.libPath, data.appInfo, originClassLoader);
public static void onOpenDexFileNative(String[] params) { String dexOrJarPath = params[0]; String outputPath = params[1]; VLog.d(TAG, "DexOrJarPath = %s, OutputPath = %s.", dexOrJarPath, outputPath); try { String canonical = new File(dexOrJarPath).getCanonicalPath(); InstalledAppInfo info = sDexOverrideMap.get(canonical); if (info != null && !info.dependSystem) { outputPath = info.getOdexFile().getPath(); params[1] = outputPath; } } catch (IOException e) { e.printStackTrace(); } }
public static void onOpenDexFileNative(String[] params) { String dexOrJarPath = params[0]; String outputPath = params[1]; VLog.d(TAG, "DexOrJarPath = %s, OutputPath = %s.", dexOrJarPath, outputPath); try { String canonical = new File(dexOrJarPath).getCanonicalPath(); InstalledAppInfo info = sDexOverrideMap.get(canonical); if (info != null && !info.dependSystem || info != null && DeviceUtil.isMeizuBelowN() && params[1] == null) { outputPath = info.getOdexFile().getPath(); params[1] = outputPath; } } catch (IOException e) { e.printStackTrace(); } }
/** * Optimize the Dalvik-Cache for the specified package. * * @param pkg package name * @throws IOException */ @Deprecated public void preOpt(String pkg) throws IOException { InstalledAppInfo info = getInstalledAppInfo(pkg, 0); if (info != null && !info.dependSystem) { DexFile.loadDex(info.apkPath, info.getOdexFile().getPath(), 0).close(); } }