用于减小大小的最佳 Java 混淆应用程序

发布于 2024-07-05 18:08:31 字数 1557 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

纵情客 2024-07-12 18:08:33

当谈到 J2ME 和混淆时,谨慎一点是值得的。 Proguard 是最好的选择,因为它已经开发了很多年,并且已经收到了许多错误修复。 我记得 2.X 和 3.X 之间的版本转换以及它如何破坏了我(当时的)雇主的许多构建。 发生这种情况的原因是,一些能够节省更多大小的更改在某些手机中也以微妙的方式破坏了类文件,而在其他手机和桌面 JVM 上则完全没有问题。

目前 Proguard 3.11 是混淆器中最安全的选择。 如果您不必支持非常旧的手机,4.XX 可能就可以了。

When it comes to J2ME and obfuscation it pays to be a bit cautious. Proguard is the best choice because of the many years it has been in development, and the many bugfixes that it has received. I remember the version transition between 2.X and 3.X and how it broke many of my (then) employer builds. This happened because some of the changes that enabled more size savings also broke the class files in subtle ways in some handsets, while being perfectly fine in others and on desktop JVMs.

Nowadays Proguard 3.11 is the safest choice in obfuscators. 4.XX is probably fine if you don't have to support very old handsets.

染火枫林 2024-07-12 18:08:33

奇怪的是,没有人记得 ProGuard 不仅可以缩小和混淆代码,还可以优化。 最后的版本允许指定多个通道进行优化(默认情况下只有一个通道),我可以指定 9 个通道。

当我反编译我的类后,我几乎无法识别它们,ProGuard 重构了很多方法调用。 只需要对这个精彩的应用程序进行一些调整即可。 所以我认为 ProGuard 是可行的方法,只是不要忘记稍微调整一下。 它还有一个非常好的手册

Strange that no one remembered that ProGuard can not just shrink and obfuscate the code, but optimize as well. The last versions allow to specify several passes for optimization (by default there is a single pass), I may specify, say, 9 passes.

After I decompile my classes I can hardly recognise them, ProGuard restructures a lot of method calls. All it takes is just a bit of tweaking this wonderful app. So I think ProGuard is the way to go, just don't forget to adjust it a little. It also has a very nice manual.

奢望 2024-07-12 18:08:31

I also prefer ProGuard for both it's size reduction and breadth of obfuscation - see http://proguard.sourceforge.net/. I don't necessarily have size constraints other than download speeds, but haven't found anything that shrinks further.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文