1. Install git
Sudo apt-Get install Git-core
2. Install curl
Sudo apt-Get install Git-core curl
3. Install repo and download repo through curl
This is the case on the Internet or in many books:
Curl http://android.git.kernel.org/repo> ~ /Bin/Repo
The repo obtained in the result cannot be used. What is the 301 redirection! Miserable! Later, I posted a post on csdn, and Daniel gave it a solution!
Http://code.google.com/p/git-repo/downloads/detail? Name = repo-1.12This link provides the download Repo!
You can also run the following command:
Curl http://git-repo.googlecode.com/files/repo-1.12> ~ /Bin/Repo
4. Modify the execution permission
Chmod A + x ~ /Bin/Repo
5. Modify ~ /Bin/repo File
This step is prone to errors, and brother died here for a long time! Many books or websites use the following command:
~ /Bin/repo init-u git: // android.git.kernel.org/platform/manifest.git
After the execution, wait for n long, and the results will show unexpected results.
Error: Failed connect to code.google.com: 443; operation now in progress while accessing https://code.google.com/p/git-repo//info/refs
Online solution: Modify ~ /Bin/repo File
Repo_url = 'https: // code.google.com/p/git-repo /'
Change
Repo_url = 'HTTP: // code.google.com/p/git-repo /'
6. Then add the bin path to the path:
Export Path = $ path :~ /Bin
7. Create a directory and enter it.
Mkdir Source
CD Source
8: Run
Repo init-u git: // android.git.kernel.org/platform/manifest.git
Repo init-U Git://Code=ra.org/Platform/Manifest. Git-BGingerbread
Your name and email will be asked in the middle. If you want to uploadCodeEmail must be a Google account.
After repo Initialization is successful, you will see an example similar to the following:
Repo initialized in/home/(current user name)/source
9: Execute $ repo sync to start the synchronization code. The process is long. The download speed depends on your network speed (for example, about 3-4 hours). disconnection may occur in the middle. Re-Execute repo sync to resume data transfer.