Is it possible to only use Proguard for obfuscation? I want to avoid stripping any classes from my projects. My intention to use ProGuard is only for obfuscation so as to prevent reverse engineering.
That’s definitely possible! At its core, ProGuard is split into three distinct processing phases that can be toggled on/off separately:
- Shrinking, can be disabled by adding the rule
- Optimization, can be disabled by adding the rule
- Obfuscation, can be disabled by adding the rule
The short answer for you is to add these rules to your PG config:
But if you want to get the most obfuscation possible, make sure to consider this post that discusses the added value of optimization from a security perspective:
and see if you maybe want to enable optimization after all