Skip to content

Commit

Permalink
style: normalize command descs and redundancy (#3188)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorEisberg authored Jul 21, 2023
1 parent d4ec44d commit 79b2173
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
32 changes: 16 additions & 16 deletions brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ private static void _Options() {
// create options
Option versionOption = Option.builder("version")
.longOpt("version")
.desc("prints the version then exits")
.desc("Print the version.")
.build();

Option advanceOption = Option.builder("advance")
.longOpt("advanced")
.desc("prints advance information.")
.desc("Print advanced information.")
.build();

Option noSrcOption = Option.builder("s")
Expand Down Expand Up @@ -347,7 +347,7 @@ private static void _Options() {

Option analysisOption = Option.builder("m")
.longOpt("match-original")
.desc("Keeps files to closest to original as possible. Prevents rebuild.")
.desc("Keep files to closest to original as possible (prevents rebuild).")
.build();

Option apiLevelOption = Option.builder("api")
Expand All @@ -359,17 +359,17 @@ private static void _Options() {

Option debugBuiOption = Option.builder("d")
.longOpt("debug")
.desc("Sets android:debuggable to \"true\" in the APK's compiled manifest")
.desc("Set android:debuggable to \"true\" in the APK's compiled manifest.")
.build();

Option netSecConfOption = Option.builder("n")
.longOpt("net-sec-conf")
.desc("Adds a generic Network Security Configuration file in the output APK")
.build();
.longOpt("net-sec-conf")
.desc("Add a generic Network Security Configuration file in the output APK")
.build();

Option noDbgOption = Option.builder("b")
.longOpt("no-debug-info")
.desc("don't write out debug info (.local, .param, .line, etc.)")
.desc("Do not write out debug info (.local, .param, .line, etc.)")
.build();

Option forceDecOption = Option.builder("f")
Expand All @@ -379,21 +379,21 @@ private static void _Options() {

Option frameTagOption = Option.builder("t")
.longOpt("frame-tag")
.desc("Uses framework files tagged by <tag>.")
.desc("Use framework files tagged by <tag>.")
.hasArg(true)
.argName("tag")
.build();

Option frameDirOption = Option.builder("p")
.longOpt("frame-path")
.desc("Uses framework files located in <dir>.")
.desc("Use framework files located in <dir>.")
.hasArg(true)
.argName("dir")
.build();

Option frameIfDirOption = Option.builder("p")
.longOpt("frame-path")
.desc("Stores framework files into <dir>.")
.desc("Store framework files into <dir>.")
.hasArg(true)
.argName("dir")
.build();
Expand All @@ -415,17 +415,17 @@ private static void _Options() {
.longOpt("aapt")
.hasArg(true)
.argName("loc")
.desc("Loads aapt from specified location.")
.desc("Load aapt from specified location.")
.build();

Option aapt2Option = Option.builder()
.longOpt("use-aapt2")
.desc("Upgrades apktool to use experimental aapt2 binary.")
.desc("Use aapt2 binary instead of aapt1 during the build step.")
.build();

Option originalOption = Option.builder("c")
.longOpt("copy-original")
.desc("Copies original AndroidManifest.xml and META-INF. See project page for more info.")
.desc("Copy original AndroidManifest.xml and META-INF. See project page for more info.")
.build();

Option noCrunchOption = Option.builder("nc")
Expand All @@ -442,14 +442,14 @@ private static void _Options() {

Option outputBuiOption = Option.builder("o")
.longOpt("output")
.desc("The name of apk that gets written. Default is dist/name.apk")
.desc("The name of apk that gets written. (default: dist/name.apk)")
.hasArg(true)
.argName("dir")
.build();

Option outputDecOption = Option.builder("o")
.longOpt("output")
.desc("The name of folder that gets written. Default is apk.out")
.desc("The name of folder that gets written. (default: apk.out)")
.hasArg(true)
.argName("dir")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ private void buildNonDefaultSources(ExtFile appDir)
File[] dexFiles = appDir.listFiles();
if (dexFiles != null) {
for (File dex : dexFiles) {

// skip classes.dex because we have handled it in buildSources()
if (dex.getName().endsWith(".dex") && ! dex.getName().equalsIgnoreCase("classes.dex")) {
buildSourcesRaw(appDir, dex.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
import java.util.logging.Logger;

public class ResourcesDecoder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.android.tools.smali.dexlib2.Opcodes;
import com.android.tools.smali.dexlib2.writer.builder.DexBuilder;
import com.android.tools.smali.dexlib2.writer.io.FileDataStore;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down
1 change: 1 addition & 0 deletions brut.j.util/src/main/java/brut/util/Duo.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public Duo(T1 t1, T2 t2) {
this.m2 = t2;
}

@SuppressWarnings("unchecked")
@Override
public boolean equals(Object obj) {
if (obj == null) {
Expand Down

0 comments on commit 79b2173

Please sign in to comment.