The main learning in this chapter is to download, compile, and test the Android source code. The second is to learn to download and compile the Linux kernel source code.
The first is to compile the Android source code, because the Android source code in every project directory has the android.mk file, so when compiling the entire Android source code will recursively call each project directory in the Android.mk file to compile the current project.
The compile steps are as follows:
1. Perform any one of the two commands on the Linux terminal
#source build/envsetup.sh
#.build/envsetup.sh
2. The utility Lunch command sets the compilation target. The following command sets the compile target to Full-eng, which means that for all mobile devices, the Android emulator is active and all debugging options are turned on (output debugging information in the Logcat view).
3. Compiling Android Source code
Compile the Android source code by executing the following command.
#make
#make –j4
For downloading and compiling the Linux kernel source code, execute the following command to download the latest Linux kernel source code
#git Clone Https://android.googlesource.com/kernel/common.git
Executing the above command may take a long time to download the Linux kernel. After downloading, in the current directory there will be a common directory, after entering the directory, execute the following command to see which remote Repository is currently available.
Android Deep Exploration Experience (iv)