Xamarin.Android - 没有本土code编译做逆向工程难度? [英] Xamarin.Android - does native code compilation make reverse engineering harder?

查看:511
本文介绍了Xamarin.Android - 没有本土code编译做逆向工程难度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在考虑我们的C#.NET应用程序移植到Android,而我已经开始阅读有关Xamarin.Android和单声道框架。我刚开始与Android的发展。

We are considering porting our C# .NET application to Android, and I have started reading about Xamarin.Android and the Mono framework. I am just beginning with Android development.

我注意到主 http://xamarin.com/android 页面,它指出:

I notice on the main http://xamarin.com/android page that it states:

本机code   高性能编译code,可全面进入所有的原生API。

这是否意味着产生code将是本土code是比较难以逆转工程师?我们想创建除其他事项外,它包含我们的密钥算法类库,如果我们可以将其编译为本地code阻碍逆向工程,这将使得我们不再那么可怕移植的。

Does this imply that the generated code will be native code that is more difficult to reverse engineer? We would like to create amongst other things a class library that contains our key algorithms, and if we can compile it to native code to hinder reverse engineering, that would make us less fearful of porting.

我已阅读关于Android code不是更难反编译比混淆.NET程序集(使用的ProGuard之后)的几个其他职位。原产code编译一个最新功能那些帖子之后来到?感谢您的任何意见!

I have read several other posts about Android code not being much harder to decompile than obfuscated .net assemblies (after using ProGuard). Is native code compilation a recent feature that came after those posts? Thanks for any advice!

推荐答案

目前,Android的下Xa​​marin不会编译为本地的处理器code。它创建.NET的P code,它运行在一个单声道的虚拟机,每个Xamarin编译应用程序与应用程序文件的其余部分安装。据我所知,只有这样,合理的方法来创建本地code为Android是使用Android NDK(<一href="http://developer.android.com/tools/sdk/ndk/index.html">http://developer.android.com/tools/sdk/ndk/index.html)和写code C或C ++。

Currently, Xamarin under Android does not compile to native processor code. It creates .NET p-code, which runs in a Mono virtual machine, which each Xamarin-compiled app installs with the rest of application files. As far as I know, the only way reasonable way to create native code for Android is to use Android NDK (http://developer.android.com/tools/sdk/ndk/index.html) and write code in C or C++.

我做了一些非正式的基准,与Xamarin和Dot42,和原生code编译的C#比较Java和类似物code,对于现实生活中的应用(文字处理)。基本上,C#从Xamarin比Java或Dot42更快的在那个特定的应用程序,约10-20%,而本土code是快约5-6倍。更多详情:

I did some informal benchmarks, comparing Java and analogues code in C# compiled with Xamarin and Dot42, and native code, for a real-life app (text processing). Basically C# from Xamarin was about 10-20% faster than Java or Dot42 on that particular app, while native code was about 5-6 times faster. Read more at:

<一个href="http://stackoverflow.com/questions/17134522/does-anyone-have-benchmarks-$c$c-results-comparing-performance-of-android-ap">Does人有基准(code和;的结果)?写在Xamarin C#和Java的Andr​​oid应用程序的性能比较

此外,为了保护我的Andr​​oid的Java code来自黑客,我用DexGuard混淆器( http://www.saikoa.com/ dexguard )。不过,我真的不知道它是多么困难得多好黑客反编译和篡改这种混淆code。 DexGuard不会保护当然.NET Xamarin code,只有Java的code或编译为JVM其他code。它甚至不会保护Dot42 code,这直接编译为Dalvik虚拟机的P code(虚拟机的所有正常的Andr​​oid应用程序运行,Java的code也是dexed,并转换成Dalvik的$ C $Ç才可以在Android上运行)。

Also, to protect my Android Java code from hacking, I use DexGuard obfuscator (http://www.saikoa.com/dexguard). However, I really don't know how much harder it is for good hackers to de-compile and tamper with such obfuscated code. DexGuard will not protect .NET Xamarin code of course, only Java code or other code compiled for JVM. It won't even protect Dot42 code, which compiles directly to Dalvik VM p-code (the virtual machine all normal Android apps run in, Java code is also "dexed" and converted to Dalvik code before it can run on Android).

格雷格

这篇关于Xamarin.Android - 没有本土code编译做逆向工程难度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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