查看混淆后的日志

本文介绍如何通过Google提供的工具解析混淆后的APP崩溃日志。详细解释了混淆后的APK中包含的不同类型文件的作用,并提供了具体步骤来还原混淆的日志。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

APP混淆已经是APP发布时的标配技术了,但是我们又需要回去用户使用APP时的崩溃日志,这个时候,看到的日志确是被混淆了,想a.b.c.c()!是不是要狂了呢?。所以,Google当然会为我们考虑到这种情况。下面对具体的使用进行说明。

代码混淆生成apk之后,项目下面会多出来一个build\outputs\mapping\release文件夹,下面分别解释release文件夹中四个文件的作用。

dump.txt : 描述了apk中所有类 文件中内部的结构体。( Describes the internal structure of all the class files in the .apk file )

mapping.txt : 列出了原始的类、方法和名称与混淆代码间的映射。( Lists the mapping between the original and obfuscated class, method, and field names. )

seeds.txt : 列出了没有混淆的类和方法。( Lists the classes and members that are not obfuscated )

usage.txt : 列出congapk中删除的代码。( Lists the code that was stripped from the .apk ) 

1.cmd进入sdk/tools/proguard/bin目录。

2.将混淆后的日志cache_file_name.txt和上文提到的mapping文件放入此目录中。

3.执行命令:retrace.bat mapping.txt cache_file_name.txt

执行命令前:

Casused by: java.lang.NullPointerException
at com.example.test d.a.c(SourceFile:110)
at com.example.test d.a.c(SourceFile:88)
at com.example.test .activity.CommitFragmentBase.init(SourceFile:1330)

执行命令后:

Casused by: java.lang.NullPointerException
at com.example.test loginActivity.login.setView(SourceFile:110)
at com.example.test dloginActivity.login.setView(SourceFile:88)
at com.example.test .activity.CommitFragmentBase.init(SourceFile:1330)


这样是不是就很清楚了呢?!

原文:http://blog.youkuaiyun.com/fwt336/article/details/51896009

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值