Download, compile, and run Android 7.1 system (Ubuntu 16.0.4)

Source: Internet
Author: User

The Android 7 system version adds many new features, such as task handling, which allows users to double-click the "Recent" button to quickly switch to their last used application. Also, there is a "clear all" button in the "Recent" menu. Another example is the addition of the provincial traffic function, near the end of the user's billing period, or the traffic packet itself is small, reduce the application consumption of data traffic. When this mode is enabled, the system intercepts data usage in the background and, where possible, reduces the amount of data used by the foreground running the app, such as restricting you to watch the video, downgrading the image, and reducing the cache. Of course, you can also use the individual application without restrictions. There is also the built-in Google's new VR platform daydream and so on. Android system is more and more powerful, but there is no home support 7.x mobile phone, as a developer must first experience writing this powerful version of Ah, the following to talk about how this version compiled and run.

First, the source code download
Download the source code from the Android official website if you can turn over the wall, then it, the source image used here is Tsinghua University. Download the way you can do it according to the following steps:

1. Download Repo Tools

mkdir ~/binPATH=~/bin:$PATHcurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod +x ~/bin/repo

2. Download the initialization package

wget https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar

3. Unzip the downloaded initialization package

tar xf aosp-latest.tar

4, get the complete source code

cd aosprepo sync

After the third step is extracted, a AOSP directory is generated in the home directory, and the code directory can be updated synchronously by entering this directory to perform repo sync.

The source of the download about 2 hours or so OK (of course, is the speed of the internet, like my company's network when the download can reach 2-3m per second)

Second, compile

My build environment here is ubuntu16.0.4.

1. Install the required libraries for compiling

sudo apt-getInstall libx11-dev: i386 Libreadline6-dev: i386 LIBGL1-mesa-devG++-Multilib sudo apt-getInstall- yGIT Flex Bison gperf Build-essentialLibncurses5-dev: i386 sudo apt-getInstall Tofrodos python-markdownLibxml2-utilsXsltproc zlib1g-dev: i386 sudo apt-getInstall dpkg-devLibsdl1. 2-devLibesd0-devsudo apt-getInstall Git-coreGNUPG Flex Bison Gperf Build-essentialsudo apt-getInstall Zip Curl zlib1g-devGcc-multilibG++-Multilib sudo apt-getInstall LIBC6-dev-i386sudo apt-getInstall LIB32NCURSES5-devX11proto-core-devLibx11-devsudo apt-getInstall LIBGL1-mesa-devLibxml2-utilsXsltproc Unzip M4sudo Apt-getInstall lib32z-devCCache

2. Install open JDK

sudo apt-get install openjdk-7-jdk

3. Installing GCC

sudo apt-get install gcc

4. Update all libraries

sudo apt-get update

5. Compiling

Setting the Jack Service memory

export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g"

Compile

source build/envsetup.shlunch aosp_arm-eng-j8

The make command can carry parameters such as a PC with eight cores that can be make-j8

Third, the operation

Good machine performance of the compilation about two hours or so, after the completion of the compilation can be started with the simulation of its running

export ANDROID_PRODUCT_OUT=out/target/product/genericexport ANDROID_BIN=out/host/linux-x86/binPATH=$ANDROID_BIN:$PATHsource build/envsetup.shlunch aosp_arm-engemulator64-arm-gpu-memory2048

Download, compile, and run Android 7.1 system (Ubuntu 16.0.4)

Related Article

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.