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