BEFORE
Here’s the stack trace as obfuscated by ProGuard:
Caused by: java.lang.NullPointerException at net.simplyadvanced.ltediscovery.be.u(Unknown Source) at net.simplyadvanced.ltediscovery.at.v(Unknown Source) at net.simplyadvanced.ltediscovery.at.d(Unknown Source) at net.simplyadvanced.ltediscovery.av.onReceive(Unknown Source)
AFTER
All you need to do is write one line in the command prompt, and the obfuscation will be removed, as you can see here:
Caused by: java.lang.NullPointerException at net.simplyadvanced.ltediscovery.UtilTelephony.boolean is800MhzNetwork()(Unknown Source) at net.simplyadvanced.ltediscovery.ServiceDetectLte.void checkAndAlertUserIf800MhzConnected()(Unknown Source) at net.simplyadvanced.ltediscovery.ServiceDetectLte.void startLocalBroadcastReceiver()(Unknown Source) at net.simplyadvanced.ltediscovery.ServiceDetectLte$2.void onReceive(android.content.Context,android.content.Intent)(Unknown Source)
HOW TO DECODE STACK TRACE
You can choose either the command line method or GUI (Graphical User Interface) method.
HOW TO DECODE STACK TRACE VIA GUI
1) Open <android-sdk>/tools/proguard/bin/proguardgui.bat
2) Select the “ReTrace” option on the left column.
3) Add your mapping file and obfuscated stack trace.
4) Click “ReTrace!”
Thanks to David Bilik for mentioning this GUI method.
HOW TO DECODE STACK TRACE VIA COMMAND LINE
1) You will need your ProGuard’s mapping.txt file and the stack trace (Ex: stacktrace.txt) that you want to de-obfuscate.
2) The easiest way to do the next step is copy both these files into your<android_sdk_root>/tools/proguard/bin.
3) If you are on Windows, run the following command in the same directory as the files (make
sure you change to your own file names):
retrace.bat -verbose mapping.txt stacktrace.txt > out.txt
4) out.txt will have the stack trace de-obfuscated. Now you can debug much easier and faster than before.
本文介绍了如何通过GUI或命令行方法使用mapping.txt文件还原由ProGuard混淆的堆栈跟踪。提供了详细步骤,包括打开ProGuardGUI,选择ReTrace选项,添加映射文件和混淆堆栈跟踪,以及在命令行中运行特定命令来完成去混淆过程。
1912

被折叠的 条评论
为什么被折叠?



