configurable proxy app name

This commit is contained in:
327135569 2021-04-05 01:51:21 +08:00
parent fe0bb0f732
commit 64a9076931
1 changed files with 5 additions and 7 deletions

View File

@ -36,6 +36,9 @@ public class MainCommand extends BaseCommand {
@Opt(opt = "f", longOpt = "force", hasArg = false, description = "force overwrite") @Opt(opt = "f", longOpt = "force", hasArg = false, description = "force overwrite")
private boolean forceOverwrite = false; private boolean forceOverwrite = false;
@Opt(opt = "pn", longOpt = "proxyname", description = "special proxy app name with full dot path", argName = "proxy app name")
private String proxyname = "com.wind.xposed.entry.MMPApplication";
@Opt(opt = "c", longOpt = "crach", hasArg = false, @Opt(opt = "c", longOpt = "crach", hasArg = false,
description = "disable craching the apk's signature.") description = "disable craching the apk's signature.")
private boolean disableCrackSignature = false; private boolean disableCrackSignature = false;
@ -59,16 +62,11 @@ public class MainCommand extends BaseCommand {
argName = "new-version-name") argName = "new-version-name")
private String versionName; private String versionName;
@Opt(opt = "w", longOpt = "whale", hasArg = false, description = "Change hook framework to Lody's whale")
private boolean useWhaleHookFramework = false; // 是否使用whale hook框架默认使用的是SandHook
// 原来apk中dex文件的数量 // 原来apk中dex文件的数量
private int dexFileCount = 0; private int dexFileCount = 0;
private static final String UNZIP_APK_FILE_NAME = "apk-unzip-files"; private static final String UNZIP_APK_FILE_NAME = "apk-unzip-files";
private static final String PROXY_APPLICATION_NAME = "com.wind.xpatch.proxy.XpatchProxyApplication";
private List<Runnable> mXpatchTasks = new ArrayList<>(); private List<Runnable> mXpatchTasks = new ArrayList<>();
public static void main(String... args) { public static void main(String... args) {
@ -243,7 +241,7 @@ public class MainCommand extends BaseCommand {
if (!dexModificationMode || !isNotEmpty(originalApplicationName)) { if (!dexModificationMode || !isNotEmpty(originalApplicationName)) {
modifyEnabled = true; modifyEnabled = true;
property.addApplicationAttribute(new AttributeItem(NodeValue.Application.NAME, PROXY_APPLICATION_NAME)); property.addApplicationAttribute(new AttributeItem(NodeValue.Application.NAME, proxyname));
} }
if (modifyEnabled) { if (modifyEnabled) {
@ -272,7 +270,7 @@ public class MainCommand extends BaseCommand {
// Use the current timestamp as the name of the build file // Use the current timestamp as the name of the build file
private String currentTimeStr() { private String currentTimeStr() {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
return df.format(new Date()); return df.format(new Date());
} }