使用 ProGuard 调试 Android 的混淆堆栈跟踪 [英] Debug the obfuscated stack trace for Android using ProGuard

查看:79
本文介绍了使用 ProGuard 调试 Android 的混淆堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 ProGuard 映射文件混淆我的 Android 应用程序堆栈跟踪.我尝试使用 -verbose 并在 Android Studio 的配置文件 proguard-rules.pro 中添加了这些行:

I have been trying to obfuscate my Android app stack trace using ProGuard mapping file. I have tried using -verbose and added these lines in configuration file proguard-rules.pro in Android Studio also:

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

但是在使用 retrace.sh -verbose 时仍然出现 Unknown Source 而不是行号.

But still instead of line numbers there appearing Unknown Source while using retrace.sh -verbose.

知道为什么没有出现行号吗?

Any idea why line numbers are not appearing?

推荐答案

我像这样解码我的混淆堆栈跟踪:

I decode my obfuscate stack trace like this:

在您的 sdk 目录 android-sdk\tools\proguard\bin\ .. 打开控制台并写入:retrace.bat -verbose mapping.txt obfuscated_trace.txt其中 mapping.txt 是在为发布而构建的 apk 时从 android studio 生成的,而 obfuscated_trace.txt 是您从 google play 控制台的例外.

In your sdk directory android-sdk\tools\proguard\bin\ .. open console and write: retrace.bat -verbose mapping.txt obfuscated_trace.txt Where mapping.txt is generated from android studio when apk is build for release, and obfuscated_trace.txt is your exception from google play console.

它对我有用.希望能帮到你!

and it works for me. Hope to help!

这篇关于使用 ProGuard 调试 Android 的混淆堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆