Android Studio Java 反编译器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31614729/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Studio Java decompiler
提问by André Fratelli
I recently found out about Android Studio's decompilerand a few questions arose as I'm currently involved in an Android project. I just tried it and it generated near perfect code, surprisingly.
我最近发现了Android Studio 的反编译器,并且在我目前参与一个 Android 项目时出现了一些问题。我刚刚试了一下,它生成了近乎完美的代码,令人惊讶。
How good are Java decompilers nowadays? Are there protection mechanisms to prevent decompilation? Any security concerns to have in mind?
现在的 Java 反编译器有多好?是否有防止反编译的保护机制?有什么安全问题需要考虑吗?
Best.
最好的。
回答by Bonatti
This questions is too broad. So I will split the questions and answers:
这个问题太宽泛了。所以我将问题和答案分开:
How good are Java decompilers nowadays?
现在的 Java 反编译器有多好?
Very good. You are likely to get readable classes back.
非常好。你很可能会得到可读的类。
Are there protection mechanisms to prevent decompilation?
是否有防止反编译的保护机制?
Yes, things like code obfuscators, or even other alternatives
是的,诸如代码混淆器之类的东西,甚至其他替代品
Any security concerns to have in mind?
有什么安全问题需要考虑吗?
All security concerns are best kept in mind, depending on your application.
最好记住所有安全问题,具体取决于您的应用程序。
Against decompilers?
反对反编译器?
Not really, your code should be readable and still dont pose a threat to the system or its users. The best concept here would be the "white box" concept, in wich your code does not need to be hidden.
并非如此,您的代码应该是可读的,并且仍然不会对系统或其用户构成威胁。这里最好的概念是“白盒”概念,其中您的代码不需要隐藏。
If you are handling something that should not be know, try executing it in a controlled enviromment, such as a controlled webservice.
如果您正在处理不应该知道的事情,请尝试在受控环境中执行它,例如受控 Web 服务。