Ubuntu12.04 System compiled Android4.4 source code

Source: Internet
Author: User

System environment

System: Ubuntu12.04 64-bit system.

Source: Android4.4 source code.

Choose Ubuntu12.04, is because in 14.04 failed to toss success, in the above compatible with 32-bit program configuration a little annoying. 12.04 must be used 64-bit, compile Android4.4 need 64-bit environment, and to be compatible with 32-bit programs, toss.

Steps
    1. Configure JDK6

Android's official step is to use the OPENJDK, the actual measurement is not possible. Find https://jdk6.java.net/download.html on the Web this URL has the required JDK, download the self-extracting installation package. After self-extracting, create a JDK directory in the current directory, open/etc/environment, and add your own JDK Bin directory into path. Also add the following environment variables:

Classpath=/path/to/your/local/jdk/dir/libjava_home=/path/to/your/local/jdk/dir

Then execute the following command to set the system's default JDK:

$ sudo update-alternatives--install/usr/bin/java java/usr/local/java/jdk1.6.0_38/bin/java 300$ sudo Update-alternatives--install/usr/bin/javac Javac/usr/local/java/jdk1.6.0_38/bin/javac 300$ sudo Update-alternatives--install/usr/bin/javaws javaws/usr/local/java/jdk1.6.0_38/bin/javaws 300$ sudo Update-alternatives--install/usr/bin/jar jar/usr/local/java/jdk1.6.0_38/bin/jar 300$ sudo update-alternatives-- INSTALL/USR/BIN/JAVAP javap/usr/local/java/jdk1.6.0_38/bin/javap 300$ sudo update-alternatives--config java
    1. Install packages
      Can be installed to install, so as not to compile the failure, but also back to re-install, as follows:

      $ sudo apt-get install build-essential make gcc g++ libc6-dev texinfo libncurses-dev git-core GnuPG Flex Bison Zip Curl NC Urses-dev libsdl-dev Zlib1g-dev ia32-libs libxml2-utils Lzma

    2. Compiling source code
      To the source directory, as follows:

      $ source Build/envsetup.sh
      $ lunch
      Select Arm platform.

      $ make-jn
      n is twice times the number of CPUs, mainly to improve the speed of the compilation.

Possible errors

The compilation process encountered the following error:

File "/usr/lib/python2.7/subprocess.py", line 679, in __init__     errread, errwrite) file "/usr/lib/python2.7/ subprocess.py ", line 1259, in _execute_child     raise child_exception oserror: [Errno 2] No such file or directory

The general situation is due to the fact that the previous JAVAP is not configured. If the necessary packages are not installed, there will be similar prompts, carefully look up the error prompt, find the real wrong place, install the corresponding package.

Reference
    1. Linux (ubuntu14.04) compiled Android4.4 source of the environment to build and compile the whole process
    2. Android 4.4 Code Resources 115 network disk download

Ubuntu12.04 System compiled Android4.4 source code

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.