问题
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?
回答1:
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.
回答2:
You can obfuscate a class which is referenced in Manifest file by using this tool: Bg+ Anti Decompiler (JAVA) It's free to use.
回答3:
Dexguard will not obfuscate a activity class if in manifest it have intent filter and exported true. if you want to obfuscate class use make your class exported false.
来源:https://stackoverflow.com/questions/41380092/how-to-obfuscate-a-class-which-is-referenced-in-manifest-file-using-dexguard