How justsamridhi/apk-xray works
APK-Xray is a web application for evidence-first static analysis of Android APKs. A user selects an APK in the frontend; the API validates and parses it, deterministic rules produce findings and an exposure score, and the report builder optionally requests Gemma explanations before schema validation. The frontend normalizes and presents the report, evidence, and language options. The README documents these capabilities, while the supplied excerpts show only parts of several modules; links based on README documentation are cited there.
Main entry points: App.tsx Application shell · api.py FastAPI upload API · report_builder.py Report assembly · api.ts Upload client
Components 16
Frontend experience
- Application shell
frontend/src/App.tsx - UI components
frontend/src/components.tsx - Upload client
frontend/src/api.ts - Report normalization
frontend/src/report.ts - Sample report
frontend/src/sampleReport.ts - Theme settings
frontend/src/theme.ts
Upload and orchestration
- FastAPI upload API
backend/api.py - Runtime settings
backend/config.py
Static analysis and reports
- APK manifest parser
backend/parser/apk_parser.py - Deterministic rules
backend/scoring.py - Report assembly
backend/report_builder.py
Explanation and validation
- Report validation
backend/validation/validate_report_schema.py - Report JSON Schema
backend/schema/report.schema.json - Gemma adapter
backend/gemma.py
Other components
- APK reviewer
- Google Gemma API
Connections 17
- APK reviewer → Application shell: selects APK
README.md - Application shell → Upload client: uploads file
frontend/src/App.tsx - Application shell → UI components: renders
frontend/src/App.tsx - Application shell → Theme settings: uses settings
frontend/src/App.tsx - Application shell → Sample report: loads sample
frontend/src/App.tsx - Application shell → Report normalization: normalizes report
frontend/src/App.tsx - Upload client → FastAPI upload API: sends HTTP upload
README.md - FastAPI upload API → Runtime settings: loads settings
backend/api.py - FastAPI upload API → APK manifest parser: parses APK
backend/api.py - FastAPI upload API → Report assembly: builds report
backend/api.py - Report assembly → Deterministic rules: calculates score
backend/report_builder.py - Report assembly → Report validation: validates report
backend/report_builder.py - Report validation → Report JSON Schema: loads schema
backend/validation/validate_report_schema.py - Report assembly → Gemma adapter: requests explanations
backend/report_builder.py - Gemma adapter → Google Gemma API: generates explanations
- FastAPI upload API → Application shell: returns report
README.md - Application shell → APK reviewer: presents findings
README.md