Unity Code Encryption for Android,mono compilation

Source: Internet
Author: User

Uinty3d encryption recommended a few better blog links:

Http://www.cppcourse.com/u3d-encryption.html

http://www.xuanyusong.com/archives/3553

http://m.blog.csdn.net/blog/yy405145590/41205283

Http://blog.sina.com.cn/s/blog_799860f90102vp0l.html

"One" principle of encryption1, Unity3d is based on mono, and mono is open source, we re-edit mono, and add encryption and decryption algorithm, generate so file, replace so in Unity project. "II" NDK installation

1. Download Unity's corresponding version of mono source code, official address: https://github.com/Unity-Technologies/mono/,

2. Re-edit mono, because the author used the Win7 system, the beginning is with Cygwin, the results of various failures, so installed the virtual machine VMware Workstation, then you need to download a Linux system ISO image file, the author was downloaded ubuntu-14, The size is about 1G, then the image file is installed on the virtual machine ~ ~ ~ After the installation of the approximate appearance is like this

3. Into the Ubuntu system, I created a new directory in the home directory monobuild, open the terminal command line mode,

$ mkdir Monobuild

Then put the downloaded mono source code zip file into this directory (can only be dragged from Windows to this directory on it), this time input

$ ls

You can see the Monobuild directory.

4. Unzip mono to enter the Monobuild directory

$ CD Monobuild

Perform the decompression command

$ unzip mono-unity-4.6. zip

5. Download the NDK installation package, this time you want to see the/mono-unity-4.6/external/buildscripts/build_runtime_android.sh file on line 13th about the NDK version of Unity

then download the corresponding version of the NDK to the website and install

6. After installation, NDK configuration, input

$ gedit ~/.BASHRC

Add at the end of the open file

Export ndk_home=/home/anyq/monobuild/android-ndk-R9 export PATH= $PATH: $NDK _home

Where the ndk_home equals sign is the path of the NDK and can be viewed with the PWD command output current path

Input

$ source ~/.BASHRC

Make it effective immediately.

7.NDK Authentication, input

$ nkd-build

If not prompted Commond not found is successful.

"III" SDK installation (can not be installed)

1. Download ANDROIDSDK on official website, need FQ, hehe. Also put in the Monobuild directory.

2. This time needs decompression, than I am the author of the download is android-sdk_r24.3.3-linux.tgz, input

TAR-ZXVF Android-sdk_r23. 0.2-linux.tgz

3. Join as NDK at the end of BASHRC

Export android_home="/home/anyq/android-sdk-linux"export PATH="  $PATH: $ANDROID _home/tools: $ANDROID _home/platform-tools"
"Four" compilation

1. Copy the mono-unity-4.6/external/buildscript/build_runtime_android.sh to the mono-unity-4.6/root directory.

2. Switch to the mono-unity-4.6/directory and use ROOT to run the build_runtime_android.sh

./build_runtime_android.sh  

3. You will be prompted not to install Git

sudo apt-get install git  

4. Modify BUILD_RUNTIME_ANDROID.SH line 113 to read:

(CD "$KRAIT _patch_path" && perl/build.pl)  

5. Then modify the mono-unity-4.6/external/android_krait_signal_handler/build.pl

(This is the script that calls git clone to come over the https://github.com/Unity-Technologies/krait-signal-handler/)

Remove the first line

#!/usr/bin/env perl-w  

6. Continue to run error, prompt ANDROID_NDK version is not correct, but also download, download and failure, modified to our own version.

Find build.pl, modify the Buildandroid function inside the R9 for the version you downloaded r10e

7. Modify the RELEASE.TXT in the android-ndk-r10e directory

Instead: r10e

8.EXTERNAL/ANDROID_KRAIT_SIGNAL_HANDLER/JNI/APPLICATION.MK file

Toolchain_version: = clang3.3  changed to Toolchain_version: =4.8  

9.

And then continue compiling.

Hint No autoreconf

Install autoreconf using the following command:

sudo apt-get update  sudo apt-get install autoconf  

The same way, by the way the following packages are installed

* autoconf  * automake  * Bison  * gcc  * gettext   2.0  * libtool    * Make * perl  

10. If you're lucky, you'll be able to compile successfully.

  

You can see the package success, Lib in Builds/embedruntions/android.

  

Unity Code Encryption for Android,mono compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.