Add DexTrace core-library backend (continuation of PR #855) - #958
Merged
Merged
Conversation
Replaces the silent get_apk_permissions() call with a direct parse_manifest()
call that raises ValueError when the manifest is missing or has invalid AXML
bytes. trickmo and tanglebot APKs now fail fast (< 1 s) instead of running
three full DEX passes (134 s on trickmo).
parse_manifest() requires DexTrace fix: propagate {"error": ...} from
ManifestParser instead of silently mapping it to empty fields.
Adds two unit tests for the two ValueError paths:
- invalid AXML bytes in AndroidManifest.xml
- AndroidManifest.xml entry absent from the ZIP
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #958 +/- ##
=========================================
Coverage ? 80.29%
=========================================
Files ? 82
Lines ? 7192
Branches ? 0
=========================================
Hits ? 5775
Misses ? 1417
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
DexTraceImpas a new concrete implementation ofBaseApkinfo, allowing Quark to use DexTrace as an alternative APK analysis backend. Activate it with--core-library dextrace:Key Changes
quark/core/dextraceapkinfo.py: AddDexTraceImp, implementing the sameBaseApkinfointerface asAndroguardImp.quark/core/quark.py:core_library="dextrace"toDexTraceImp.find_api_usagesubclass BFS: checkclass_name in current_class_setinstead of discardingLjava/lang/Object;and testing non-empty.tests/core/test_dextraceapkinfo.py: Add integration tests covering:tmp_path).Motivation and Context
DexTrace is a Python APK analysis library that parses DEX bytecode independently of the androguard package. Adding it as a backend gives Quark an alternative that does not depend on androguard. The implementation handles the anti-analysis patterns and class naming conventions seen in real-world malware samples.
How Has This Been Tested?
pytest tests/passes with no regressions.