r8-mapping

A tool for downloading an R8 mapping file and using it to translate obfuscated Android release stack traces back to original class names. R8 is Android's code shrinking and renaming tool for release builds.

In plain words
What is it for?
Use it to obtain the mapping for a Flipcash release build and deobfuscate its stack traces, including cases where R8 merged classes.
Why use it?
Release crashes often show shortened or renamed class names, making the failing code hard to identify without the matching mapping file.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/code-payments/code-android-app/r8-mapping
Any agent
npx skills add code-payments/code-android-app --skill r8-mapping
Clone the repo
git clone --depth 1 https://github.com/code-payments/code-android-app

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 671 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.00671
Opus 5 $0.00019 $0.00336
Sonnet 5 $0.00008 $0.00134
Haiku 4.5 $0.00004 $0.00067

Measured 2d ago against content hash 6b94a79c61eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

r8-mapping scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/r8-mapping.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/r8-mapping/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

R8 Mapping: download and deobfuscate

Download the R8 mapping.txt for a Flipcash release build and use it to deobfuscate stack traces.

Background

Release builds are minified/obfuscated by R8. The mapping file is uploaded as part of the release-artifacts artifact in the "Flipcash2 Build and Deploy" GitHub Actions workflow (ID 229420296). The mapping lives at mapping/release/mapping.txt inside the artifact.

R8 class merging: R8 may merge multiple unrelated classes into one obfuscated class. Use line numbers from the stack trace to disambiguate which original class a frame belongs to.

Step 1 — Download the mapping

Parse $ARGUMENTS for a versionCode (integer). If not provided, ask the user.

bash .claude/skills/r8-mapping/scripts/r8-mapping.sh <versionCode>

The script emits JSON:

{
  "mapping_path": "/tmp/r8-mapping-3797/mapping/release/mapping.txt",
  "run_id": 26846060877,
  "version_code": 3797,
  "line_count": 1211075
}

Step 2 — Deobfuscate classes

To find what an obfuscated class name maps to:

grep " -> <obfuscated_class>:" <mapping_path>

This returns lines like:

com.original.ClassName -> ag3:
com.other.MergedClass -> ag3:

Multiple results means R8 merged those classes. Use stack trace line numbers to disambiguate — each class section in the mapping contains line-number ranges for its methods.

Step 3 — Deobfuscate methods

After finding the class section, look for method mappings within it:

# Find the class section and its method mappings
grep -A 200 "^com.original.ClassName -> <obfuscated>:" <mapping_path> | head -200

Method lines look like:

    1:5:void run():123:127 -> run
    6:10:void otherMethod():45:49 -> a

The format is:

    <obfuscated_line_start>:<obfuscated_line_end>:<return_type> <original_method>(<params>):<original_line_start>:<original_line_end> -> <obfuscated_method>

Match the line number from the stack trace against obfuscated_line_start:obfuscated_line_end to find the original method and its original line numbers.

Read the full file on GitHub · 98 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 98 lines · 38 tokens per session scan A 6b94a79c61eb

Subscribe to this mod's changes

r8-mapping is a skill published in the GitHub repository code-payments/code-android-app (23 stars, last pushed 2d ago), licensed MIT. It adds 38 tokens to every session and 671 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.