Java obfuscation - ProGuard/yGuard/other?

roryf picture roryf · Sep 29, 2008 · Viewed 16.6k times · Source

This is along similar lines as these recent questions:

Best Java Obfuscation Application For Size Reduction Creating non-reverse-engineerable Java programs

However, one ends up recommending yGuard and the other ProGuard but neither mention both. I wonder if we could get a comparison of each one and hear peoples experiences from both sides of the fence. Looking at this comparison chart on the ProGuard website its clearly angled towards ProGuard. But what about real-world experience of each - which one produces smaller output? which one is harder to decompile from? what Java versions are supported by each?

Personally I'm particularly interested from a J2ME point of view but please don't limit the discussion to that.

Answer

Pool picture Pool · Dec 5, 2009

Results for my project.

  • Obfuscation - both fine.
  • Optimisation - ProGuard produced 20% faster code (for the measured app bottleneck).
  • Compactness - ProGuard about 5% smaller.
  • Configuration / Ant - YGuard is much easier to configure.

So, I'd advise ProGuard - but configuration and ant integration could definitely be improved.