1. Download the kernel and file system 1.1 download the file system 1) install Git on Ubuntu10.04 as long as the correct update source is set and then use apt-get, if there is any dependency problem, let it solve it by itself. Curl is a File Transfer tool that uses the URL syntax to work in the command line. It will be used when Repo is installed later. (It seems that Ubuntu10.04 has installed git1.7.04 by default, so this step is not required.
1. Download the kernel and File System
1.1 download a file system
1) install Git
To install git on Ubuntu 10.04, you only need to set the correct update source and use apt-get. If there is any dependency problem, let it solve it by yourself. Curl is a File Transfer tool that uses the URL syntax to work in the command line. It will be used when Repo is installed later. (It seems that Ubuntu10.04 has installed git1.7.04 by default, so this step is not required)
Sudo apt-get install git-core curl
2) install Repo
First, make sure to create a/bin directory under the current user's home directory (if not), and then put it (~ /Bin) add it to the PATH environment variable. then download the Repo script through curl and save it ~ /Bin/repo File
Curl http://Android.git.kernel.org/repo> ~ /Bin/repo
Do not forget to grant repo executable permissions
Chmod a + x ~ /Bin/repo
3) initialize the version Library
If you want to take down all the sourcecodes in the latest version of the current Android main line, we need repo help. First create a directory, such ~ /Myandroid, used later
Repo init command.
Repo init-u git: // android.git.kernel.org/platform/manifest.git
Finally, you will see a prompt such as repo initialized in/android, indicating that the local version library has been initialized.
4) download Android code
Run the following command $ repo sync
5.) du-sk or du-sm shows the folder size.
1.2Git download kernel source code for android linux
1) mkdir ~ /Android_kernel
2) cd ~ /Android_kernel
3) git clone git: // android.git.kernel.org/kernel/common.git (download the default kernel source code)
The following is an example of common git commands:
4) cd common
5) git branch (check the current branch and the result is android-2.6.27)
6) git branch-r (display the remote branch List)