有没有办法使用ProGuard和MonoDroid的一种方式? [英] Is there a way to use ProGuard with MonoDroid?

查看:141
本文介绍了有没有办法使用ProGuard和MonoDroid的一种方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的开发团队只(主要)完成使用Visual Studio中MonoDroid的Andr​​oid应用程序。因为它与银行的事,我们想尝试它混淆,以增加一些安全性以防止任何人试图反编译它。最初,我想我可以只使用ProGuard的,但似乎没有要,我可以在Visual Studio编辑project.properties文件。任何人都可以闪耀光辉的一些帮助光对这个问题,并告诉我,如果有可能搭配使用ProGuard和单声道和我newbishness只是笼罩着我的愿景是什么?

Our development team just (mostly) finished an Android app using MonoDroid in Visual Studio. Because it has to do with banking, we wanted to try to obfuscate it in order to add some security against anyone trying to decompile it. Initially, I figured I could just use ProGuard, but there doesn't seem to be a project.properties file that I can edit in Visual Studio. Can anyone shine some glorious helping light on this subject and tell me if it is possible to use ProGuard with Mono and my newbishness is just clouding my vision?

(另一名开发者试图使用Dotfuscator - 由于我们无法立即找到一种方法,使用ProGuard-,但它与众多的错误而导致失败;单声道运行时似乎给它发出。)

(Another developer tried to use Dotfuscator -since we couldn't immediately find a way to use ProGuard- but it failed with numerous errors; the Mono runtime seems to give it issues.)

推荐答案

Mono的为Android工具链没有对目前运行ProGuard的任何支持。

The Mono for Android toolchain doesn't have any support for running proguard at the moment.

然而,有一个广泛的例外,缺乏proguard的载体是基本上无实际意义。 Proguard的只能运行在Java字节code。该单为Android架构已在进程中运行Mono的运行时间; .NET CIL是不是编译成Java字节code时,CIL是由单声道JIT编译。跑来跑去唯一的Java code是的Andr​​oid调用包装,这让的Java / Android的调入管理code。

However, with one broad exception, the lack of proguard support is largely moot. Proguard only runs on Java bytecode. The Mono for Android architecture has the Mono runtime running in the process; .NET CIL is not "compiled" into Java bytecode, the CIL is JITed by Mono. The only Java code running around is for Android Callable Wrappers, which allow Java/Android to call into managed code.

因此​​,唯一的ProGuard将保护在单声道的Andr​​oid应用是Android的生成调用包装,这在很大程度上是由一堆本地方法声明。不会有任何业务逻辑在Android调用包装到反编译。

Thus the only thing proguard will protect in a Mono for Android app is the generated Android Callable Wrappers, which largely consists of a bunch of native method declarations. There won't be any business logic to decompile in the Android Callable Wrappers.

相反,CIL集存储在 .apk文件文件pssed uncom $ P $。反过来组件可进行反编译,以获取所有的业务逻辑。这里的解决方案是将它们嵌入到 .apk文件之前混淆组件。有 的异种code的Postbuild 2010可报告使用时,虽然我不知道任何细节上如何挂钩这件事。

Instead, the CIL assemblies are stored uncompressed in the .apk file. The assemblies in turn can be decompiled to obtain all your business logic. The solution here is to obfuscate the assemblies before embedding them into the .apk. There are reports that Xenocode's Postbuild 2010 can be used, though I don't know any of the details on how to hook this up.

上面提到的例外涉及到任何定制的Java code列入建立PROCES 通过 AndroidJavaSource AndroidJavaLibrary 构建行动,将用于包括诸如AdMob广告库。对于这种情况,我们应该添加ProGuard的支持,以构建过程中,虽然我当proguard的支持将被添加上没有ETA。

The exception mentioned above relates to any custom Java code included in the build proces via the AndroidJavaSource and AndroidJavaLibrary Build actions, which would be used to include such things as the AdMob library. For this scenario we should add proguard support to the build process, though I have no ETA on when proguard support will be added.

这篇关于有没有办法使用ProGuard和MonoDroid的一种方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆