# Droid ASC

A fast Android decompiler front end that queries a compiled APK directly as a database instead of building a large index, aiming to search and decompile code in milliseconds rather than minutes.

Droid ASC is a decompiler front end for Android APKs built around directly querying the compiled artifact instead of first building a large in-memory index of code relationships. It probes the Deflate bitstream to build dense Huffman lookup tables, extracting code and metadata without inflating or indexing the whole archive.

It also exploits patterns left by the R8 compiler, such as deterministic constant relocation and instruction deduplication, to run fast cross-DEX code searches, and uses an O(1) instruction-locating method to resolve bytecode offsets back to methods without building heavy mapping tables. When a target method is found, it extracts only that method and its dependencies and reconstructs a minimal, self-consistent DEX in memory for decompilation.

The author reports searching a 352MB commercial APK in 1.79 seconds and decompiling target classes in 177 milliseconds using 141MB of RAM, and presented the approach at a Black Hat Europe Arsenal session.

Website: https://github.com/MG1937/ASC
