OSX 10.10.1 compiling Android 4.4.4_r2

Source: Internet
Author: User

First, download Android 4.4.4_r2 source code
1. Create directory: cd ~ && mkdir bin src
2, switch to the bin directory, according to the official tutorial to initialize the good repo file3, set the check out the Android source code related to the host IP address nslookup g.cn query out the IP address; the host IP address used for this compilation (added to the hosts list)
203.208.46.148 googlesource.com203.208.46.148 www.googlesource.com203.208.46.148 android.googlesource.com64.233.168.87 chromium.googlesource.com64.233.168.87 gerrit.googlesource.com64.233.168.87 kernel.googlesource.com

4. Execute in src directory. /bin/repo sync, and so on download good source code, now is the Android 5.0 release, after the source download has 70g+, there is a git index directory. Repo has 60g+ 's big
second, compile Android 4.4.4_r2 source code
1, modify the system framework source code, need to modify the header file as follows
/ system/library/frameworks/qtkit.framework/headers/qtmoviemodernizer.h:156: /system/ library/frameworks/qtkit.framework/headers/qtmoviemodernizer.h:163:
compile Qume error when: error:expected a property attribute before ' Atomic ' Online Search concluded that the new version of Xcode compiler default OBJC property is Atomic, so it can't be defined.   Property attribute for Atomic, all said to install xcode5.x to compile. Without that, direct comment. qtmoviemodernizer.h:156, 1632 lines of atomic keyword, after change can xcdoe 6.1.1 Normal compile past.
2, modify the Android source code compilation script, so that it supports the compilation of 10.10 system. Modify files directly
// Related Repair method from this Bo main ball place learned, install the compilation environment What all are learning bo main ball, thanks. vi build/core/combo/host_darwin-x86.mk
//Find find mac_sdk_versions_supported mac_sdk_versions_supported: = 10.6 10.7 10.8 Change to Mac_sdk_ versions_supported: =  10.9 10.10
Modify External/chromium_org/base/android/jni_generator/jni_ generator.py, according to Bo main prompt to get patch modification, patch is to check the system version, determine whether the child process startup parameters with-fpreprocessed
Modify Build/core/combo/host_darwin-x86.mk
ifeq ($ (mac_sdk_version), 10.8)//10.8 Change to our SDK version 10.9
# Mac SDK 10.8 no longer has stdarg.h, etc /c3> is said to be here Bo main ball can happily compiled, but I can't. There are several steps that need to be dealt with.

3, remove the NDK_ROOT environment variable, in the beginning of the compilation support needs unset ndk_root, otherwise compile WEBRTC God horse error. If you have not installed the NDK, you have not set the NDK_ROOT environment variable to ignore.
4, for the SDL to play the source patch, why g God did not patch it, we have to modify the source code, refer to the patch address is http://hg.libsdl.org/SDL/changeset/bbfb41c13a87, in the source directory to find and open the file Sdl_ QuartzVideo.h, findCgdirectpaletteref Palette The number of rows, before and after adding judgment, as follows: 
#if (mac_os_x_version_min_required < 1070)      cgdirectpaletteref Palette;            /* Palette of an 8-bit display * / #endif

5, so far we can really happily compiled, I use a remote Mac machine to compile, so after SSH to the remote Mac after switching to the Android SRC directory after the execution
SOURCE build/envsteup.sh//Import environment variable lunch 1//estimate build Arm-eng compile configuration nohup make-j4 > ~/android-build.log 2>&1 & It's strange that you need to log in to SSH to be able to compile successfully, and if you want to reopen a new window locally, it will be a strange delimiter error.
at this point, our make is in the background using 4 threads to compile, 2 hours to complete the generation of 20G out directory.
  

OSX 10.10.1 compiling Android 4.4.4_r2

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.