Linux command
baksmali 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Disassemble
baksmali disassemble [classes.dex]
Example
baksmali disassemble -o [output/] [classes.dex]
Specify
baksmali disassemble -a [28] [classes.dex]
List
baksmali --help
List DEX classes
baksmali list classes [classes.dex]
Disassemble
baksmali disassemble --code-offsets [classes.dex]
说明
baksmali is a disassembler for Android DEX (Dalvik Executable) files. It converts DEX bytecode into smali assembly language, enabling analysis, modification, and reverse engineering of Android applications. The tool is the counterpart to smali, together forming a complete assembler/disassembler suite for Android. Since version 2.0, baksmali uses a subcommand-based interface.
参数
- disassemble (or d)
- Disassemble a DEX file into smali files.
- list _type_
- List items (classes, methods, fields, etc.) from a DEX file.
- deodex (or x)
- Deodex an odex/oat file.
- -o, --output _dir_
- Output directory (default: out/).
- -a, --api-level _level_
- API level for disassembly.
- -j, --jobs _num_
- Number of threads for parallel processing.
- -b, --bootclasspath _classpath_
- Colon-separated bootclasspath jars for analysis.
- -d, --bootclasspath-dir _dir_
- Directory containing framework files.
- --debug-info, --di
- Include debug metadata in output (default: true).
- --use-locals
- Use .locals directive instead of .registers.
- --code-offsets, --off
- Add a comment before each instruction with its code offset.
- --accessor-comments, --ac
- Generate helper comments for synthetic accessors (default: true).
- --sequential-labels, --sl
- Use sequential numbering for labels.
- --classes _LIST_
- Comma-separated list of classes to disassemble.
FAQ
What is the baksmali command used for?
baksmali is a disassembler for Android DEX (Dalvik Executable) files. It converts DEX bytecode into smali assembly language, enabling analysis, modification, and reverse engineering of Android applications. The tool is the counterpart to smali, together forming a complete assembler/disassembler suite for Android. Since version 2.0, baksmali uses a subcommand-based interface.
How do I run a basic baksmali example?
Run `baksmali disassemble [classes.dex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does disassemble (or d) do in baksmali?
Disassemble a DEX file into smali files.