(The following command is used to log on to the root account. If a common user needs to add sudo before the command)
1. To build Java jdk1.6, see install java_jdk on Ubuntu.
2. Add a package
64-bit system:
Apt-Get install Git-core GnuPG flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev g ++-multilib mingw32 tofrodos Python-markdown libgl1-mesa-dev unzip tproc
32-bit system:
Apt-Get install Git-core GnuPG flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev tofrodos Python-markdown libgl1-mesa-dev extends tproc
3. Download the repo script
Mkdir ~ /Develop # create a develop folder under the same directory
Mkdir ~ /Develop/download-Froyo # create the download-Froy folder in the develop directory
Cd ~ /Develop/download-Froyo # enter this directory
Curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo>./repo # download the repo script from the source site, the script is provided by Google to facilitate the download of the source code, through the script can download the entire set of source code
Chmod A + x repo # Set this script to Executable
4. initialize a repo Client
./Repo init-u https://android.googlesource.com/platform/manifest # execute the repo init operation to get the latestSource codeList
./Repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.1_r1 # Then use-B to determine which branch to download
During the download process, you need to enter the name and email, and then select y for confirmation.
Finally, the system prompts that repo Initialization is complete in the directory where it is located. Here we can also see that there is a hidden file. repo/in the current directory with some initialization information.
4.CodeSynchronization
./Repo sync