VMOS Pro v2.9.9版本的 MD5 值为:42f292af86d02c1a08555cf2d3982a52
以下内容为反编译后的 C1477.java 源代码,内容仅作参考
package com.vmos.core;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.text.TextUtils;
import com.vmos.model.AndroidVersion;
import java.io.File;
import java.io.IOException;
class C1477 {
private static long m9279(PackageManager packageManager, String str) {
PackageInfo packageArchiveInfo = packageManager.getPackageArchiveInfo(str, 0);
ApplicationInfo applicationInfo = packageArchiveInfo.applicationInfo;
applicationInfo.sourceDir = str;
applicationInfo.publicSourceDir = str;
if (Build.VERSION.SDK_INT >= 28) {
return packageArchiveInfo.getLongVersionCode();
}
return packageArchiveInfo.versionCode;
}
private static void m9281(Context context, File file, File file2, File file3, AndroidVersion androidVersion, boolean z, boolean z2) {
if (file3 != null && file3.exists()) {
for (File file4 : file3.listFiles()) {
file4.delete();
}
}
if (file2.exists()) {
q75.m37393(context, file2.getAbsolutePath(), file3.getAbsolutePath());
}
if (!AndroidVersion.ANDROID_7_1.equals(androidVersion) && !AndroidVersion.ANDROID_9_0.equals(androidVersion)) {
if (!AndroidVersion.ANDROID_5_1.equals(androidVersion)) {
if (AndroidVersion.ANDROID_4_4.equals(androidVersion)) {
m9282(new File(file3, "lib/armeabi-v7a"), new File(file, "system/lib/"));
}
} else if (z) {
m9282(new File(file3, "lib/arm64-v8a"), new File(file, "system/lib64/"));
} else if (z2) {
m9282(new File(file3, "lib/armeabi-v7a"), new File(file, "system/lib/"));
}
} else {
if (z) {
m9282(new File(file3, "lib/arm64-v8a"), new File(file, "system/priv-app/romex/lib/arm64/"));
}
if (z2) {
m9282(new File(file3, "lib/armeabi-v7a"), new File(file, "system/priv-app/romex/lib/arm/"));
}
if (z || z2) {
return;
}
m9282(new File(file3, "lib/armeabi-v7a"), new File(file, "system/priv-app/romex/lib/arm/"));
m9282(new File(file3, "lib/arm64-v8a"), new File(file, "system/priv-app/romex/lib/arm64/"));
}
}
private static void m9282(File file, File file2) {
if (file2 != null && !file2.exists()) {
file2.mkdir();
}
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file3 : listFiles) {
String path = file3.getPath();
gc1.m21756(file3, new File(file2, path.substring(path.lastIndexOf(47) + 1)));
}
}
}
public static void m9283(Context context, int i, AndroidVersion androidVersion, boolean z, boolean z2) {
try {
String str = "/data/dalvik-cache/arm/system@priv-app@romex@romex.apk@classes.dex";
String str2 = "/data/dalvik-cache/arm64/system@priv-app@romex@romex.apk@classes.dex";
String str3 = "/system/priv-app/romex/";
String str4 = "romex.apk";
if (!AndroidVersion.ANDROID_7_1.equals(androidVersion) && !AndroidVersion.ANDROID_9_0.equals(androidVersion)) {
if (AndroidVersion.ANDROID_5_1.equals(androidVersion)) {
str3 = "/system/app/romex/";
str2 = "/data/dalvik-cache/arm64/system@app@romex@romex.apk@classes.dex";
str = "/data/dalvik-cache/arm/system@app@romex@romex.apk@classes.dex";
} else if (AndroidVersion.ANDROID_4_4.equals(androidVersion)) {
str3 = "/system/priv-app/";
str2 = "/data/dalvik-cache/system@priv-app@romex_cn.apk@classes.dex";
str4 = "romex_cn.apk";
str = "";
} else {
str = "";
str2 = str;
}
}
File m51711 = ya6.m51711(i);
File file = new File(m51711, str3);
File file2 = new File(file, str4);
if (m9280(context, file2)) {
if (!TextUtils.isEmpty(str2)) {
gc1.m21783(new File(m51711, str2));
}
if (!TextUtils.isEmpty(str)) {
gc1.m21783(new File(m51711, str));
}
if (!file.exists()) {
file.mkdir();
}
gc1.m21765(context.getAssets().open("romex_cn.apk"), file2);
ac6.m846("copy romex_cn.apk from asset", new Object[0]);
m9281(context, m51711, file2, new File(context.getApplicationInfo().dataDir, "romex"), androidVersion, z, z2);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static boolean m9280(Context context, File file) {
try {
if (file.exists()) {
PackageManager packageManager = context.getPackageManager();
long m9279 = m9279(packageManager, file.getAbsolutePath());
File file2 = new File(context.getCacheDir(), "romex_cn.apk");
gc1.m21765(context.getAssets().open(file2.getName()), file2);
long m92792 = m9279(packageManager, file2.getAbsolutePath());
file2.delete();
return m92792 > m9279;
}
return true;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
}