This chapter focuses on using Git to download two sets of source code. One set is the Android source code, the other is the Linux kernel source code. This article mainly describes how to download and compile Android source code and Linux kernel source code.
Android source code contains many things, such as the source code embedded in the Android system built-in application, the source code of the various tools with the Android SDK and the HAL source.
1. Configure the Android source code download environment to execute a series of commands on the Linux terminal:
First step: Create a directory to hold the download script file (repo) (You can place the script file in any directory where you use ~/bin)
# mkdir ~/bin
# PATH = ~/bin: $PATH
Step two: Download the repo script file
Step three: Create a directory to hold the Android source code (can be placed in another directory)
# mkdir Android_source
# CD Android_source
Fourth Step: Initialize
Fifth step: Start downloading Android source code
# Repo Aync
If you want to back up your Android source code, it's best not to put the repository (. git directory), or the Repo Sync command will re-download the entire Android source code. If you rely on the repository, performing the Repo sync command will only download the change section.
Parsing of 2.android Source code directory
Compiling Android Source code:
First step: Initializing the compilation environment
Step two: Select a directory
Step three: compiling Android source code
# make
# MAKE-J4
Android source code contains embedded in the Android system of the application source code, the Android SDK with the various tools of the source, the Android NDK code, the HAL source.
Android Deep Exploration Fourth chapter experience