Android system source code download and compile

Source: Internet
Author: User

Android system source code download and compile

1 First of all your jdk and GIt is already installed successfully. (Baidu )

2 If you are using a Ubuntu64 system, you need to install the package:(Other ubuntu systems have different downloads, see the official website document https://source.android.com/source/ initializing.html)

sudo apt-get install Git-core GnuPG Flex Bison gperf build-essential \

Zip Curl Zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \

Lib32ncurses5-dev x11proto-core-dev libx11-dev Lib32z-dev ccache \

Libgl1-mesa-dev Libxml2-utils Xsltproc Unzip

3 Download the source code , install Repo

1) $ mkdir ~/bin

$ Path=~/bin: $PATH

$ Curl Https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo//(need FQ, can Baidu )

$ chmod a+x ~/bin/repo

4 Create working directory to store source code

1)$ mkdir working_directory

$ CD Working_directory

Configure Gitconfig

$ git config--global user.name "Your name"

$ git config--global user.email "[Email protected]"

5 Download the source code (because to visit Google, so to FQ, so you can find someone else has downloaded good)

$ repo init-u https://android.googlesource.com/platform/manifest-b ANDROID-4.0.1_R1

$ repo sync//Sync code

6 after the download is successful, compile it in the main source directory

$ source build/envsetup.sh or $. build/envsetup.sh

Then is to perform the selection of the compilation branch, in the company source code has been compiled steps, here directly with the official website steps

Chosecombo according to the custom

$ Lunch Aosp_arm-eng

$ make-j4

7 Compiling a single module:

1, mmm path/path/. /targetmodule

2. ADB root

3. ADB remount

For example

The INSTALL:OUT/TARGET/PRODUCT/SAMG_VF/SYSTEM/PRIV-APP/SETTINGS/SETTINGS.APK executes the following statement

4. ADB Push out/target/product/samg_vf/system/priv-app/settings/settings.apk/system/priv-app/settings/

Android system source code download and compile

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.