我们将混淆我们的项目,但不想失去远程调试和热交换的能力。
可能吗?哪些工具可以处理这个问题?我会对简单的混淆感到满意——只需重命名类/方法/变量。
[已编辑] 我们正在使用 Intellij IDEA,但找不到此任务的任何插件。
我们将混淆我们的项目,但不想失去远程调试和热交换的能力。
可能吗?哪些工具可以处理这个问题?我会对简单的混淆感到满意——只需重命名类/方法/变量。
[已编辑] 我们正在使用 Intellij IDEA,但找不到此任务的任何插件。
We have the same kind of needs (simple obfuscation, need to debug later) and we use ProGuard. It's a Java app, which can be integrated in an Ant task.
It can do a lot of things, but it's also fully tuneable. So you can keep your obfuscation simple. One of the options is to generate a "Symbol Correspondance Table", which allows you to retrive the non-obfucated code from the obfuscated one. (it keeps track that the variable xyz in the class qksdnqd is in fact myCuteVarName in the class MeaningfulClassName)
Edit: Obfuscation can be tricky. Some examples:
Edit2: You can also see:
请参阅SD Java 混淆器。它去除注释和空格,并重命名所有不公开的成员/方法/类名称。
它还为您提供了代码如何混淆的映射,例如,对于每个符号 FOO 混淆为 XYZ,映射 FOO->XYZ。这意味着如果您得到提及 XYZ 的回溯,您可以轻松确定原始符号 FOO。当然,由于只有您(进行混淆处理的人)拥有此地图,因此只有您可以这样做。