Mercury is a work in progress Android APK research platform by Elkenson for collecting app versions from public sources and analyzing extracted signals in an interactive web UI, for technical and non-technical users.
The project is intended for legitimate research.
- Fetches app versions from supported sources (
uptodown,apkpure,apkmirror) - Validates and stores downloaded APK/XAPK/APKM artifacts.
- Extracts various signals from APKs
- Ingests metadata into per-package SQLite DBs under
apks/.mercury/ - Builds visual analytics (country world map/domain/host/URL/app-graph/heatmap) in the web UI
- Supports queue-based background analysis for multi-user or long-running sessions
web/Dash app, layout, and callbackssources/clients for repositories such as Uptodown, APKPure, and APKMirroranalysis/ingest, parsing, figure-buildingscripts/maintenance and optional utilities, such as finding favicons to augment visualisationsbootstrap/first-run setup for AndroZoo SQLite and popular packages indexapks/downloaded app files grouped by source/package (filled during running)data/generated metadata artifacts (filled during running, with helper scripts )
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCreate .env.mercury in repo root:
MERCURY_USERS=researcher:change-me
MERCURY_SECRET_KEY=replace-with-long-random-valueOptional paths and toggles:
MERCURY_DATA_ROOT(default:apks)MERCURY_ANDROZOO_DB(default:data/androzoo.db)MERCURY_POPULAR_JSON(default:data/popular_packages.json)MERCURY_UI(guidedorclassic)MERCURY_AUTH_ENABLE(default enabled)
Run lightweight setup first:
python3 -m bootstrap setupWhat this does:
- verifies key Python imports
- creates expected runtime directories (
data/,apks/, icon/logo folders) - creates
data/domain_metadata.csvif missing - creates
data/popular_packages.jsonplaceholder if DB is not ready - generates
data/v2_supertags.yamlwhendata/dlc.dat_plain.ymlexists
Optional local AndroZoo build (only if local CSV/GZ exists):
python3 -m bootstrap setup --build-androzoo-if-localRemote first-run bootstrap (downloads missing AndroZoo CSV and V2Fly DLC):
python3 -m bootstrap first-runEquivalent:
python3 -m bootstrap setup --first-runpython3 -m bootstrapEquivalent targeted steps:
python3 -m bootstrap androzoo -o data/androzoo.dbpython3 -m bootstrap popular -d data/androzoo.db -o data/popular_packages.json
Local-only:
python3 start_mercury.py runLAN-accessible:
python3 start_mercury.py run-lanDefault port is 8050.
- Select a package from corpus or search online in the UI
- Fetch versions from a source (including drag & drop your own samples/merge with other sources)
- Select versions to analyze and run/queue a submission
- Optionally ingest newly downloaded files into db automatically (db will use a lot less space, allowing samples to be deleted if space is limited).
- Review domain/host/URL/country/network figures
scripts/batch_download.pysampled batch downloader by sourcescripts/batch_download_loop.pyperiodic rerun wrapper, works with wishlistscripts/ingest_apks.pyingest APK metadata into per-package SQLite DBsscripts/build_app_icon_db.pyapp-icon extraction/index build (for UI display)scripts/build_domain_logo_db.pydomain logo dataset builder (can be featured in certain graph plots)scripts/get_and_sync_unmapped_domains.pymetadata synchronization helper (maintains a list of seen domains from samples, which can later be used to calculate rarity, etc)
This repository is for legitimate research and engineering analysis. Users are responsible for ensuring their use complies with applicable law and each source site's terms.
- Do not commit binaries to this repository.
- Do not commit secrets (
.env.mercury, API keys, credentials). - Keep scraping volume conservative and avoid abusive request patterns.
- Respect source-site restrictions and robots/ToS where applicable.
If a rights holder or platform operator has a query about this repository, please contact the maintainers so it can be reviewed promptly.
This project is provided "as is", without warranty of any kind. Use at your own risk. The maintainers are not liable for damages, data loss, service disruption, or legal/compliance issues resulting from use.
run.pyandrun-lan.pycurrently run Dash withdebug=True; use a production WSGI setup for internet-facing deployment.- Runtime data directories (
apks/,data/) are expected to be local and mutable. - In progress queue/auth behavior is controlled via
MERCURY_*environment variables inweb/app.pyandweb/callbacks.py.
Mercury benefits from the broader Android research and open-source tooling ecosystem. Special thanks to:
Mercury includes optional retrievers for third-party APK sources (including APKMirror, APKPure, and Uptodown). Availability and access are subject to each platform's terms.
License is to be confirmed. Until a license is published, all rights are reserved by default.





