← Back to index
Experiments / filed

apkinspect: static APK discovery and unpacking

A local static APK analysis and unpacking toolkit for observed packer, loader, and protector families.

257 words2 min read
Filed under
#android#apk#reverse-engineering#tooling#static-analysis#unpacking

apkinspect

apkinspect is a local, file-to-file toolkit for studying packed Android APKs. It does not run an APK, emulate Android, or bypass signing.

What it does

The project keeps focused transforms for the packer, loader, and protector families encountered during static analysis. It can decrypt or unwrap known asset formats, recover DEX string tables, inspect native string oracles, repair a trimmed manifest, and follow nested payloads until it finds a structurally complete APK.

The blind command is the discovery layer. It validates archive limits, tries compatible adapters, follows nested APK members, detects cycles by digest, and writes every attempt and skip reason to a JSON report.

Design

The CLI is available through Python and a small Node launcher. The Python implementation uses cryptography, androguard, lief, capstone, and rich; the npm package is only a bootstrap around the Python command.

The first profile layer exposes built-in adapter metadata through:

text
apkinspect profiles
apkinspect profiles --json

This keeps family triggers and discovery provenance inspectable while the adapter implementations remain explicit and reviewable.

Current boundary

The transforms are intentionally family-specific. Keys, asset names, offsets, and loader assumptions are not universal, and a successful cryptographic decode is not the same as a valid or installable APK. Structural validation covers ZIP integrity, the binary manifest, and coherent DEX headers; it does not establish trust or provenance.

The repository is being expanded with profile-driven adapter metadata, stricter resource limits, hermetic fixtures, and CI coverage so new observations can be added without turning discovery into an opaque guessing loop.