Static analysis of an APK can reveal API keys, backend endpoints, hardcoded credentials, cryptographic weaknesses, and insecure configurations — all before you launch a single dynamic test. This guide walks through the full static analysis workflow.
Obtaining the APK
From a connected device
# Find the package name adb shell pm list packages | grep target
# Get the APK path adb shell pm path com.target.app # output: package:/data/app/com.target.app-1/base.apk
# Pull it adb pull /data/app/com.target.app-1/base.apk target.apk
From Google Play (no device)
Tools: APKPure, APKCombo, gplaycli, or the apkeep utility:
apkeep -a com.target.app -d GooglePlay -e email@gmail.com -p password .
Split APKs (app bundle)
Modern apps use split APKs. Pull all of them:
adb shell pm path com.target.app # May show multiple paths: base.apk, split_config.arm64_v8a.apk, etc.
# Pull all adb pull /data/app/com.target.app~.../ ./apks/
Merge with APKEditor:
java -jar APKEditor.jar m -i apks/ -o merged.apk
Decompilation with jadx
# GUI — recommended for exploration jadx-gui target.apk
# CLI — for scripting jadx -d output/ target.apk
# Decompile with resource decoding jadx -d output/ --show-bad-code target.apk
# Search across all decompiled sources grep -r "api_key\|apikey\|secret\|password\|token" output/sources/ -i --include="*.java"
jadx search tips
In jadx-gui use Text Search (Ctrl+F) and Class Search (Ctrl+N). Useful search terms:
No comments yet. Be the first.