Proguard is not obfuscating classnames that are the entry points in manifest file

We are using proguard for obfuscating the android app. We are able to obfuscate some classnames using proguard. But it’s not obfuscating certain class names like

  1. MainActivity
    2.MainApplication
    3.MemoryCheck
    4.NotificationHandler etc…

What could be the reason for this?

Hi @Rahul_Kojrekar ,

Technically it’s not possible to obfuscate all names. Typically, names of classes, fields, and methods accessed through reflection (e.g. with serialization) cannot be obfuscated as that would result in a crash such as ClassNotFoundException, NoSuchMethodException, or NoSuchFieldException.

For this reason, it’s possible (and necessary) to set up -keep rules to instruct ProGuard which of the classes or class members should not be obfuscated. You can use the ProGuard Playground to visualize the effect your configuration has on your code.

Best regards,

Jonas

1 Like

So, @jonas.gijbels where in official document it’s mentioned?. if you provide I will check it.

Hi @Pushp_Rathod ,

The exceptions are documented on the troubleshooting page, and the keep rules are documented on the usage page of the ProGuard manual.

Best regards,

Jonas