How twothreetwofive/android-x-ray works
X-ray is an Android APK analysis dashboard and pipeline. Users upload an APK or invoke the CLI; static analysis identifies APK metadata and risk signals, then dynamic scenarios exercise the installed app while network capture records traffic. The orchestrator assembles partial module results and computes a separate aggregate risk score and security verdict, which the dashboard presents with module details. README and source-index references establish the principal connections; unsampled implementation details are omitted where their wiring is uncertain.
Main entry points: app.py Streamlit dashboard · main.py Pipeline orchestrator · analyzer.py Static analyzer · scenario_runner.py Scenario runner
Components 32
Entry and orchestration
- Streamlit dashboard
app.py - Pipeline bridge
pipeline_bridge.py - Device preflight
preflight.py - Pipeline orchestrator
src/main.py
Static analysis
- Static analyzer
src/static_analyzer/analyzer.py - APK preparation
src/static_analyzer/apk_extractor.py - Decompiler
src/static_analyzer/decompiler.py - Manifest inspection
src/static_analyzer/manifest_parser.py - Code and string scan
src/static_analyzer/code_scanner.py - Certificate and SDK signals
src/static_analyzer/cert_analyzer.py - Static risk scoring
src/static_analyzer/risk_scorer.py
Dynamic analysis
- Scenario runner
src/dynamic_analyzer/scenario_runner.py - App scenarios
src/dynamic_analyzer/scenarios.py - ADB controls
src/dynamic_analyzer/adb_runner.py - Frida session
src/dynamic_analyzer/frida_controller.py - Instrumentation hooks
src/dynamic_analyzer/hooks.bundle.js - Hook event reports
src/dynamic_analyzer/message_parser.py
Network analysis
- Traffic capture
src/network_analyzer/capture.py - Scenario capture coordination
src/network_analyzer/scenario_capture.py - DNS and SNI parsing
src/network_analyzer/dns_parser.py - Scapy fallback
src/network_analyzer/pcap_fallback.py - Network report builder
src/network_analyzer/report_builder.py
Scoring and dashboard
- Risk and verdict aggregation
src/risk_aggregator.py - Verdict card
views/verdict_header.py - Static results view
views/static_view.py - Static data formatting
views/static_data.py - Dynamic results view
views/dynamic_view.py - Network results view
views/network_view.py - Risk details view
views/risk_view.py - Shared view helpers
common.py
Other components
- APK analyst
- Android emulator
Connections 40
- APK analyst → Streamlit dashboard: uploads APK
app.py - Streamlit dashboard → Pipeline bridge: runs analysis
app.py - Pipeline bridge → Device preflight: prepares device
pipeline_bridge.py - Pipeline bridge → Pipeline orchestrator: invokes pipeline
pipeline_bridge.py - Pipeline orchestrator → Static analyzer: runs static analysis
src/main.py - Static analyzer → APK preparation: prepares APK
src/static_analyzer/analyzer.py - APK preparation → Decompiler: runs tools
src/static_analyzer/apk_extractor.py - Static analyzer → Manifest inspection: parses manifest
src/static_analyzer/analyzer.py - Static analyzer → Code and string scan: scans code
src/static_analyzer/analyzer.py - Static analyzer → Certificate and SDK signals: collects signals
src/static_analyzer/analyzer.py - Static analyzer → Static risk scoring: scores findings
src/static_analyzer/analyzer.py - Pipeline orchestrator → Scenario runner: runs scenarios
src/main.py - Scenario runner → App scenarios: executes steps
src/dynamic_analyzer/scenario_runner.py - Scenario runner → ADB controls: controls device
src/dynamic_analyzer/scenario_runner.py - Scenario runner → Frida session: manages hooks
src/dynamic_analyzer/scenario_runner.py - Frida session → Instrumentation hooks: loads script
src/dynamic_analyzer/frida_controller.py - Scenario runner → Hook event reports: builds report
src/dynamic_analyzer/scenario_runner.py - Pipeline orchestrator → Scenario capture coordination: coordinates capture
src/main.py - Scenario capture coordination → Traffic capture: captures traffic
src/network_analyzer/scenario_capture.py - Scenario capture coordination → Scenario runner: runs scenario
src/network_analyzer/scenario_capture.py - Pipeline orchestrator → DNS and SNI parsing: parses capture
src/main.py - DNS and SNI parsing → Scapy fallback: falls back to scapy
src/network_analyzer/dns_parser.py - Pipeline orchestrator → Network report builder: builds network result
src/main.py - Network report builder → DNS and SNI parsing: uses parsed data
- Pipeline orchestrator → Risk and verdict aggregation: aggregates results
src/main.py - Streamlit dashboard → Verdict card: renders verdict
app.py - Streamlit dashboard → Static results view: renders static tab
app.py - Streamlit dashboard → Dynamic results view: renders dynamic tab
app.py - Streamlit dashboard → Network results view: renders network tab
app.py - Streamlit dashboard → Risk details view: renders risk tab
app.py - Static results view → Static data formatting: formats data
views/static_view.py - Static data formatting → Manifest inspection: reads manifest fields
views/static_data.py - Static results view → Shared view helpers: uses helpers
views/static_view.py - Dynamic results view → Shared view helpers: uses helpers
views/dynamic_view.py - Network results view → Shared view helpers: uses helpers
views/network_view.py - Risk details view → Shared view helpers: uses helpers
views/risk_view.py - Verdict card → Shared view helpers: uses helpers
views/verdict_header.py - Device preflight → Android emulator: checks and installs
- ADB controls → Android emulator: drives app
- Traffic capture → Android emulator: captures packets