One : Download, compile and test Android Source code
(1) Configure the Android Source code download environment:
1.Create a directory to hold the download script file (repo) (you can put the script file in any directory, use ~/binhere).
2. Download repo script file (for download Android source code)
3. Create a directoryto hold the Android Source code (can be placed in other directories)
# mkdir Android-source
# CD Android-source
4. Initialize
5. Start downloading Android Source code
(2) Android Source code directory structure Analysis
(3) Download part of Android Source code:1, use repo sync command
2. Using the git clone command
(4) Compiling Android Source code
1. Initializing the compilation Environment # source build/envsetup.sh
2. Select Target
3. Compiling Android Source code
(5) Out directory structure Analysis
(6) Publish your APK as an Android built-in program
(7) test system with simulator . Img file
Two : Download and compile the Linux kernel source code
(1) Download the Linux kernel source code
# git clone http://android. googlesource.com/kernel/common.git
(2) directory structure of Linux kernel source code
(3) Install the Android Kernel's compilation environment
1. Preparation: The arm-linux-gcc-4.3.2.tgz file and The arm-none-linux-gnueabi-arm-2008q3-72for-linux.tar.bz.2 file is copied to the working directory.
2. Unzip the compiler
3. Verify that the cross compiler is successfully installed
4, installation libnctrses5
(4) Configuring and compiling the Linux kernel
Android porting is a Linux kernel transplant, and linux kernel porting is a Linux -powered migration. So in order to develop and test Linux drivers. Need to build two sets of development environment:Android Application development environment and Linux kernel development environment!
Fourth chapter source code download and compile