工欲善其事,必先利其器之—Android 反编译利器-jadx
程序员文章站
2022-07-12 19:46:54
...
介绍
jadx 优点:
* 图形化的界面(代码的全局搜索,引用跳转)。
* 拖拽式的操作。
* 反编译输出 Java 代码。
* 导出 Gradle 工程。
安装
官网下载解缩包后,指定访问配置即可
# .bash_profile中新加如下代码后,在终端source .bash_profile后可以愉快的工作了^-^
alias jadx='${HOME}/dev_tool/jadx-0.7.1/bin/jadx'
alias jadx-gui='${HOME}/dev_tool/jadx-0.7.1/bin/jadx-gui'
使用
命令行环境
cmd下使用jadx
aaa@qq.com ~$ jadx -h
jadx - dex to java decompiler, version: 0.7.1
usage: jadx [options] <input file> (.apk, .dex, .jar or .class)
options:
-d, --output-dir - output directory
-ds, --output-dir-src - output directory for sources
-dr, --output-dir-res - output directory for resources
-r, --no-res - do not decode resources
-s, --no-src - do not decompile source code
-e, --export-gradle - save as android gradle project
-j, --threads-count - processing threads count
--show-bad-code - show inconsistent code (incorrectly decompiled)
--no-imports - disable use of imports, always write entire package name
--no-replace-consts - don't replace constant value with matching constant field
--escape-unicode - escape non latin characters in strings (with \u)
--deobf - activate deobfuscation
--deobf-min - min length of name
--deobf-max - max length of name
--deobf-rewrite-cfg - force to save deobfuscation map
--deobf-use-sourcename- use source file name as class name alias
--cfg - save methods control flow graph to dot file
--raw-cfg - save methods control flow graph (use raw instructions)
-f, --fallback - make simple dump (using goto instead of 'if', 'for', etc)
-v, --verbose - verbose output
--version - print jadx version
-h, --help - print this help
Example:
jadx -d out classes.dex
图形界面
GUI环境,通过jadx-gui启动jadx的图形界面,当然可以跟参数直接打开某个dex文件
aaa@qq.com-MacBook-Pro temp$ jadx-gui classes.dex