mirror of
https://github.com/pxb1988/dex2jar.git
synced 2024-11-26 22:50:42 +00:00
Fix grammar & typo
This commit is contained in:
parent
121f727d37
commit
441d045797
@ -52,7 +52,7 @@ public class Jar2JasminCmd extends BaseCmd {
|
||||
|
||||
Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class Jasmin2JarCmd extends BaseCmd implements Opcodes {
|
||||
|
||||
Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class BaksmaliCmd extends BaseCmd {
|
||||
|
||||
File dex = new File(remainingArgs[0]);
|
||||
if (!dex.exists()) {
|
||||
System.err.println("ERROR: " + dex + " is not exists");
|
||||
System.err.println("ERROR: " + dex + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
if (output == null) {
|
||||
|
@ -101,7 +101,7 @@ public enum TypeClass {
|
||||
if ((thizCls == INT && clz == BOOLEAN) || (thizCls == BOOLEAN || clz == INT)) {
|
||||
return INT;
|
||||
}
|
||||
throw new RuntimeException("can not merge " + thizCls + " and " + clz);
|
||||
throw new RuntimeException("Can't merge " + thizCls + " and " + clz);
|
||||
} else {
|
||||
return thizCls;
|
||||
}
|
||||
@ -123,7 +123,7 @@ public enum TypeClass {
|
||||
*/
|
||||
private static TypeClass merge0(TypeClass a, TypeClass b) {
|
||||
if (a == JD || b == JD) {
|
||||
throw new RuntimeException("can not merge " + a + " and " + b);
|
||||
throw new RuntimeException("Can't merge " + a + " and " + b);
|
||||
}
|
||||
switch (a) {
|
||||
case ZIL:
|
||||
|
@ -281,7 +281,7 @@ public class DexFileReader implements BaseDexFileReader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a string index. String indicies are offset by 1, and a 0 value in the stream (-1 as returned by this
|
||||
* Reads a string index. String indices are offset by 1, and a 0 value in the stream (-1 as returned by this
|
||||
* method) means "null"
|
||||
*
|
||||
* @return index into file's string ids table, -1 means null
|
||||
@ -1095,7 +1095,7 @@ public class DexFileReader implements BaseDexFileReader {
|
||||
read_annotation_set_item(param_annotation_offset, dpav);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new DexException(e, "while accept parameter annotation in parameter:[%d]", j);
|
||||
throw new DexException(e, "While accepting parameter annotation in parameter: [%d]", j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class MultiDexFileReader implements BaseDexFileReader {
|
||||
return new MultiDexFileReader(dexFileReaders.values());
|
||||
}
|
||||
}
|
||||
throw new IOException("the src file not a .dex or zip file");
|
||||
throw new IOException("The source file is not a .dex or .zip file");
|
||||
}
|
||||
|
||||
void init() {
|
||||
|
@ -54,7 +54,7 @@ public class ApkSign extends BaseCmd {
|
||||
|
||||
Path apkIn = new File(remainingArgs[0]).toPath();
|
||||
if (!Files.exists(apkIn)) {
|
||||
System.err.println(apkIn + " is not exists");
|
||||
System.err.println(apkIn + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public class AsmVerify extends BaseCmd {
|
||||
for (String fn : remainingArgs) {
|
||||
Path file = new File(fn).toPath();
|
||||
if (!Files.exists(file)) {
|
||||
System.err.println(fn + " is not exists");
|
||||
System.err.println(fn + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class DeObfInitCmd extends BaseCmd {
|
||||
|
||||
Path jar = new File(remainingArgs[0]).toPath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ public class DecryptStringCmd extends BaseCmd {
|
||||
|
||||
final Path jar = new File(remainingArgs[0]).toPath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
if (output == null) {
|
||||
|
@ -44,7 +44,7 @@ public class DexRecomputeChecksum extends BaseCmd {
|
||||
|
||||
Path jar = new File(remainingArgs[0]).toPath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -14,7 +14,8 @@ import java.nio.file.FileSystem;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@BaseCmd.Syntax(cmd = "d2j-generate-stub-from-odex", syntax = "[options] <odex0> [odex1 ... odexN]", desc = "Genenerate no-code jar from odex")
|
||||
@BaseCmd.Syntax(cmd = "d2j-generate-stub-from-odex", syntax = "[options] <odex0> [odex1 ... odexN]", desc =
|
||||
"Generate no-code jar from odex")
|
||||
public class GenerateCompileStubFromOdex extends BaseCmd {
|
||||
private static final int MAGIC_ODEX = 0x0A796564 & 0x00FFFFFF;// hex for 'dey ', ignore the 0A
|
||||
private static final int MAGIC_DEX = 0x0A786564 & 0x00FFFFFF;// hex for 'dex ', ignore the 0A
|
||||
@ -31,7 +32,7 @@ public class GenerateCompileStubFromOdex extends BaseCmd {
|
||||
@Override
|
||||
protected void doCommandLine() throws Exception {
|
||||
if (remainingArgs.length == 0) {
|
||||
throw new HelpException("no odex");
|
||||
throw new HelpException("No odex");
|
||||
}
|
||||
if (output == null) {
|
||||
output = new File("stub.jar").toPath();
|
||||
@ -40,7 +41,7 @@ public class GenerateCompileStubFromOdex extends BaseCmd {
|
||||
try (FileSystem fs = createZip(output)) {
|
||||
Path out = fs.getPath("/");
|
||||
for (String x : remainingArgs) {
|
||||
System.err.println("process " + x + " ...");
|
||||
System.err.println("Processing " + x + " ...");
|
||||
ByteBuffer bs = ByteBuffer.wrap(Files.readAllBytes(new File(x).toPath()))
|
||||
.order(ByteOrder.LITTLE_ENDIAN);
|
||||
int magic = bs.getInt(0) & 0x00FFFFFF;
|
||||
@ -53,7 +54,7 @@ public class GenerateCompileStubFromOdex extends BaseCmd {
|
||||
} else if (magic == MAGIC_DEX) {
|
||||
doDex(bs, out);
|
||||
} else {
|
||||
throw new RuntimeException("file " + x + " is not an dex or odex");
|
||||
throw new RuntimeException("File " + x + " is not an dex or odex");
|
||||
}
|
||||
|
||||
}
|
||||
@ -70,7 +71,7 @@ public class GenerateCompileStubFromOdex extends BaseCmd {
|
||||
public ClassVisitor create(final String classInternalName) {
|
||||
final Path target = out.resolve(classInternalName + ".class");
|
||||
if (Files.exists(target)) {
|
||||
System.err.println("class " + classInternalName + " is already exists, skipping.");
|
||||
System.err.println("Class " + classInternalName + " already exists, skipping.");
|
||||
return null;
|
||||
}
|
||||
return new ClassVisitor(Opcodes.ASM4, new ClassWriter(ClassWriter.COMPUTE_MAXS)) {
|
||||
|
@ -126,7 +126,7 @@ public class JarAccessCmd extends BaseCmd implements Opcodes {
|
||||
|
||||
Path jar = new File(remainingArgs[0]).toPath();
|
||||
if (!Files.exists(jar)) {
|
||||
System.err.println(jar + " is not exists");
|
||||
System.err.println(jar + " doesn't exist");
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class ExDex2Asm extends Dex2Asm {
|
||||
super.convertCode(methodNode, mn, clzCtx);
|
||||
} catch (Exception ex) {
|
||||
if (exceptionHandler == null) {
|
||||
throw new DexException(ex, "fail convert code for %s", methodNode.method);
|
||||
throw new DexException(ex, "Failed to convert code for %s", methodNode.method);
|
||||
} else {
|
||||
mn.instructions.clear();
|
||||
mn.tryCatchBlocks.clear();
|
||||
|
@ -308,7 +308,7 @@ public abstract class TestUtils {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
throw new DexException(ex, "fail convert code %s", methodNode.method);
|
||||
throw new DexException(ex, "Failed to convert code for %s", methodNode.method);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user