i want to obfuscate AndroidManifest.xml with Proguard

删除回忆录丶 提交于 2019-12-06 03:53:14

The standard Android release builds only apply ProGuard to the compiled bytecode, not to any resource files. It therefore can't adapt files like AndroidManifest.xml.

Moreover, these build processes first run aapt to convert AndroidManifest.xml and other XML files to binary versions, for more efficient packaging and use. Aapt also writes out some configuration for ProGuard. ProGuard can only parse and adapt resource files in text format, so it wouldn't work on the binary versions.

DexGuard, the commercial extension of ProGuard that specifically targets Android, streamlines the build process. It also obfuscates and optimizes the binary XML files, as far as possible. As Nikolay mentioned, some class names still can't be obfuscated; notably the ones that may be referenced from other apps.

(I am the developer of ProGuard and DexGuard)

You can't: the system needs to know about your components (activities, services, etc.) You can't obfuscate the names of components references in the manifest either. The default ProGuard configuration excludes those explicitly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!