Utilities
Recover Java stack frames from an R8 mapping
Translate an obfuscated Java stack trace using the mapping from its build.
overview
What retrace-stacktrace does
Supply two local files: the R8 mapping from the relevant build and its Java stack trace. The adapter runs pinned R8 Retrace 9.5.26 and saves its native text output. It does not fetch mappings, record crashes or connect to a device.
A zero exit does not establish that the supplied mapping matches the build. Unmatched frames may remain obfuscated, and an empty trace produces a valid empty file. Recoverable names and line information depend on the mapping and trace you supplied.
The mapping must be a nonempty regular UTF-8 file of at most 20 MiB; the trace must be a regular UTF-8 file of at most 1 MiB and may be empty. NUL bytes are rejected. The native Java subprocess has a 90-second timeout and a 256 MiB maximum Java heap. Each output/log is checked against 4 MiB after the process exits; these checks do not bound peak process memory or disk use.
source hub.docker.com/r/nenadzaric/skills-android-retrace-stacktrace
use cases
Where retrace-stacktrace fits
Recover a known obfuscated frame
Use the mapping retained with a build to translate its Java trace. The owned fixture recovers com.trickest.Fixture.crash(Fixture.java:42).
Keep unresolved frames visible
Save native Retrace text for later review. An unmatched mapping can leave a.b.c(SourceFile:1) unchanged while the process exits successfully.
Process crash text without a device connection
Pass existing mapping and trace files between workflow nodes. This job exposes no crash collection, remote URL, symbol download or device operation.
reference
retrace-stacktrace inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| mapping | FILE | --mapping | Matching-build UTF-8 R8 mapping FILE, nonempty and at most 20 MiB. |
| trace | FILE | --trace | UTF-8 Java stack-trace FILE, at most 1 MiB; empty is valid. |
Showing key inputs. retrace-stacktrace exposes 2 inputs in total.
example
Run retrace-stacktrace
retrace-stacktrace --mapping mapping.txt --trace trace.txt -o recovered.txtjava.lang.RuntimeException: owned fixture
at com.trickest.Fixture.crash(Fixture.java:42)guidance
Choosing retrace-stacktrace
Choose this job when you already have a Java stack trace and its matching R8 mapping. Use jadx-decompile to inspect APK/DEX source or dex2jar-convert for a JVM JAR; those jobs do not replace the build mapping needed here.
jadx-decompile
Inspect APK/DEX code as generated Java source; a different input and output from retracing existing Java crash text.
dex2jar-convert
Convert DEX bytecode to a JVM JAR rather than translate stack frames with a supplied mapping.
faq
retrace-stacktrace questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run retrace-stacktrace yourself
Complete downloaded native text from the owned matching-build platform fixture. Retrace recovers Fixture.java:42 from the supplied mapping and obfuscated trace; this example does not guarantee recovery for other mappings.
Facts on this page come from the live Trickest tool library.