Mono for Android,代码混淆 [英] Mono for Android, code obfuscation

查看:26
本文介绍了Mono for Android,代码混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,盗版在 Android 上已成为一个非常严重的问题.Mono for Android 在编译为本机代码时是否提供代码混淆?

As everybody knows, piracy becomes a very serious issue on Android. Does Mono for Android provide code obfuscation when compiling to native code?

推荐答案

Mono for Android 不提供此功能,但是您仍然可以使用第三方工具进行混淆.由于 Mono for Android 生成由 Android 设备上的 Mono 运行时 JIT 的 CIL 程序集,因此您需要混淆这些 .NET 程序集.因此,像 Android 混淆器 Proguard 这样的工具不会帮助你.据报道,以下 .NET 混淆器可与 Mono for Android 配合使用.

Mono for Android does not provide this functionality, however you can still use a third-party tool for obfuscation. As Mono for Android produces CIL assemblies that are JITed by the Mono runtime on the Android device you need to obfuscate these .NET assemblies. Therefore tools like the Android obfuscator Proguard will not help you. The below .NET obfuscators have been reported to work with Mono for Android.

如果您使用 Xenocode Postbuild,请确保禁用元数据缩减",以便类名在 Java 中保持有效.

If you use Xenocode Postbuild then make sure you disable "metadata reduction" so that Class names remain valid in Java.

更新

Xamarin.Android 允许您打包 APK 文件,而无需编译的 .NET DLL.这意味着您不需要从 .NET 的角度应用混淆.我可以提取我的发布 APK 文件,发现只包含 classes.dex 文件和 .so 库文件.要启用此功能,请勾选在本机代码中嵌入程序集"框(这可能仅适用于企业订阅者).

Xamarin.Android allows you to package APK files without the need for the compiled .NET DLLs. This means you do not need to apply obfuscation from a .NET point of view. I can extract my release APK file and find that only the classes.dex file and the .so library files are included. To enable this tick the box "Embed assemblies in native code" (this may only be available for Enterprise subscribers).

这篇关于Mono for Android,代码混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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