From 92d690894a3d91f776c39fb83b464f1d0c3e422a Mon Sep 17 00:00:00 2001 From: Ben Gruver Date: Sun, 7 Apr 2013 16:21:41 -0700 Subject: [PATCH] Remove some unneeded baksmali command line options --- .../main/java/org/jf/baksmali/baksmali.java | 6 +-- .../src/main/java/org/jf/baksmali/main.java | 44 +------------------ 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/baksmali/src/main/java/org/jf/baksmali/baksmali.java b/baksmali/src/main/java/org/jf/baksmali/baksmali.java index f23e54a3..f92a0c9d 100644 --- a/baksmali/src/main/java/org/jf/baksmali/baksmali.java +++ b/baksmali/src/main/java/org/jf/baksmali/baksmali.java @@ -53,7 +53,6 @@ public class baksmali { public static boolean addCodeOffsets = false; public static boolean noAccessorComments = false; public static boolean deodex = false; - public static boolean verify = false; public static InlineMethodResolver inlineResolver = null; public static int registerInfo = 0; public static String bootClassPath; @@ -64,8 +63,8 @@ public class baksmali { String[] classPathDirs, String bootClassPath, String extraBootClassPath, boolean noParameterRegisters, boolean useLocalsDirective, boolean useSequentialLabels, boolean outputDebugInfo, boolean addCodeOffsets, - boolean noAccessorComments, int registerInfo, boolean verify, - boolean ignoreErrors, String inlineTable, boolean checkPackagePrivateAccess) + boolean noAccessorComments, int registerInfo, boolean ignoreErrors, + String inlineTable, boolean checkPackagePrivateAccess) { baksmali.noParameterRegisters = noParameterRegisters; baksmali.useLocalsDirective = useLocalsDirective; @@ -76,7 +75,6 @@ public class baksmali { baksmali.deodex = deodex; baksmali.registerInfo = registerInfo; baksmali.bootClassPath = bootClassPath; - baksmali.verify = verify; //TODO: uncomment /*if (registerInfo != 0 || deodex || verify) { diff --git a/baksmali/src/main/java/org/jf/baksmali/main.java b/baksmali/src/main/java/org/jf/baksmali/main.java index 11fb69a7..23782a1b 100644 --- a/baksmali/src/main/java/org/jf/baksmali/main.java +++ b/baksmali/src/main/java/org/jf/baksmali/main.java @@ -101,9 +101,6 @@ public class main { boolean disassemble = true; boolean doDump = false; - boolean write = false; - boolean sort = false; - boolean fixRegisters = false; boolean noParameterRegisters = false; boolean useLocalsDirective = false; boolean useSequentialLabels = false; @@ -111,7 +108,6 @@ public class main { boolean addCodeOffsets = false; boolean noAccessorComments = false; boolean deodex = false; - boolean verify = false; boolean ignoreErrors = false; boolean checkPackagePrivateAccess = false; @@ -121,7 +117,6 @@ public class main { String outputDirectory = "out"; String dumpFileName = null; - String outputDexFileName = null; String inputDexFileName = null; String bootClassPath = null; StringBuffer extraBootClassPathEntries = new StringBuffer(); @@ -230,19 +225,6 @@ public class main { case 'I': ignoreErrors = true; break; - case 'W': - write = true; - outputDexFileName = commandLine.getOptionValue("W"); - break; - case 'S': - sort = true; - break; - case 'F': - fixRegisters = true; - break; - case 'V': - verify = true; - break; case 'T': inlineTable = commandLine.getOptionValue("T"); break; @@ -304,7 +286,7 @@ public class main { baksmali.disassembleDexFile(dexFileFile.getPath(), dexFile, deodex, outputDirectory, bootClassPathDirsArray, bootClassPath, extraBootClassPathEntries.toString(), noParameterRegisters, useLocalsDirective, useSequentialLabels, outputDebugInfo, addCodeOffsets, - noAccessorComments, registerInfo, verify, ignoreErrors, inlineTable, checkPackagePrivateAccess); + noAccessorComments, registerInfo, ignoreErrors, inlineTable, checkPackagePrivateAccess); } // TODO: implement rewrite + optional sort functionality @@ -456,30 +438,10 @@ public class main { " behavior is to stop disassembling and exit once an error is encountered") .create("I"); - Option noDisassemblyOption = OptionBuilder.withLongOpt("no-disassembly") .withDescription("suppresses the output of the disassembly") .create("N"); - Option writeDexOption = OptionBuilder.withLongOpt("write-dex") - .withDescription("additionally rewrites the input dex file to FILE") - .hasArg() - .withArgName("FILE") - .create("W"); - - Option sortOption = OptionBuilder.withLongOpt("sort") - .withDescription("sort the items in the dex file into a canonical order before dumping/writing") - .create("S"); - - Option fixSignedRegisterOption = OptionBuilder.withLongOpt("fix-signed-registers") - .withDescription("when dumping or rewriting, fix any registers in the debug info that are encoded as" + - " a signed value") - .create("F"); - - Option verifyDexOption = OptionBuilder.withLongOpt("verify") - .withDescription("perform bytecode verification") - .create("V"); - Option inlineTableOption = OptionBuilder.withLongOpt("inline-table") .withDescription("specify a file containing a custom inline method table to use for deodexing") .hasArg() @@ -510,10 +472,6 @@ public class main { debugOptions.addOption(dumpOption); debugOptions.addOption(ignoreErrorsOption); debugOptions.addOption(noDisassemblyOption); - debugOptions.addOption(writeDexOption); - debugOptions.addOption(sortOption); - debugOptions.addOption(fixSignedRegisterOption); - debugOptions.addOption(verifyDexOption); debugOptions.addOption(inlineTableOption); debugOptions.addOption(checkPackagePrivateAccess);