Android Source Download
Linux system has many tools and plug-ins, these plug-in Linux source does not come with, if necessary, need to download themselves. The official has put all the plug-ins deployed on the Linux source, the Android source code download, is the breakpoint continues to transmit, but the temporary file is very large, at least prepare 40G space, of course download time will be very long.
> Android source download support system currently only Ubuntu and Mac OS two operating systems, this time to Ubuntu system for example.
> Official website: http://source.android.com/source/downloading.html
1. Download git (version Control tool). Bring up the command line: Ctrl + ALT + T
sudo apt-get install git
2. Install Curl (the tool for uploading and downloading data).
sudo apt-get Install Curl
3. Install repo (a git-based repository management tool, which is used to automatically bulk download Android entire project.)
Create a Directory
MkDir bin
Download the repo script to the local bin folder
Curl Http://android.git.kernel.org/repo >~/bin/repo
If the download fails above, use the following method
Curl "Http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" >~/bin/repo
Append executable permissions to all users
chmod a+x ~/bin/repo
Temporarily add the repo to the environment variable to facilitate subsequent execution.
Note: This environment variable fails after each restart of Ubuntu, and reconfiguration is possible.
Export Path=~/bin: $PATH
4. Create a folder to store the downloaded Android source code.
Create a Directory
mkdir Android_source
Modify Permissions
chmod 777 Android_source
CD Android_source
5. Initialize the library.
You need to configure Git user information first
git config--global user.email "[Email protected]"
git config--global user.name "Zhaokan"
Repo Init-u https://android.googlesource.com/platform/manifest-b ANDROID-2.3_R1
If the above initialization fails, try the following
Repo Init-u git://codeaurora.org/platform/manifest.git-b Gingerbread
Or
Repo Init-u git://android.git.kernel.org/platform/manifest.git-b Gingerbread
##### #当屏幕出现以下信息表示成功初始化
Repo initialized In/home/liyindong/android_source
6. Start the simultaneous download.
Repo Sync
* * Downloading may be interrupted due to network problems during the download process. When the download is interrupted, continue with the Repo Sync command to continue the download.
Android Source Download