首页 >Unity3D频道 >【Unity3D研究院之游戏开发】 > Unity3D研究院之Android加密DLL与破解DLL .SO(八十一)
2015
07-02

Unity3D研究院之Android加密DLL与破解DLL .SO(八十一)

首先要非常感谢大神提供了这么好的一篇文章,帮助我解决了1年我都没能解决的问题。其次感谢这两天微博好友给我的留言与评论。

阅读本文之前请先阅读大神的这篇。

http://www.luzexi.com/unity3d-%E9%87%8D%E6%96%B0%E7%BC%96%E8%AF%91mono%E5%8A%A0%E5%AF%86dll/

我做的时候有些细节不太一样。一样的地方我就不写了,我把不一样的地方写出来。

加密DLL首先要找准unity版本对应的mono,地址在这里 https://github.com/Unity-Technologies/mono

这里有个很恶心的事情,unity的mono版本并不是按小版本分的,比如我想找unity4.6.1 对应的mono那么它就没有,unity只提供4.3x 或者 4.6x 或者5.1x 这种大版本的mono .从提交时间上来看更新的很随意啊。我感觉要想找到对应的unity版本,可以根据unity这个版本发布的时候,然后在github上找对应时间的mono版本。。

如下图所示,打开网页后,找到对应的branches版本, 这里选择unity-4.6 或者 unity-5.1 这两个版本我已经测试通过。别的版本希望大家都能来参与测试。

Snip20150702_1

 

在说说说恶心的地方,我下载4.6以后,把mono编译出来。放在unity4.6.1的打出来的包里 死活会报错, 但是4.6.6就没问题了。。 不过还好我这里两个项目 一个是用unity4.6.6还有一个是unity5.1.1目前都没出现问题。

下面我都用unity4.6举例,其他版本原理都一样我就不赘述了。

1.github下载下来对应的mono解压放在本地,在终端里先cd到这个目录下。

2.把打包脚本拖入终端中(注意脚本的路径),然后就开始耐心等待吧。估计5分钟左右就OK了。

3.打包脚本分两种, 一个是 arm的,还有一个是x86,执行build_runtime_android.sh 就可以了, 它会自动调用

build_runtime_android_x86.sh。

Snip20150702_2

打包脚本我们需要改一下,因为下载下来的脚本直接运行打的是debug版本,效果就是打出来的.so比unity自带的大很多。我们要改成release版本。

如下图所示,左边是x86,右边是arm。把CFLAGS里的-g改成-O2 (O0 ,O1,O2,OS,O3分了好几个压缩档次,我觉得O2就可以了)然后在LDFLAGS里加上-Wl,–gc-sections 就行了。
Snip20150702_3

注意:今天同事说x86下有些手机进游戏卡死。后来经过一番分析,原来是x86的编译选项和arm不一样。如下图所示,在X86.sh 这里只把-g去掉就行。。别的什么都别改。切记切记!!!

Snip20150830_2

 

然后在下面把这两句代码注释掉,不然编译的时间就要增加了。

#clean_build “$CCFLAGS_ARMv5_CPU” “$LDFLAGS_ARMv5” “$OUTDIR/armv5”
#clean_build “$CCFLAGS_ARMv6_VFP” “$LDFLAGS_ARMv5” “$OUTDIR/armv6_vfp”

在打mono.so前记得改一下解密算法。因为在测试所以解密和加密算法我们就写简单一点。如下图所示,mono/metadata/image.c里面找到 mono_image_open_from_data_width_name 。 因为我只会对自己写的c#编译后的dll加密,所以这里判断一下是否是我们自己的dll,解密算法很简单就是让字节下标为1的字节-1。

如果你要热更DLL时一定要注意!!这里一定要先判断一下name是否为NULL 不然使用System.Reflection.Assembly.Load  在Android平台反射调用DLL的时候unity 会挂的。

	if(name != NULL)
	{
		if(strstr(name,"Assembly-CSharp.dll")){
                       data[0]-=1
		}
	}

 

Snip20150702_4

还有如果想在 mono里打印Log的话可以使用

#include <glib.h>

g_message(“momo: %s”,str);

OK 然后开始编译mono吧。arm 和x86 两个大概 5 分钟左右就能编译完成。对应会会放在mono根目录build的文件夹里。然后回到生成的adnroid工程中,把libmono.so 分别放在x86和armeabi-v7a文件夹下。因为我项目用了slua所以这里也会有一些第三方的.so

Snip20150702_6

再说说自动化的问题,DLL每次代码变更都会重新生成一个新的,那么我总不能每次都手动加密DLL然后在手动的拷贝到assets下面吧。。

再说一句,我的项目在处理自动化打包时用的是adnroid的ant打包。也就是先把unity导出成一个android 工程。然后在打包。所以我的自动化就可以是当android工程生成后,然后把dll读取到内存里,加密后在重新写到原来工程的位置上。如果有朋友不太懂自动化,可以在我博客里搜索一下,以前我有写过。

https://www.xuanyusong.com/archives/3384 环境变量如果你不会加的话,也可以看我这篇文章。

这段代码的意思就是当eclipse的android工程生成后,紧接着就给dll加密。。字节一变那么Dll其实就变成了一个普通的二进制文件。这样用各种反编译Dll的工具就都打不开了。

	//shell脚本来自动调用unity中的这个c#方法
	static void ExportAndroidProject()
	
	{
	
		
		List<string> args = GetArgs("ExportAndroidProject");
	
		
		if (string.IsNullOrEmpty (BuildPipeline.BuildPlayer (GetBuildScenes (), args [0], BuildTarget.Android, BuildOptions.AcceptExternalModificationsToPlayer))) 
		{
			
			encryptDll (args [0]);
		
		}
	
	}
	
	static private void encryptDll(string path)
	
	{
		//DLL在android工程中对应的位置
		
		string inpath = path +"/"+ PlayerSettings.productName +"/assets/bin/Data/Managed/Assembly-CSharp.dll";
		
		if(File.Exists(inpath)){
       		//先读取没有加密的dll
			
       		byte[] bytes = File.ReadAllBytes (inpath);	
			
       		//字节偏移 DLL就加密了。
			bytes [0] += 1;
			//在写到原本的位置上
			
			File.WriteAllBytes (inpath, bytes);
		
		}
	
	}

然后还有前面我们编译出来的两个 mono.so 也要在这里自动化一并拷贝到这个工程对应的目录下面(可以在shell里拷贝,也可以在C#里拷贝)。 接下来就调用自动打包apk就行了。。总之最后的效果就是Dll不能被解开了。如下图所示。

8b0d88d5jw1etl36qex3bj20na0ettbr (1)

8b0d88d5jw1etl36p9o0rj20jp0a70tf (1)

但是,高兴的别太早。DLL是解不开了,但是你的解密算法是写在.so里面的,那么对方反编译你的.so取出解密算法,随便写个小工具就可以把你的DLL逆向回来。。

在windows上下载ida pro 神器(真是道高一尺魔高一丈啊)。

http://www.h4ck.org.cn/2014/08/ida-pro-6-5-with-hex-rays-x86-decompiler-v1-5-and-hex-rays-arm-decompiler-1-7/

然后打开我们编译的libmono.so

找到mono_image_open_from_data_width_name 方法,然后点击F5 解密算法就破解了。(下面我找到了一个避免破解的方法,在本文的最后)

{4A7CD790-4542-4AA0-98DC-F3E0B636762E}

 

怎样才能避免别人这么容易破解你的DLL呢?请看我的下一篇文章 Unity3D研究院之Android二次加密.so二次加密DLL(八十二)

最后编辑:
作者:雨松MOMO
专注移动互联网,Unity3D游戏开发
捐 赠写博客不易,如果您想请我喝一杯星巴克的话?就进来看吧!

Unity3D研究院之Android加密DLL与破解DLL .SO(八十一)》有 125 条评论

  1. 旺仔说:

    雨大大~~ 我按照你的帖子来弄,2.把打包脚本拖入终端中(注意脚本的路径),然后就开始耐心等待吧。估计5分钟左右就OK了。 这一步的时候terminal遇到一个问题zhuangzaiwangdeMac-mini:Desktop zhuangzaiwang188$ cd mono-unity-4.6/zhuangzaiwangdeMac-mini:mono-unity-4.6 zhuangzaiwang188$ /Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh Environment:Host = macosxTemporary = /var/folders/57/40q_w5bd6yv8zxkj6jdq592m0000gp/T/Home = /Users/zhuangzaiwang188Installing NDK ‘r9’:$ANDROID_NDK_ROOT not set; using /Users/zhuangzaiwang188/android-ndk_auto-r9 insteadCurrently installed = r9NDK ‘r9’ is already installedOutputing updated environment:’envsetup.sh’$ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Krait patch repository already clonedEnvironment:Host = macosxTemporary = /var/folders/57/40q_w5bd6yv8zxkj6jdq592m0000gp/T/Home = /Users/zhuangzaiwang188$ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Installing NDK ‘r9’:Currently installed = r9NDK ‘r9′ is already installed$ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Clean: krait-signal-handler [armeabi]Clean: stdc [armeabi]Compile thumb : krait-signal-handler <= krait_signal_handler.cStaticLibrary : libkrait-signal-handler.aupdating: libkrait-signal-handler.a (deflated 59%)updating: build.txt (deflated 2%)make: *** No rule to make target `clean’. Stop.rm: android_cross.cache: No such file or directory~/Desktop/mono-unity-4.6/eglib ~/Desktop/mono-unity-4.6/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 114: autoreconf: command not found~/Desktop/mono-unity-4.6/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 116: autoreconf: command not found/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 118: ./configure: No such file or directoryConfigure FAILED!为何会Configure FAILED! 请雨大大指导下~~~~

  2. 旺仔说:

    雨大大~~ 我按照你的帖子来弄,2.把打包脚本拖入终端中(注意脚本的路径),然后就开始耐心等待吧。估计5分钟左右就OK了。 这一步的时候terminal遇到一个问题zhuangzaiwangdeMac-mini:Desktop zhuangzaiwang188$ cd mono-unity-4.6/zhuangzaiwangdeMac-mini:mono-unity-4.6 zhuangzaiwang188$ /Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh Environment: Host = macosx Temporary = /var/folders/57/40q_w5bd6yv8zxkj6jdq592m0000gp/T/ Home = /Users/zhuangzaiwang188Installing NDK ‘r9’: $ANDROID_NDK_ROOT not set; using /Users/zhuangzaiwang188/android-ndk_auto-r9 instead Currently installed = r9 NDK ‘r9’ is already installedOutputing updated environment: ‘envsetup.sh’ $ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Krait patch repository already clonedEnvironment: Host = macosx Temporary = /var/folders/57/40q_w5bd6yv8zxkj6jdq592m0000gp/T/ Home = /Users/zhuangzaiwang188 $ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Installing NDK ‘r9’: Currently installed = r9 NDK ‘r9′ is already installed $ANDROID_NDK_ROOT = /Users/zhuangzaiwang188/android-ndk_auto-r9Clean: krait-signal-handler [armeabi]Clean: stdc++ [armeabi]Compile thumb : krait-signal-handler <= krait_signal_handler.cStaticLibrary : libkrait-signal-handler.aupdating: libkrait-signal-handler.a (deflated 59%)updating: build.txt (deflated 2%)make: *** No rule to make target `clean’. Stop.rm: android_cross.cache: No such file or directory~/Desktop/mono-unity-4.6/eglib ~/Desktop/mono-unity-4.6/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 114: autoreconf: command not found~/Desktop/mono-unity-4.6/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 116: autoreconf: command not found/Users/zhuangzaiwang188/Desktop/mono-unity-4.6/external/buildscripts/build_runtime_android.sh: line 118: ./configure: No such file or directoryConfigure FAILED!为何会Configure FAILED! 请雨大大指导下~~~~

    • 许小峰说:

      你需要安装 autoreconf automake libtool

      • 旺仔说:

        您好, 非常感谢你的帮助, 我安装了autoreconf automake libtool现在有出现新的error, 如下:mono/tests/cas/linkdemand/Makefile.am:116: warning: ‘%’-style pattern rules are a GNU make extensionmono/tests/cas/linkdemand/Makefile.am:119: warning: ‘%’-style pattern rules are a GNU make extensionmono/tests/cas/threads/Makefile.am:82: warning: ‘%’-style pattern rules are a GNU make extensionmono/tests/cas/threads/Makefile.am:85: warning: ‘%’-style pattern rules are a GNU make extensionmono/tests/cas/threads/Makefile.am:88: warning: ‘%’-style pattern rules are a GNU make extensionmono/utils/Makefile.am:3: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)scripts/Makefile.am:216: warning: shell cygpath -m $(libdir: non-POSIX variable namescripts/Makefile.am:216: (probably a GNU make extension)scripts/Makefile.am:217: warning: shell cygpath -m $(libdir: non-POSIX variable namescripts/Makefile.am:217: (probably a GNU make extension)support/Makefile.am:10: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)support/Makefile.am:60: warning: source file ‘minizip/ioapi.c’ is in a subdirectory,support/Makefile.am:60: but option ‘subdir-objects’ is disabledsupport/Makefile.am:60: warning: source file ‘minizip/unzip.c’ is in a subdirectory,support/Makefile.am:60: but option ‘subdir-objects’ is disabledsupport/Makefile.am:60: warning: source file ‘minizip/zip.c’ is in a subdirectory,support/Makefile.am:60: but option ‘subdir-objects’ is disabledconfigure: creating cache android_cross.cachechecking build system type… x86_64-apple-darwin14.5.0checking host system type… arm-eabi-linux-gnuchecking target system type… arm-eabi-linux-gnuchecking for a BSD-compatible install… /usr/bin/install -cchecking whether build environment is sane… yeschecking for arm-eabi-linux-strip… /Users/zhuangzaiwang188/android-ndk_auto-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/arm-linux-androideabi-stripchecking for a thread-safe mkdir -p… ./install-sh -c -dchecking for gawk… nochecking for mawk… nochecking for nawk… nochecking for awk… awkchecking whether make sets $(MAKE)… yeschecking whether make supports nested variables… yeschecking whether UID ‘502’ is supported by ustar format… yeschecking whether GID ’20’ is supported by ustar format… yeschecking how to create a ustar tar archive… gnutarchecking whether to enable maintainer-specific portions of Makefiles… nochecking whether ln -s works… yeschecking host platform characteristics… okchecking for arm-eabi-linux-gcc… /Users/zhuangzaiwang188/android-ndk_auto-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc –sysroot=/Users/zhuangzaiwang188/android-ndk_auto-r9/platforms/android-9/arch-armchecking for arm-eabi-linux-gcc… (cached) /Users/zhuangzaiwang188/android-ndk_auto-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc –sysroot=/Users/zhuangzaiwang188/android-ndk_auto-r9/platforms/android-9/arch-armchecking whether the C compiler works… noconfigure: error: in `/Users/zhuangzaiwang188/Desktop/mono-unity-4.6′:configure: error: C compiler cannot create executablesSee `config.log’ for more detailsConfigure FAILED!zhuangzaiwangdeMac-mini:mono-unity-4.6 zhuangzaiwang188$ 请问大神,这个如何解决,求指导~~

      • 杜三狗说:

        我也是这个问题。。没人知道吗。。

    • 阿举说:

      问题解决了没有啊?我基本跳了他们所有坑了就差你这一个了。

    • 阿举说:

      我知道为什么了,你必须的Mono的主目录运行脚本,只有在它下面才有MakeFile,如果直接在文件目录运行的原因。。

  3. kun说:

    谢谢博主!已加密!

  4. Endy说:

    我在mac下环境安装提示我glib2.0没有,雨大怎么安装的呢?

  5. 自由人说:

    大神~~~~我在机器上编译了Android 版本 但是 iPhone却又是找不到 C编译器了 GCC 又重装了不知道该如何配置

  6. chengying说:

    既然可以拿到mono的源码。可不可以修改dll的加载路径呢。这样可不可以实现代码热更新呢?求指正

  7. KVF说:

    为什么不直接用在线应用加固,比如360加固保

  8. yxriyin说:

    从4.5升级到4.6 4.5的so放到4.6里会闪退 还好楼主说4.6.6是可以的哈 有很多人和我说4.6自己编译的放进去会闪退 这下放心了

  9. SJ说:

    MOMO 你看有没有时间看下 ori and the blind forest这个游戏(Unity做的PC单机游戏),他的所有资源是加密了的,但是代码没有加密,我死活没找到解密的地方,看看能给你提供一些思路不

  10. SJ说:

    MOMO, 既然能有mono源代码了,能够改变mono_image_open_from_data_with_name 这个方法名吗? 如果行的话,至少在so中找到解密算法又需要付出一些代价了吧?

    • 当然可以改名子。。 不过别人 全局搜索一下 “.dll”关键。。。。 我看腾讯游戏的加密算法就有点意思。。 写了一堆方法 一个套一个,每个方法改一点字节。。

  11. chwu说:

    make: *** No rule to make target `clean’. Stop.rm: android_cross.cache: No such file or directory

  12. chwu说:

    对mac系统不太熟悉 能指教下如何编译mono吗?各种报错求指导,能出一个编译环境的教程吗

  13. cjz说:

    加密的Key和代码设定只能从服务器加载?而且每次都不同。

    • 我们协议 lua 加密都是这样做的, 但是 .so比较特殊, 它是unity启动的依赖库, 这时候 是没法连接自己的服务器的, 所以也没办法渠道密钥。。。。哎~

  14. 乐开霖说:

    对Unity项目加密呢。我也想过很多种方法,但是都是投机取巧,还不知道可行不可行。目前在使用的有两种,求分析:1.只加密核心数据,把数据传到用C写的DLL里面,在DLL里面,再用第三方加密库,做加密,但是key可以直接反编译代码查出。后来直接把key写到DLL里面。硬编码。。。目前,自认为是可行性还是不错的。就是一个不小心,指针啥的没有控制好就奔溃。调试过程比较繁琐。2.用c#自带的MD5算法,在场景中新增一个tag(如:XXOO),创建诺干个(8个)GameObject,随机出8个Key,给这个8个GameObject的名字赋值。然后用,然后再代码中,需要做加密的地方,就找这个tag,然后去GameObject的名字,作为Key,参与MD5算法做验证。就算DLL给反编译,但是只能看到代码,没有出现key,所以没事。。但是不知道目前是否有办法通过反编译场景的数据,获取这8个GameObject的名字?

    • 个人觉得这个方案是然并卵呢。因为很多时候,别人根本不需要反编译出你的C代码。例如方案1,别人只要引用你的C# dll,再调用C的dll中的方法,即使不知道你的key,也一样能正确加密和解密的。目前包括腾讯在内的公司使用的方案都跟雨松差不多,在IL2CPP普及之前,这个方案应该是最好的了

  15. meij说:

    “解密算法很简单就是让字节下标为1的字节-1。”解密算法时在第一个字节-1,那么加密算法应该是在第一个字节+1,我自己用vc语言写了个,加密后打包apk无法安装。文本打开dll文件,开头的字母已经不是MZ,说明加密方法有误? 能否把你这个简易的加密算法代码发给我看看?我参考下,谢谢~ ~ qq邮箱:737871854@qq.com

  16. meij说:

    打包Android的话,打包arm不就行了吗,为什么还要打包x86的?

    • 我看unity自己也打了。。

      • meij说:

        打包的libmono.so文件,你是怎么去覆盖unity文件的,比如unity4.3版本,有10个libmono.so文件,其中2个arm下的libmono.so文件,是吧编译出来的libmono.so文件覆盖着2个arm下的libmono.so文件吗。 我这里运行build_runtime_android.sh会同时打arm包和x86包。。。。。

        • 我没有覆盖unity.app里的.so 而是先导出eclipse工程, 然后用shell把自己打的.so拷贝进去,最后ant来打包。。 build_runtime_android.sh 打的x86包要7M多。。 我运行build_runtime_androidx86.sh 打包就正常了。

          • meij说:

            是从apk包中取出dll对其进行加密,再把加密后的dll替换apk包中的dll文件吗?我这样做,把apk包安装到手机,总是安装失败。

      • 我编译的是4.6版本的在build_runtime_android.sh 中,发现有执行这一句source ${BUILDSCRIPTSDIR}/build_runtime_android_x86.sh dontclean 感觉上按照mono所述分别修改build_runtime_android_x86.sh 和 build_runtime_android.sh之后 只执行build_runtime_android.sh即可不知我理解的对不对。。。0. 0?

  17. 废墟说:

    正如所说的那样,道高一尺,魔高一丈,无论多么厉害的加密,最后始终是有破解的可能,但是,如果破解这个程序所花费的精力,比重新做一个的时间还多的话,那么这个加密就是OK的了。根据本文所说的加密原则提供的个人思路:加密程序使用:DecodeFunctionListReal真实解密函数表DecodeFunctionListUnReal虚假解密函数表解密程序使用:DecodeFunctionPos解密函数索引DecodeStack解密过程堆栈DecodeFunctionTable解密函数索引表在代码中将解密过程拆分成N个独立的解密函数过程,每个函数过程使用相同的DecodeStack。怎么拆分自己实现,然后我们可以得到一个解密函数列表DecodeFunctionListReal。然后做一些会导致解密失败的函数过程,然后可以得到DecodeFunctionListUnReal加密时,我们利用加密密钥与DecodeFunctionListReal与DecodeFunctionListUnReal生成一串程序代码,该代码唯一的作用就是初始化DecodeFunctionTable。然后将程序代码COPY到解密程序里,怎么COPY,需要自己实现。解密时,我们通过服务器获取到初始的解密代码索引+解密密钥,然后根据索引运行DecodeFunctionTable中的函数。解密密钥的作用就是生成生成下一个函数索引位置。当然这个只是一个简单的思路。

  18. 到此一游说:

    加密解密算法不能明显的现在相应的接口里,配置在服务器xml文件或者其他文件里面就可以了

  19. Chiuan说:

    貌似除了android,ios就不需要加密了。非常感谢mono的手把手测试分享。也很折腾。但曾经问过官方人说他们加密不需要改这个加载入口,他说只需要他们的人来改一下你的代码。不知道u3d官方人怎么实现的。要收费的服务。。。

    • iOS不需要加密, 因为DLL取出来只能看到方法名,但是看不到方法体的内容。。 但是前几天我听别说IOS下也可以破解,还不知道是怎么弄。 有时间了我得在研究研究

  20. Roy说:

    加密完的dll 在apk包里好像没法压缩了,apk大小会大几M

    • 对啊, 加密完就不是dll了。而是普通的二进制文件。。

      • ヤ刹神┼─皇说:

        你好,按照您的教程步骤 编译出现这个问题,请问有解决方法么。
        libtoolize: You should add the contents of `./libtool.m4′ to `aclocal.m4′.
        libtoolize: You should add the contents of `./ltoptions.m4′ to `aclocal.m4′.
        libtoolize: You should add the contents of `./ltsugar.m4′ to `aclocal.m4′.
        libtoolize: You should add the contents of `./ltversion.m4′ to `aclocal.m4′.
        libtoolize: You should add the contents of `./lt~obsolete.m4′ to `aclocal.m4′.
        libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])’ to configure.in and
        libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
        mono/benchmark/Makefile.am:52: `%’-style pattern rules are a GNU make extension
        mono/benchmark/Makefile.am:55: `%’-style pattern rules are a GNU make extension
        mono/mini/Makefile.am:451: `%’-style pattern rules are a GNU make extension
        mono/mini/Makefile.am:458: `%’-style pattern rules are a GNU make extension
        mono/mini/Makefile.am:147: compiling `genmdesc.c’ with per-target flags requires `AM_PROG_CC_C_O’ in `configure.in’
        mono/monograph/Makefile.am:32: `%’-style pattern rules are a GNU make extension
        mono/tests/Makefile.am:493: `%’-style pattern rules are a GNU make extension
        mono/tests/Makefile.am:496: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/assembly/Makefile.am:62: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/assembly/Makefile.am:65: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/demand/Makefile.am:76: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/demand/Makefile.am:79: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:86: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:89: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:92: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:95: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:98: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/inheritance/Makefile.am:101: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/linkdemand/Makefile.am:98: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/linkdemand/Makefile.am:101: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/linkdemand/Makefile.am:116: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/linkdemand/Makefile.am:119: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/threads/Makefile.am:82: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/threads/Makefile.am:85: `%’-style pattern rules are a GNU make extension
        mono/tests/cas/threads/Makefile.am:88: `%’-style pattern rules are a GNU make extension
        scripts/Makefile.am:216: shell cygpath -m $(libdir: non-POSIX variable name
        scripts/Makefile.am:216: (probably a GNU make extension)
        scripts/Makefile.am:217: shell cygpath -m $(libdir: non-POSIX variable name
        scripts/Makefile.am:217: (probably a GNU make extension)
        configure: WARNING: if you wanted to set the –build type, don’t use –host.
        If a cross compiler is detected then cross compile mode will be used
        configure: creating cache android_cross.cache
        checking build system type… i686-pc-linux-gnulibc1
        checking host system type… arm-eabi-linux-gnu
        checking target system type… arm-eabi-linux-gnu
        checking for a BSD-compatible install… /usr/bin/install -c
        checking whether build environment is sane… yes
        checking for arm-eabi-linux-strip… /test/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-strip
        checking for a thread-safe mkdir -p… /bin/mkdir -p
        checking for gawk… gawk
        checking whether make sets $(MAKE)… yes
        checking how to create a ustar tar archive… gnutar
        checking whether to enable maintainer-specific portions of Makefiles… no
        checking whether ln -s works… yes
        checking host platform characteristics… ok
        checking for arm-eabi-linux-gcc… /test/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc –sysroot=/test/android-ndk-r9/platforms/android-9/arch-arm
        checking for arm-eabi-linux-gcc… (cached) /test/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc –sysroot=/test/android-ndk-r9/platforms/android-9/arch-arm
        checking whether the C compiler works… no
        configure: error: in `/test/mono-unity-4.6′:
        configure: error: C compiler cannot create executables
        See `config.log’ for more details
        Configure FAILED!

留下一个回复

你的email不会被公开。 必填项已用 * 标注。