dex2jar包装说明

dex2jar包含以下compments:

  • DEX-阅读器用于读取的Dalvik可执行(.dex / .odex)格式。它具有重量轻API与ASM相似。
  • DEX-翻译是专门做的转换工作。它读取DEX指令DEX-IR格式,一些优化后,转换为ASM格式。
  • DEX-IR使用DEX-翻译,设计为代表的地塞米松指令
  • DEX-工具工具与.class文件的工作。下面举例说明:修改APK,反混淆一个JAR
  • d2j-smali [即将出版]拆机DEX到smali文件并从smali文件汇编DEX。不同的实施smali / baksmali,相同的语法,但我们支持逃生型递减“LCOM / dex2jar \ t \ u1234;”
  • DEX-作家[即将出版]写DEX同样的方式DEX阅读器。

资料来源:https://code.google.com/p/dex2jar/
dex2jar首页 | 卡利dex2jar回购

  • 作者:Panxiaobo
  • 许可:Apache的2.0

包含在dex2jar包工具

d2j-jar2dex - 转换罐子通过调用DX到DEX
[email protected]:~# d2j-jar2dex -h
d2j-jar2dex -- Convert jar to dex by invoking dx.
usage: d2j-jar2dex [options] <dir>
options:
 -f,--force                   force overwrite
 -h,--help                    Print this help message
 -o,--output <out-dex-file>   output .dex file, default is $current_dir/[jar-nam
                              e]-jar2dex.dex
version: 0.0.9.15

d2j-JAR重新映射 - 在一个罐子里重命名的包/类/方法/字段名

[email protected]:~# d2j-jar-remap -h
d2j-jar-remap -- rename package/class/method/field name in a jar
usage: d2j-jar-remap [options] jar
options:
 -c,--config <config>    config file for remap, this is REQUIRED
 -f,--force              force overwrite
 -h,--help               Print this help message
 -o,--output <out-jar>   output .jar file, default is $current_dir/[jar-name]-re
                         map.jar
version: 0.0.9.15
online help: https://code.google.com/p/dex2jar/wiki/DeObfuscateJarWithDexTool

d2j-dex2jar - DEX转换到jar

[email protected]:~# d2j-dex2jar -h
d2j-dex2jar -- convert dex to jar
usage: d2j-dex2jar [options] <file0> [file1 ... fileN]
options:
 -d,--debug-info              translate debug info
 -e,--exception-file <file>   detail exception file, default is $current_dir/[fi
                              le-name]-error.zip
 -f,--force                   force overwrite
 -h,--help                    Print this help message
 -n,--not-handle-exception    not handle any exception throwed by dex2jar
 -o,--output <out-jar-file>   output .jar file, default is $current_dir/[file-na
                              me]-dex2jar.jar
 -os,--optmize-synchronized   optmize-synchronized
 -p,--print-ir                print ir to Syste.out
 -r,--reuse-reg               reuse regiter while generate java .class file
 -s                           same with --topological-sort/-ts
 -ts,--topological-sort       sort block by topological, that will generate more
                               readable code
 -v,--verbose                 show progress
version: reader-1.15, translator-0.0.9.15, ir-1.12

dex2jar - 这CMD已过时,使用d2j-dex2jar如果可能的话

[email protected]:~# dex2jar
this cmd is deprecated, use the d2j-dex2jar if possible
dex2jar version: translator-0.0.9.15
dex2jar file1.dexORapk file2.dexORapk ...

d2j-jasmin2jar - 组装.J文件到.class文件

[email protected]:~# d2j-jasmin2jar -h
d2j-jasmin2jar -- d2j-jasmin2jar - assemble .j files to .class file
usage: d2j-jasmin2jar [options] <dir>
options:
 -e,--encoding <enc>             encoding for .j files, default is UTF-8
 -f,--force                      force overwrite
 -g,--autogenerate-linenumbers   autogenerate-linenumbers
 -h,--help                       Print this help message
 -o,--output <out-jar-file>      output .jar file, default is $current_dir/[jar-
                                 name]-jasmin2jar.jar
version: 0.0.9.15

d2j-JAR访问 - 添加或删除JAR文件类/方法/字段访问

d2j-ASM-验证 - 验证的.class在罐子

[email protected]:~# d2j-asm-verify -h
d2j-asm-verify -- Verify .class in jar
usage: d2j-asm-verify [options] <jar0> [jar1 ... jarN]
options:
 -d,--detail   Print detail error message
 -h,--help     Print this help message
version: 0.0.9.15

d2j-DEX-转储

[email protected]:~# d2j-dex-dump -h
Dump in.dexORapk out.dump.jar

d2j-INIT-deobf - 生成反混淆一个罐子一个init配置文件

[email protected]:~# d2j-init-deobf -h
d2j-init-deobf -- generate an init config file for deObfuscate a jar
usage: d2j-init-deobf [options] <jar>
options:
 -f,--force                force overwrite
 -h,--help                 Print this help message
 -max,--max-length <MAX>   do the rename if the length > MIN, default is 40
 -min,--min-length <MIN>   do the rename if the length < MIN, default is 2
 -o,--output <out-file>    output .jar file, default is $current_dir/[file-name]
                           -deobf-init.txt
version: 0.0.9.15

d2j-APK-SIGN - 注册一个Android APK文件使用一个测试证书

[email protected]:~# d2j-apk-sign -h
d2j-apk-sign -- Sign an android apk file use a test certificate.
usage: d2j-apk-sign [options] <apk>
options:
 -f,--force                   force overwrite
 -h,--help                    Print this help message
 -o,--output <out-apk-file>   output .apk file, default is $current_dir/[apk-nam
                              e]-signed.apk
 -w,--sign-whole              Sign whole apk file
version: 0.0.9.15

d2j-jar2jasmin - 拆卸的.class在JAR文件茉莉文件

[email protected]:~# d2j-jar2jasmin -h
d2j-jar2jasmin -- Disassemble .class in jar file to jasmin file
usage: d2j-jar2jasmin [options] <jar>
options:
 -d,--debug              disassemble debug info
 -e,--encoding <enc>     encoding for .j files, default is UTF-8
 -f,--force              force overwrite
 -h,--help               Print this help message
 -o,--output <out-dir>   output dir of .j files, default is $current_dir/[jar-na
                         me]-jar2jasmin/
version: 0.0.9.15

d2j-dex2jar用法示例

[email protected]:~# d2j-dex2jar /usr/share/metasploit-framework/data/android/apk/classes.dex
dex2jar /usr/share/metasploit-framework/data/android/apk/classes.dex -> classes-dex2jar.jar