mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 01:55:53 +01:00
fix #970 and add long api level option
This commit is contained in:
parent
c6b2f26021
commit
5cdbca30fd
@ -133,14 +133,13 @@ public class Main {
|
|||||||
if (cli.hasOption("m") || cli.hasOption("match-original")) {
|
if (cli.hasOption("m") || cli.hasOption("match-original")) {
|
||||||
decoder.setAnalysisMode(true, false);
|
decoder.setAnalysisMode(true, false);
|
||||||
}
|
}
|
||||||
if (cli.hasOption("api")) {
|
if (cli.hasOption("api") || cli.hasOption("api-level")) {
|
||||||
decoder.setApi(Integer.parseInt(cli.getOptionValue("api")));
|
decoder.setApi(Integer.parseInt(cli.getOptionValue("api")));
|
||||||
}
|
}
|
||||||
if (cli.hasOption("o") || cli.hasOption("output")) {
|
if (cli.hasOption("o") || cli.hasOption("output")) {
|
||||||
outDir = new File(cli.getOptionValue("o"));
|
outDir = new File(cli.getOptionValue("o"));
|
||||||
decoder.setOutDir(outDir);
|
decoder.setOutDir(outDir);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// make out folder manually using name of apk
|
// make out folder manually using name of apk
|
||||||
String outName = apkName;
|
String outName = apkName;
|
||||||
outName = outName.endsWith(".apk") ? outName.substring(0,
|
outName = outName.endsWith(".apk") ? outName.substring(0,
|
||||||
@ -295,7 +294,7 @@ public class Main {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
Option apiLevelOption = Option.builder("api")
|
Option apiLevelOption = Option.builder("api")
|
||||||
.longOpt("api")
|
.longOpt("api-level")
|
||||||
.desc("The numeric api-level of the file to generate, e.g. 14 for ICS.")
|
.desc("The numeric api-level of the file to generate, e.g. 14 for ICS.")
|
||||||
.hasArg(true)
|
.hasArg(true)
|
||||||
.argName("API")
|
.argName("API")
|
||||||
@ -441,6 +440,7 @@ public class Main {
|
|||||||
for (Object op : frameOptions.getOptions()) {
|
for (Object op : frameOptions.getOptions()) {
|
||||||
allOptions.addOption((Option)op);
|
allOptions.addOption((Option)op);
|
||||||
}
|
}
|
||||||
|
allOptions.addOption(apiLevelOption);
|
||||||
allOptions.addOption(analysisOption);
|
allOptions.addOption(analysisOption);
|
||||||
allOptions.addOption(debugDecOption);
|
allOptions.addOption(debugDecOption);
|
||||||
allOptions.addOption(noDbgOption);
|
allOptions.addOption(noDbgOption);
|
||||||
|
Loading…
Reference in New Issue
Block a user