[GH-ISSUE #6329] [Feature] Apply caller-supplied R8/ProGuard mappings to Android analysis #3814

Closed
opened 2026-10-31 00:44:20 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @jayykernel on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6329

Problem

Release APKs are commonly built with R8 or ProGuard, so class, method, and field names in DEX/JADX output can be shortened to names such as a.a(). When the owner has the matching mapping.txt, that file is often the only practical bridge back to the original identifiers. Without a way to apply it, analysts must manually translate names across class inventories, method references, and stack traces.

Desired outcome

Allow an analyst to provide a local R8/ProGuard mapping file as an optional input to Android analysis. Present original names alongside the raw obfuscated identifiers rather than replacing or hiding the evidence found in the APK.

Acceptance criteria

  • Support a caller-selected mapping file for a specific APK/DEX analysis.
  • Preserve both obfuscated and mapped names in structured results, with a clear indication of which name came from the mapping.
  • Report unmapped symbols, ambiguous mappings, malformed mapping records, and mapping coverage explicitly.
  • Include the APK/DEX identity and mapping-file SHA-256 in the result so the association is auditable.
  • Expose equivalent behavior through CLI and MCP, with fixtures for classes, methods, fields, overloaded methods, malformed input, and partial mappings.

Scope and safety

This is static name translation only. Do not modify the APK/DEX, fetch mappings from external services, or imply that a mapping file recovers source code or line numbers it does not contain.

I checked the open feature tracker (#3796) for Android analysis proposals, including DEX debug metadata and component inventory. This request is specifically about applying an externally supplied R8/ProGuard name map; I did not find that capability listed there.

Originally created by @jayykernel on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6329 ### Problem Release APKs are commonly built with R8 or ProGuard, so class, method, and field names in DEX/JADX output can be shortened to names such as `a.a()`. When the owner has the matching `mapping.txt`, that file is often the only practical bridge back to the original identifiers. Without a way to apply it, analysts must manually translate names across class inventories, method references, and stack traces. ### Desired outcome Allow an analyst to provide a local R8/ProGuard mapping file as an optional input to Android analysis. Present original names alongside the raw obfuscated identifiers rather than replacing or hiding the evidence found in the APK. ### Acceptance criteria - Support a caller-selected mapping file for a specific APK/DEX analysis. - Preserve both obfuscated and mapped names in structured results, with a clear indication of which name came from the mapping. - Report unmapped symbols, ambiguous mappings, malformed mapping records, and mapping coverage explicitly. - Include the APK/DEX identity and mapping-file SHA-256 in the result so the association is auditable. - Expose equivalent behavior through CLI and MCP, with fixtures for classes, methods, fields, overloaded methods, malformed input, and partial mappings. ### Scope and safety This is static name translation only. Do not modify the APK/DEX, fetch mappings from external services, or imply that a mapping file recovers source code or line numbers it does not contain. ### Related work I checked the open feature tracker (#3796) for Android analysis proposals, including DEX debug metadata and component inventory. This request is specifically about applying an externally supplied R8/ProGuard name map; I did not find that capability listed there.
Author
Owner

@555aaditya commented on GitHub (Oct 25, 2026):

I'd like to take this one. Plan: a domain parser for R8/ProGuard mapping.txt (classes, fields, methods including overloads and inlined line ranges), then an optional caller-selected mapping path on the JADX-backed Android tools (search_android_classes, inspect_android_class, inspect_android_method, trace_android_references). Results keep the obfuscated name as the observed fact and add the original name marked as mapping-derived, plus the mapping file's SHA-256 and explicit coverage: unmapped, ambiguous and malformed records. No APK changes, no fetching. I'll open a draft PR.

<!-- gh-comment-id:6397068726 --> @555aaditya commented on GitHub (Oct 25, 2026): I'd like to take this one. Plan: a domain parser for R8/ProGuard `mapping.txt` (classes, fields, methods including overloads and inlined line ranges), then an optional caller-selected mapping path on the JADX-backed Android tools (`search_android_classes`, `inspect_android_class`, `inspect_android_method`, `trace_android_references`). Results keep the obfuscated name as the observed fact and add the original name marked as mapping-derived, plus the mapping file's SHA-256 and explicit coverage: unmapped, ambiguous and malformed records. No APK changes, no fetching. I'll open a draft PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3814
No description provided.