| name | tool-reference |
| description | Optimized command-line arguments for all Android RE tools — jadx, baksmali, aapt, apkid, rg. Use when running any analysis tool to get the best flags and arguments. |
When to use: Running any RE tool. Use these optimized flags for best results. Always use rg instead of grep. For jadx, prefer Kaggle remote (.kiro/jadx-decompile) for large APKs, local only for small/quick tasks.
Tool Reference — Optimized Arguments
ripgrep (rg) — Fast Code Search
Use rg instead of grep everywhere. It's faster, respects .gitignore, and has better output.
rg "pattern" path/ -g "*.java"
rg "pattern" path/ -g "*.java" -l
rg "pattern" path/ -g "*.java" -C 3
rg "pattern" path/ -g "*.java" -A 10
rg -i "pattern" path/
rg "pattern" path/ -g "*.java" -c
rg -o "pattern" path/
rg "pattern" path/ --max-count 3
rg "pattern" path/ -g "*.smali"
rg -F "exact.string.match" path/
rg "pattern1|pattern2|pattern3" path/ -g "*.java" -l
rg "pattern" path/ --glob '!**/test/**'
jadx — APK Decompiler
Remote (Kaggle — primary method)
.kiro/jadx-decompile "<url>" analysis/<app>/
Local (small APKs only)
jadx -d output/ input.apk \
--deobf \
--show-bad-code \
--decompilation-mode restructure \
-j $(nproc) \
-Pdex-input.verify-checksum=no \
-Pkotlin-metadata.class-alias=yes \
-Pkotlin-metadata.method-args=yes \
-Pkotlin-metadata.fields=yes \
-Pkotlin-metadata.data-class=yes \
-Pkotlin-metadata.to-string=yes \
-Pkotlin-metadata.getters=yes \
--use-source-name-as-class-name-alias always \
--use-kotlin-methods-for-var-names apply-and-hide \
--rename-flags all
jadx --single-class "com.example.ClassName" -d output/ input.apk
jadx -d output/ --no-res input.apk
Key flags
| Flag | Purpose |
|---|
--deobf | Rename obfuscated a/b/c to readable names |
--show-bad-code | Show broken code instead of hiding |
--decompilation-mode restructure | Cleanest Java output |
-j N | Thread count (use all cores) |
--no-res | Skip resources (faster) |
--single-class | Decompile one class only |
baksmali — DEX Disassembler
baksmali d classes.dex -o smali/
baksmali d "app.apk/classes2.dex" -o smali/classes2/
baksmali d --code-offsets classes.dex -o smali/
baksmali d --classes "Lcom/example/Target;" classes.dex -o smali/
baksmali d -j $(nproc) classes.dex -o smali/
for dex in $(unzip -l app.apk | rg "\.dex" | awk '{print $4}'); do
name=$(basename $dex .dex)
unzip -o app.apk $dex -d /tmp/dex_extract
baksmali d /tmp/dex_extract/$dex -o smali/$name
done
aapt — APK Info
aapt dump badging app.apk | head -5
aapt dump xmltree app.apk AndroidManifest.xml
aapt dump xmltree app.apk AndroidManifest.xml | rg -i "split|requiredSplit"
aapt dump permissions app.apk
aapt dump resources app.apk
aapt dump strings app.apk
apkid — Protection Detection
uvx apkid app.apk
uvx apkid -v app.apk
uvx apkid -r app.apk
uvx apkid -j app.apk
What apkid tells you
| Output | Meaning |
|---|
compiler: r8 | R8 optimizer used (standard) |
compiler: d8 | D8 compiler (no optimization) |
obfuscator: proguard | ProGuard obfuscation |
packer: * | App is packed (harder to patch) |
anti_vm | Emulator detection present |
anti_debug | Debugger detection present |
unzip — APK Contents
unzip -l app.apk
unzip -l app.apk | rg "\.dex"
unzip -l app.apk | rg "\.so|lib/"
unzip -l app.apk | rg "index.android.bundle|libflutter|libapp"
unzip -o app.apk classes5.dex -d /tmp/
unzip -qo decompiled.zip -d decompiled/
strings — Binary String Extraction
strings app.apk | rg -i "premium|entitlement|license"
strings app.apk | rg "aHR0c" | while read b; do echo "$b" | base64 -d 2>/dev/null; echo; done
strings app.apk | rg "https?://" | sort -u