如何使用映射文件对Android Stacktrace进行模糊处理
我从崩溃报告系统中获得了一个堆栈跟踪,它像
I got a stacktrace from the crashreporting system and it is obfuscated, like
...无法解决以下问题:Lru/test/c/b/a;...
... Failed resolution of: Lru/test/c/b/a; ...
我有一个映射文件.
如何使用mapping.txt对这个堆栈跟踪进行模糊处理?
How to deobfuscate this stacktrace using mapping.txt?
从应用程序页面获取模糊的崩溃堆栈跟踪
Get deobfuscated crash stacktrace from your app page
通过以下步骤将您的mapping.txt上传到您的应用PlayStore页面:
Upload your mapping.txt to your app PlayStore page with the following steps:
- 登录到您的Play控制台.
- 选择一个应用.
- 在左侧菜单上,单击Android vitals>去模糊文件.
- 在您的应用版本旁边,点击上载".
- 为您的应用版本上传ProGuard映射文件.
这样做之后,要查看模糊的崩溃堆栈跟踪:
After doing so, to view your deobfuscated crash stack traces:
- 登录到您的Play控制台.
- 选择一个应用.
- 在左侧菜单上,点击Android vitals> ANRs&崩溃.
- 选择崩溃.
- 在堆栈跟踪"标签上,您将看到模糊的堆栈跟踪.
您可以查看此链接以了解更多详细信息
You can check this link for more details.
去模糊一段堆栈跟踪
Deobfuscate a piece of stacktrace
要自己转换代码,请使用retrace脚本(在Windows上为retrace.bat;在Mac/Linux上为retrace.sh).它位于< sdk-root>/tools/proguard/
目录中.该脚本采用了mapping.txt文件和您的堆栈跟踪,从而生成了一个新的,可读的堆栈跟踪.使用回溯工具的语法为:
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>]