Ubantu16.04 for Android 8.0 source code compilation

Source: Internet
Author: User

Divided into 4 processes

  1. SOURCE download
  2. Building a compilation environment
  3. Compiling source code
  4. Run
Source download install git and configure
//安装gitsudo apt-get install git//配置git名称和邮箱git config --global user.name "your name"git config --global user.email "[email protected]"
Create a repo bin directory and source directory
    1. Create a bin directory for repo

      midir ~/bin
    2. Create source Directory

      midir ~/source
Installing Repo

Because of the common on-line installation repo method, there Cannot get http://gerrit.googlesource.com/git-repo/clone.bundle is an exception, through the Internet search, because repo need to update their own project, not connected to the project itself git repository, in this, took a manual pull repo the latest project way

    1. Pull from Gitrepo项目

      git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
    2. git-repoCopy the inside repo文件 to~/bin目录

    3. ~/sourcenew folder in directory, rename to .repo git-repo repo copy to .repo directory

    4. will be ~/bin/repo added to the environment variable and given permissions

      //赋予权限chmod a+x ~/bin/repo//添加到环境变量将export REPO=~/bin 添加到~/.bash_profile///让配置文件生效source ~/.bash_profile
Download source initialization repository

CD to the ~/source directory, execute the following command

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest

or this command.

repo init -u git://aosp.tuna.tsinghua.edu.cn/aosp/platform/manifest

The effect of both is consistent, only the agreement is different.
If the prompt fails to connect to gerrit.googlesource.com during the execution of the command, then we just need to edit the ~/bin/repo file, find the Repo_url line, and modify its contents to:

Repo_url = ' Https://gerrit-google.tuna.tsinghua.edu.cn/git-repo '
Then re-execute the above command.

Additional Information
The manifest command without parameters is used to get the most recent code on master, but it can be specified by the-b parameter to get a specific version of Android, for example, if we want to get the ANDROID-4.0.1_R1 branch, the command is as follows:

Repo Init-u https://aosp.tuna.tsinghua.edu.cn/platform/manifest-b ANDROID-4.0.1_R1
(Aosp the current list of all branches of the project see: Branch list)

Synchronizing code

The command is as follows

repo sync

Ubantu16.04 for Android 8.0 source code 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.