baksmali
Android DEX file disassembler
TLDR
Disassemble DEX file
SYNOPSIS
baksmali [options] dex-file
DESCRIPTION
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.
PARAMETERS
-o, --output dir
Output directory (default: out/)-a, --api-level level
API level for disassembly-x, --extract
Extract and disassemble APK-j, --jobs num
Number of threads-d, --bootclasspath jar
Bootclasspath for analysis-c, --bootclasspath-dir dir
Directory containing framework files--no-debug-info
Don't write debug information--use-locals
Output local variable information
FEATURES
- DEX to smali conversion
- Multi-DEX support
- API level awareness
- Parallel processing
- Debug info preservation
- Local variable names
WORKFLOW
baksmali classes.dex
# Disassemble APK
baksmali -x app.apk
# Reassemble with smali
smali out/ -o new-classes.dex
CAVEATS
Requires Java runtime. Obfuscated code produces hard-to-read output. API level affects instruction interpretation. For research and educational purposes only. Respect software licenses and terms of service.
HISTORY
baksmali (Icelandic for "disassembler") was created by Ben Gruver (JesusFreke) around 2010 as part of the smali project for Android reverse engineering.
