APK Decompilers
jadx
The recommended choice. Decompiles DEX to readable Java.
JD-Gui
Pioneering GUI Java decompiler. Open the APK directly in JD-Gui to inspect code.
Bytecode-Viewer
Analyze using multiple decompilers simultaneously for cross-verification.
GDA
Windows-only with extensive Android reverse engineering features.
CFR
Handles modern Java features well.
frida-DEXdump
Dumps the DEX of a running APK from memory — bypasses static obfuscation removed at runtime.
The Smali Workflow
Step 1 — Decompile with apktool
res/values/strings.xml(and all XMLs underres/values/*)AndroidManifest.xml- Any
.sqliteor.dbfiles
apktool d APP.apk -r (skip resource decoding).
Step 2 — Modify Smali Code
Smali is the human-readable representation of Dalvik bytecode. Reference for opcodes: http://pallergabor.uw.hu/androidblog/dalvik_opcodes.htmlHello World Example
Java source:Common Light Modifications
Adding Log Output
Injecting System.loadLibrary() Early
To preload a native library in a static initializer:
Application.onCreate():
Step 3 — Recompile
Step 4 — Sign the APK
Understanding Dalvik / ART
- Android apps are written in Java or Kotlin and compiled to Dalvik Executable (DEX) bytecode
- The Android Runtime (ART) uses Ahead-of-Time (AOT) compilation of DEX to native code
- Smali is the assembly language for DEX — the human-readable form
- baksmali disassembles DEX to Smali; smali assembles Smali back to DEX