Java obfuscation - ProGuard/yGuard/other? [closed]

对着背影说爱祢 提交于 2019-11-26 16:34:09

问题


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.


回答1:


Proguard is a better product; especially if you take the time to go through the settings for J2ME.

Specifically for J2ME there is a far better (commercial) product called mBooster

I've been getting around 25% improvement in size on my application after its been through Proguard. This is mainly to do with the better Zip compression on the Jar file and comprehensive support for class merging and preverification.




回答2:


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.




回答3:


My opinion is - ProGuard is better. Output is smaller a bit. Optimizing is better and much faster.

Decompiling is simple in both cases. Well, i mean, if u know Java well and really know business-logic of what you're decompiling, there is no problem to get it back to sources from obfuscated classes.

So, my opinion is ProGuard is better.



来源:https://stackoverflow.com/questions/150653/java-obfuscation-proguard-yguard-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!