Google is committed to advancing racial equity for Black communities. See how.

R8 retrace

R8 retrace is a tool for obtaining the original stack trace from an obfuscated stack trace. The stack trace is reconstructed by matching class and method names in a mapping file to their original definitions.

Usage

To retrace an obfuscated stack trace, pass the mapping file to retrace:

retrace  path-to-mapping-file [path-to-stack-trace-file] [options] 

If no stack trace file is given on the command line, R8 retrace will wait for the stack trace to be entered by the user through standard input. After input, terminate the input stream:

  • Linux, macOS: Control+D
  • Windows: Control+Z+Enter

The retraced output is then written to standard output.

Options

Option Required? Description
--verbose no Print method parameters and return type
--regex <regular_exp> no Overwrite the default regular expression for parsing stack trace lines.

Usage notes

R8 retrace uses a generated mapping file for mapping obfuscated class and method names back to the original definition. See Decode an obfuscated stack trace for more information about shrinking your app such that it can be retraced correctly.