How to obfuscate a class which is referenced in Manifest file using Dexguard?

1.9k views Asked by At

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?

3

There are 3 answers

1
Eric Lafortune On BEST ANSWER

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.

0
Muhammad Umer AndroidDeveloper On

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.

0
TinyButMighty On

You can obfuscate a class which is referenced in Manifest file by using this tool: Bg+ Anti Decompiler (JAVA) It's free to use.