How to deobfuscate an Android stacktrace using mapping file

喜你入骨 提交于 2021-01-14 13:33:08

问题


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?


回答1:


Get deobfuscated crash stacktrace from your app page

Upload your mapping.txt to your app PlayStore page with the following steps:

  1. Sign in to your Play Console.
  2. Select an app.
  3. On the left menu, click Android vitals > Deobfuscation files.
  4. Next to a version of your app, click Upload.
  5. Upload the ProGuard mapping file for the version of your app.

After doing so, to view your deobfuscated crash stack traces:

  1. Sign in to your Play Console.
  2. Select an app.
  3. On the left menu, click Android vitals > ANRs & Crashes.
  4. Select a crash.
  5. On the "Stack Traces" tab, you'll see your deobfuscated 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 <sdk-root>/tools/proguard/ 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>]



回答2:


About deobfuscation of an existing stacktrace: only from the time you add mapping file you would be able to track the stacktrace, before that you won't be able to get the stacktrace.



来源:https://stackoverflow.com/questions/56006933/how-to-deobfuscate-an-android-stacktrace-using-mapping-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!