如何使用Dexguard混淆清单文件中引用的类? [英] How to obfuscate a class which is referenced in Manifest file using Dexguard?

查看:407
本文介绍了如何使用Dexguard混淆清单文件中引用的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用Dexguard,并且我想混淆扩展了Activity类的类,我知道这很困难,因为它在清单文件中被引用. 我的问题是:有什么方法可以混淆清单文件中引用的类?

I am using Dexguard in my app and I want to obfuscate a class which extends Activity class, I get to know that it is hard because it is referenced in Manifest file. My question is: is there any way to obfuscate a class which it is referenced in Manifest file?

推荐答案

DexGuard会尽可能混淆类,字段,方法,资源,资源文件,资产文件和本机库的名称,并在代码,清单和其他资源.更具体地说,DexGuard确实混淆了活动类的名称并相应地更新了清单.但是,它不会混淆导出的活动的名称,无论是显式(exported ="true")还是隐式(使用意图过滤器). Android运行时将这些名称视为公共API,例如可见给其他应用程序,因此需要保留它们.

Wherever possible, DexGuard obfuscates the names of classes, fields, methods, resources, resource files, asset files, and native libraries, and it adapts their occurrences in the code, the manifest, and other resources. More specifically, DexGuard indeed obfuscates the names of activity classes and updates the manifest accordingly. However, it won't obfuscate the names of activities that are exported, either explicitly (exported="true") or implicitly (with an intent filter). The Android runtime treats these names as public API, e.g. visible to other apps, so they need to be preserved.

这篇关于如何使用Dexguard混淆清单文件中引用的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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