How to deobfuscate R8 Stack traces?
Asked Answered
O

1

10

I have an app and it crashes just like every good app should! A little while ago, the Android build tools started using R8 instead of Proguard. It worked and it sped up my build, so I left it alone. Then came an exception stack trace that I had to deobfuscate. I used the proguard UI, The retrace.bat script, and the commandline, but the supposedly deobfuscated stack trace still looked obfuscated.

Looking at the mapping.txt generated, I see a bunch of numbers (line numbers?) in the mapping that I don't recall having seen before. I suspect these are the reason why the deobfusctaors above all fail.

Is there any way to currently deobfuscate such stack traces?

Also posted as https://issuetracker.google.com/137078989

Oleta answered 9/7, 2019 at 18:51 Comment(0)
U
12

Please make sure to download the latest version of ProGuard from https://sourceforge.net/projects/proguard/ to get a version of retrace which will work with the R8 mapping files.

If that still does not produce the correct stack trace file a new bug (or update the existing).

Update answered 18/7, 2019 at 7:9 Comment(2)
Yeah that's the answer I got from Google. Should have updated this post. Thanks.Oleta
Confirmed. I had an issue with proguard v4.7 included in Android sdk tools. Proguard v6.2.0 worked fine. For macOS users: you can install proguard directly by running brew install proguard; to check existing version run proguard with no arguments. In case you don't have it in your path, try to run ~/Library/Android/sdk/tools/proguard/bin/proguard.shPlaygoer

© 2022 - 2025 — McMap. All rights reserved.