MG1937/ASC

▲ 877 stars today★ 1,846⑂ 252

ASC is a super FAST Android decompiler front-end designed for Agents/Mobile Researchers.

About MG1937/ASC

MG1937/ASC is an open-source project on GitHub, mainly written in Python. ASC is a super FAST Android decompiler front-end designed for Agents/Mobile Researchers. It currently holds 1,846 stars and 252 forks with 7 open issues, and was last pushed on 2026-09-21 (repository created 2026-06-09).

Project Overview

Git Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository MG1937/ASC · default branch main · size 13302 KB · watchers 4 · source: GitHub REST API and repository README

README

Droid ASC: R8 Compiler Optimization as a DeCompiler Primitive

https://blackhat.com/europe/arsenal/schedule/index.html#droid-asc-r8-compiler-optimization-as-a-decompiler-primitive-54834

When decompiling massive Android APKs, the standard procedure is to wait. We wait for tools to eat gigabytes of RAM, fully inflate the artifacts, and spend tens of minutes building heavy global indexes and cross references... All of this is just to guarantee fast code searches later, but here is the contradiction. A compiled artifact is already highly structured, modern decompilers never utilize this, they waste massive amounts of time and memory reconstructing a bloated database of code relationships over already structured data. This engineering approach defies common sense. When I can directly extract any code relationship from the APK in milliseconds, does this preprocessing still hold any value?

Instead of forcing decompilers into heavy preprocessing, we choose to query the compiled artifact directly as a database. We built a stateless, zero-overhead engine that extracts and searches code on demand in milliseconds. In this briefing, we will explore the underlying engineering required to bypass traditional bottlenecks. We will demonstrate how to abandon full inflate by probing directly within the Deflate bitstream, building dense Huffman lookup tables to extract core metadata without touching irrelevant data blocks. Furthermore, we will explain optimization details of the R8 compiler, especially how deterministic constant relocation and instruction deduplication leave behind highly concentrated physical layouts, we weaponize this compiler behavior to execute lightning-fast cross DEX code searches. To map these raw bytecode offsets back to methods, we engineered an O(1) instruction locating primitive, achieving constant-time method resolution without building heavy mapping tables. Finally, upon hitting a target, Droid ASC extracts only the specific bytecodes and its dependencies, dynamically reconstructing a minimal and self consistent DEX entirely in memory for instant decompilation.

We will demonstrate this architecture live against a 352MB commercial APK. Droid ASC executes global cross reference searches in 1.79 seconds and decompiles target classes in 177 milliseconds using only 141MB of RAM. By treating the artifact as a read only database and operating with zero preprocessing, we return the decompiler to its core essence. It is no longer a bloated indexing tool, but a lightning fast, on demand decompilation engine that fundamentally redefines how we analyze compiled code.

Benchmark

Benchmark

https://github.com/user-attachments/assets/4c4a6813-8561-490c-a573-ef113da861b6

Install

# from PyPI
pip install droidasc

or from source

pip install .

After installation, the droidasc CLI command is available globally:

usage: droidasc [-h] {getclass,listclass,getmanifest,findrefs} ...

ASC tooling entry.

positional arguments: {getclass,listclass,getmanifest,findrefs} getclass Locate the target class in APK, extract one DEX in memory, then decompile. listclass List classes defined across all DEX entries in APK. getmanifest Decode AndroidManifest.xml from APK and print it as XML. findrefs Find code references for string/type/method/field across all DEX entries in APK.

options: -h, --help show this help message and exit

examples: droidasc app.apk --gui droidasc getclass app.apk Lcom/poc/Main; -o Main.java droidasc getclass app.apk com.poc.Main --threads 16 droidasc listclass app.apk -o classes.txt droidasc listclass app.apk --prefix com.poc droidasc getmanifest app.apk -o AndroidManifest.xml droidasc findrefs app.apk string token -o string_refs.txt droidasc findrefs app.apk type com.poc.Main droidasc findrefs app.apk method onCreate --class com.poc.Main droidasc findrefs app.apk method notify --class MainActivity --fuzzy-class -o method_refs.txt droidasc findrefs app.apk field apiKey -o field_refs.txt

listclass prints Dalvik class descriptors in APK/DEX definition order, one per line. With -o, output is written to the selected file instead of stdout. --prefix com.poc filters by Lcom/poc; an already normalized prefix such as Lcom/poc is kept unchanged.

You can also use python main.py as before — it delegates to the same entry point.

GitHub Stars & Activity

1,846Stars
252Forks
7Open issues
PythonLanguage

GitHub Popularity

GitHub stars1,846
Forks252
Open issues7
Primary languagePython
LicenseApache-2.0
Stars gained today877
Created2026-06-09
Last pushed2026-09-21

Trending History

Weekly boardrank #60 · ▲ 877 stars

Related GitHub Projects

1

anthropics / financial-services

Python★ 36,254⑂ 5,308▲ 436 stars
→
2

davila7 / claude-code-templates

Python★ 31,054⑂ 3,535▲ 113 stars
→
3

browser-use / video-use

Python★ 25,748⑂ 3,111▲ 155 stars
→
4

mvt-project / mvt

Python★ 13,979⑂ 1,348▲ 441 stars
→
5

FareedKhan-dev / train-llm-from-scratch

Python★ 10,814⑂ 1,517▲ 220 stars
→
6

zhouxiaoka / autoclip

Python★ 8,701⑂ 1,606▲ 654 stars
→
7

superdesigndev / treg

Python★ 2,140⑂ 214▲ 197 stars
→
8

TNT-Likely / PanWatch

Python★ 1,297⑂ 279▲ 174 stars
→

More Trending Repositories