Static analysis. Dynamic analysis. Frida instrumentation. Binary patching. One tool. One terminal. Zero dependencies.
β If this tool saves you time, give it a star β it helps others find it!
git clone https://github.com/worldtreeboy/apkAnalyzer.git
cd apkAnalyzer
python3 apkAnalyzer.pyThat's it. No
pip install. No Docker. No config files. Just plug in a rooted device and go.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APK Analyzer β Main Menu β
β github.com/worldtreeboy/apkAnalyzer β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Target: com.example.app (v2.1.0) β
β Device: Pixel 6 (Android 14) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β [1] App Analysis [7] Logcat Monitor β
β [2] Storage Audit [8] Frida CodeShare β
β [3] Shell Access [9] Binary Patcher β
β [4] Screenshot [10] Frida Server β
β [5] Security Scan [11] Testcases β
β [6] Keyboard Cache [12] Runtime Check β
β β
β [a] Switch App [r] Export Report [0] Exit β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECURITY SCAN β com.example.app
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[CRITICAL] Debuggable android:debuggable="true" (MASVS-RESILIENCE-1 | CWE-489)
[HIGH] allowBackup No exclusion rules defined (MASVS-STORAGE-1 | CWE-530)
[PASS] Cleartext Traffic usesCleartextTraffic="false"
[HIGH] Exported Components 3 activities, 1 provider (MASVS-PLATFORM-1 | CWE-926)
[CRITICAL] Hardcoded Secrets Found AWS key in config.xml (MASVS-STORAGE-1 | CWE-798)
[PASS] Network Security Custom config with certificate pins
[HIGH] APK Signing v1-only β Janus (CVE-2017-13156) (MASVS-RESILIENCE-2 | CWE-347)
...
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
CRITICAL: 2 | HIGH: 3 | MEDIUM: 4 | LOW: 2
PASS: 11 FAIL: 5 WARN: 3
Overall: CRITICAL RISK
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
πΉ Want to see it live? Record your own session with asciinema and share it!
Most Android security tools do one thing β a static scanner, a Frida wrapper, or a storage dumper. You end up with 10 terminals open, copying package names between tools.
APK Analyzer replaces all of them.
| What You Get | |
|---|---|
| π | 19 security checks in one scan β everything MobSF flags, from allowBackup to Janus CVE |
| π£ | 38 Frida scripts ready to inject β SSL bypass, root hiding, crypto monitoring |
| 𧬠| Universal bypass script β SSL + root + anti-tamper in a single file |
| π§ | Binary patching β Frida Gadget or LSPatch injection in one command |
| π¦ | Zero dependencies β pure Python stdlib, no pip, no Docker |
| β‘ | Smart caching β decompile once, reuse across all tools, auto-invalidated when the app updates |
| π | Batched ADB β storage audit reads ~30 files per round-trip, 50Γ faster on big apps |
| π | Multi-device support β pick a device when several are connected, all commands follow |
| π | 34 high-signal secret patterns β catches AWS, Firebase, Stripe, GitHub tokens & more without treating public IDs as secrets |
| π€ | Framework-aware β auto-detects Flutter, React Native, Kotlin and adjusts scans |
- π Root shell repaired β compound commands, quotes, pipes, arguments, and
cdnow survive the ADB βsu -cboundary correctly on every host OS - π‘οΈ Safer untrusted input handling β bounded Android-backup extraction, Windows/POSIX traversal protection, safe XML parsing, terminal-control filtering, and quoted manifest/database values
- π― More accurate findings β launcher activities, normal permissions, public IDs, empty caches, absent password layouts, debug-only CAs, and platform cleartext defaults no longer become false vulnerabilities
- π§ Stronger cache invalidation β update time and code path now prevent same-version reinstalls or stale local APKs from contaminating scans
- 𧬠Reliable Frida patches β Gadget is injected for the APK's actual ABIs, smali register allocation is valid, downloads are bounded, and the LSPatch JAR is SHA-256 pinned
- π Secret-safe output β full regex matches are detected correctly and secret/PII values are redacted in findings and reports
- β Regression suite β command transport, manifest defaults, archive extraction, secret matching, and patcher injection are covered by automated tests
| # | Feature | What It Does |
|---|---|---|
| 1 | App Analysis | Permissions, components, version info, framework detection, APK extraction |
| 2 | Storage Audit | SharedPrefs, SQLite, Realm DBs β scan for secrets, PII, and insecure file permissions |
| 3 | Shell Access | Interactive root shell with directory tracking |
| 4 | Screenshot | Capture device screen, save locally with timestamp |
| 5 | Security Scan | 19 static checks with OWASP MASVS mapping, CWE IDs, severity scoring (details below) |
| 6 | Keyboard Cache | Detect if keyboard apps cache plaintext input |
| 7 | Logcat Monitor | Real-time filtered log streaming with keyword highlighting |
| 8 | Frida CodeShare | 38 scripts across 10 categories β inject from menu (details below) |
| 9 | Binary Patcher | Frida Gadget injection or LSPatch/Xposed embedding (details below) |
| 10 | Frida Server | USB/remote mode switching, port forwarding, auto server management |
| 11 | Testcases | Launch exported components with intent actions + extras, clipboard spy, dev URL finder, adb backup extraction |
| 12 | Runtime Security Check | ADB-based dynamic analysis: post-launch secret scanning, file permissions, exported component probing, clipboard/logcat leakage, WebView cache |
| r | Report Export | Export findings to JSON or HTML with severity badges, MASVS references, and CWE IDs (--report json|html) |
Static analysis of the decompiled APK and AndroidManifest.xml. Each finding is scored with CRITICAL / HIGH / MEDIUM / LOW severity, mapped to OWASP MASVS v2.0 categories, and tagged with CWE IDs. Results also shown as PASS / FAIL / WARN with an overall risk summary.
| Category | Check | What It Flags |
|---|---|---|
| Manifest | Debuggable | android:debuggable="true" |
| allowBackup | Backup enabled without exclusion rules | |
| Exported Components | Non-launcher components exported without strong manifest permissions | |
| Dangerous Permissions | Informational review of CAMERA, LOCATION, SMS, RECORD_AUDIO, etc. | |
| Network | Cleartext Traffic | Effective manifest, target-SDK, and network-config policy allows HTTP |
| Network Security Config | Production policy trusts user-installed CAs | |
| Deeplinks | Custom URI schemes without validation | |
| Code | Data Leakage | Hardcoded secrets in XML, JSON, YAML, properties |
| WebView JS Interface | addJavascriptInterface() β XSS risk on SDK < 17 | |
| Debug Logging | Log.v/d, Timber, console.log, debugPrint in production | |
| Broadcast Security | sendBroadcast() without permission | |
| UI / Input | FLAG_SECURE | Informational review for sensitive screens |
| Clipboard Exposure | ClipboardManager without FLAG_SENSITIVE | |
| Keyboard Cache | Password input types and keyboard-learning hints | |
| Tapjacking | Informational review of sensitive confirmation views | |
| Platform | SDK Version | minSdk < 23 or targetSdk < 35 |
| PendingIntent | Missing FLAG_IMMUTABLE (Android 12+ hijacking) | |
| Task Hijacking | Custom taskAffinity β StrandHogg attack | |
| APK Signing | v1-only = Janus vulnerability (CVE-2017-13156). Checks v1/v2/v3/v4 |
Both Storage Audit and Security Scan use 34 high-signal regex patterns to catch hardcoded secrets. Public certificates, publishable Stripe keys, OAuth client IDs, and endpoint URLs are intentionally not classified as secrets.
| Provider | Patterns |
|---|---|
| Generic | Passwords, API keys, tokens, JWTs, bearer tokens, encryption keys |
| AWS | AKIA access keys, secret keys, session tokens |
| Google / Firebase | AIza keys, Firebase tokens and secrets |
| Azure | Storage keys, connection strings, client secrets |
| Stripe / Payment | sk_live_, rk_live_, PayPal, Braintree, Razorpay secrets |
| Messaging | Twilio, SendGrid, Slack tokens, webhook URLs |
| GitHub | ghp_/ghs_ PATs, fine-grained tokens |
| Database | MongoDB, Postgres, MySQL, Redis connection strings |
| Crypto | PEM private keys |
frida_scripts/universal_bypass.js β a guarded all-in-one baseline for common TLS pinning, root/emulator detection, anti-debug, and anti-Frida checks. Spawn mode is recommended so hooks are installed before application code runs.
frida -U -f <package> -l frida_scripts/universal_bypass.js| Layer | What It Bypasses |
|---|---|
| TLS Pinning | SSLContext/TrustManager, HostnameVerifier, OkHttp, Conscrypt, TrustKit, WebView SSL errors, plus exported OpenSSL/BoringSSL verification APIs in late-loaded modules |
| Root / Emulator | Exact root/emulator files and packages, Runtime/ProcessBuilder commands, Build fields, SystemProperties, developer settings, RootBeer, and native file/command/property APIs |
| Runtime Tampering | Frida port and tracked /proc probes, app-origin strstr/fgets/readlink, thread names, ptrace, Java debugger APIs, self-directed kill signals, and Java process termination |
The script uses Frida 17's current module APIs with a Frida 16 fallback, watches newly loaded TLS modules, avoids hard-coded offsets and architecture-specific patches, and exposes hook/bypass counters through rpc.exports.status. Feature families can be disabled in the CONFIG block when isolating compatibility issues.
No generic script can bypass server-side Play Integrity decisions, custom obfuscated RASP, or inlined/static native verification. Those checks need app-specific analysis and targeted hooks.
Auto-starts frida-server on device. Run scripts from local files or the built-in library:
| Category | Scripts |
|---|---|
| SSL Pinning Bypass | Multi-Unpinning, Universal Android, Universal v2, Flutter TLS, OkHttp4 |
| Root Detection Bypass | fridantiroot, Multi-Library, RootBeer, Xamarin, freeRASP, Talsec |
| Anti-Debug / Anti-Tamper | Anti-Debug, USB Debug, Developer Mode, Anti-Frida |
| Multi-Bypass | SSL+Root+Emulator, Root+Emulator+SSL, OneRule |
| Biometric / Auth | Universal Biometric, Android 11+ Biometric |
| Network Monitoring | Traffic Interceptor, OkHttp3, TCP Trace |
| Crypto Monitoring | Crypto Monitor, AES Monitor, KeyStore Extractor |
| Storage Monitoring | SharedPrefs, EncryptedSharedPrefs, SQLite, File System, Clipboard |
| Intent / WebView | Intent Intercept, Deep Link Observer, WebView Debugger |
| Tracing | raptor Tracer, JNI Trace, List Classes, DEX Dump |
Two methods for non-rooted analysis:
Injects frida-gadget.so into the APK for rootless dynamic analysis. The gadget is auto-matched to the device ABI (arm64/arm/x86/x86_64) and your local Frida version to avoid client/server mismatches.
Check deps β Detect ABI β Download gadget β Decompile β Patch manifest β Inject smali
β Copy .so β Rebuild β Sign β Output: patched_apks/<pkg>_gadget_patched.apk
Embeds LSPosed/Xposed framework into the APK β load Xposed modules without root.
Check java β Download LSPatch β Get APK β Patch
β Output: patched_apks/
Scans automatically detect the app framework and adjust keyword groups:
| Framework | How It's Detected | Impact |
|---|---|---|
| Flutter | libflutter.so |
Adds Flutter security plugin keywords |
| React Native | libreactnativejni.so, libhermes.so |
Adds RN keywords, scans .bundle files |
| Kotlin | kotlin/ in smali |
Java/Kotlin keyword coverage |
| Java | Default fallback | Default keyword coverage |
Native security SDKs (VKey, Zimperium, Promon, DexGuard) are detected from .so files on every scan.
Export findings to JSON or self-contained HTML reports with severity badges, MASVS references, and CWE IDs:
python3 apkAnalyzer.py --report html --output report.html
python3 apkAnalyzer.py --report json --output findings.jsonOr use the [r] Export Report menu option during an interactive session. HTML reports include color-coded severity badges, device info, and a findings summary table.
| Requirement | Required | Notes |
|---|---|---|
| Python 3.8+ | Yes | No pip packages needed |
| ADB | Yes | Must be in PATH (checked at startup) |
| Rooted device | Yes | Connected via USB; multiple devices supported |
apktool |
Yes | Install guide |
apksigner |
Optional | For APK signing scheme check |
frida + frida-tools |
Optional | For Frida scripts |
strings (binutils) |
Optional | Native lib string scan; pure-Python fallback included |
./extracted_apks/ β Pulled APKs from device
./patched_apks/ β Frida Gadget / LSPatch output
./screenshots/ β Device screenshots
./backups/ β adb backup .ab files + unpacked app data
./.gadget_cache/ β Cached Frida Gadget & LSPatch jar
./.apkanalyzer_tmp/ β Decompiled APK cache (reused across scans)
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
If APK Analyzer saved you time, star this repo β it helps other security researchers discover it.