This document records the current handoff state of DexTrace.
It is not a changelog. It is a practical snapshot for the next contributor: what the repository currently covers, what is known to work, what areas are still evolving, and what known gaps or investigation tracks already exist.
At the current stage, DexTrace includes:
- APK archive reading
- APK metadata extraction
- binary AndroidManifest parsing
- DEX structure parsing
- Dalvik bytecode disassembly support
- API extraction from parsed bytecode
- a Dalvik bytecode execution engine (
src/dextrace/vm/) with opcode handlers, class-hierarchy/virtual dispatch, try/catch handling, and execution tracing - simulated Android/Java framework methods (
src/dextrace/vm/android_stubs/) - CLI commands for metadata, disassembly, DEX-oriented inspection, and method
execution (
dextrace run) - pytest coverage across parser, manifest, disassembly, API extraction, and VM areas
The codebase is already organized into distinct subsystems under:
src/dextrace/cli/src/dextrace/core/src/dextrace/dalvik/src/dextrace/vm/src/dextrace/manifest/tests/
This makes the repository reasonably handoff-friendly once the subsystem boundaries are understood.
The following areas appear structurally well-defined in the repository.
The project already has a clear CLI split:
cmd_meta.pycmd_disasm.pycmd_dex.py
APK, manifest, DEX parsing, and API extraction are separated into different modules rather than mixed together in a single file.
Dalvik-related concerns are separated into opcode metadata, operand decoding, payload handling, size handling, and disassembly support.
The test suite is already organized by subsystem, which makes targeted regression work practical.
The following areas should be treated as active development surfaces.
dex_api_extractor.py and dex_resolver.py are especially important because their behavior can affect Quark rule matching results.
These modules are likely to remain active areas for debugging and refinement.
Recent investigation work has involved rule mismatches observed when comparing Quark + DexTrace against Quark + Androguard.
This suggests that some discrepancies may still exist in how DexTrace extracts or resolves API evidence for certain rule patterns.
The repository now has a cleaner documentation plan, but contributor-facing documentation should continue to be updated alongside code changes.
The repository currently includes a sample APK extraction directory such as:
13667fe3b0ad496a0cd157f34b7e0c991d72a4db/
This should be treated as a reproduction or validation sample, not as part of the source implementation.
The dist/ directory contains build outputs and should not be manually edited.
A recent investigation compared Quark analysis results using the same APK and rules under two different cores:
- DexTrace
- Androguard
Rules previously discussed in this context included:
000830009200223
The working hypothesis was intentionally kept conservative:
- inconsistent framework API matching
- method resolution difference
- invoke extraction gap
This should remain the preferred wording until the exact root cause is verified in code and supported by tests.
The current repository documentation is intended to be split as follows:
README.md: project overview and entry pointCONTRIBUTING.md: contributor setup and contribution processdocs/modules-overview.md: module-by-module handoff guidedocs/development-workflow.md: practical development and validation workflowsdocs/current-status.md: current state, known gaps, and handoff notes
This split is deliberate. It keeps the README readable while moving contributor detail into dedicated documents.
The most useful next improvements are:
When behavior changes, add or refine the nearest regression test.
When a mismatch is reproduced reliably, add the smallest DexTrace-side test that helps lock down the behavior.
If a contributor repeatedly performs the same investigation or validation steps, document them in docs/development-workflow.md.
Documentation should only describe modules and workflows that actually exist in the repository.
For the next contributor:
- start with
README.md - read
docs/modules-overview.mdbefore changing unfamiliar modules - use
docs/development-workflow.mdto decide which tests to run - keep issue writeups evidence-based and conservative
- treat Quark mismatches as cross-system evidence, then narrow down the likely DexTrace subsystem before proposing a root cause
The repository is in a workable handoff state as long as contributors preserve the current discipline: small changes, targeted tests, and careful wording when the exact cause is not yet proven.