I got a stacktrace from the crashreporting system and it is obfuscated, like
... Failed resolution of: Lru/test/c/b/a; ...
I have a mapping file.
How to deobfuscate this stacktrace using mapping.txt?
I got a stacktrace from the crashreporting system and it is obfuscated, like
... Failed resolution of: Lru/test/c/b/a; ...
I have a mapping file.
How to deobfuscate this stacktrace using mapping.txt?
Get deobfuscated crash stacktrace from your app page
Upload your mapping.txt to your app PlayStore page with the following steps:
After doing so, to view your deobfuscated crash stack traces:
You can check this link for more details.
Deobfuscate a piece of stacktrace
To convert the code by yourself use the retrace script (retrace.bat on Windows; retrace.sh on Mac/Linux). It is located in the ~/Android/sdk/tools/proguard/bin/
directory. The script takes the mapping.txt file and your stack trace, producing a new, readable stack trace. The syntax for using the retrace tool is:
retrace.bat|retrace.sh [-verbose] mapping.txt [<stacktrace_file>]
<sdk-root>
was already there but since i did not annotate it with '`' it was not showing, I only noticed it now. A bit late from my side but thanks for the heads up –
Trounce [<stacktrace_file>]
with your obfuscated file, e.g: my_obfuscated_file.txt. The command should look like: retrace.bat -verbose mapping.txt obfuscated_stack_trace.txt –
Trounce We can use pro-guard tool to retrace :
1st get the mapping file from the below location
<project-path>app/build/outputs/mapping/flavor/release/mapping.txt
Find the pro-guard tool i.e. "proguardgui" from the below location
<your-computer-name>/AppData/Local/Android/SDK/tools/proguard/lib
then you will get proguardgui.jar
On mac : /Users/<your computer name>/Library/Android/sdk/tools/proguard/lib
By using terminal
java -jar /Users/<your computer name>/Library/Android/sdk/tools/proguard/lib/proguardgui.jar
Now click on the retrace option on the left menu side to get the below window, browse your mapping.txt
file from the above location and add your stack trace error logs in the obfuscated stack trace window and then click on the ReTrace
button to get the deObfuscated error report.
There is one more way of doing automatically using Google play store console.
Check this website of Google Play Store Console for detailed steps.
Another option (works for me).
Location: C:\Program Files\Android\Android Studio\jre\bin (java.exe is here)
Add the files from Sdk\tools\proguard\lib:
proguard.jar
retrace.jar
Add your mapping.txt and stacktrace file
Create a bat file with the lines:
java -jar retrace.jar -verbose mapping.txt stacktrace
pause
Run it.
© 2022 - 2025 — McMap. All rights reserved.