Applying Obfuscation by Itself

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 -dontshrink
  • Optimization, can be disabled by adding the rule -dontoptimize
  • Obfuscation, can be disabled by adding the rule -dontobfuscate

The short answer for you is to add these rules to your PG config:

-dontshrink
-dontoptimize

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 :wink:

2 Likes