Linux repo preparation and code download
Https://code.google.com/p/git-repo/downloads/list // latest version, first download the latest version
From http://hi.baidu.com/lizhengjun2010/blog/item/0b84aa406f2d579eb2b7dcf7.html
At the company's request today, modify the source code and re-customize the Android system!
Haha... installed a familiar Ubuntu, first of all let the system shine...
Download the source code!
Follow the steps in the book to download the source code. The result is incorrect. n more! Baidu and Google again... after an afternoon, we finally started to download it!
Here, I would like to share some of my online copies (Haha...). I hope you will not take a detour!
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.12 this link provides 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. Execute repo init-u git: // androidgit.linaro.org/platform/manifest.git-B android-2.3.4_r1
This step was completed in about a minute.
9. Modify the. Repo File
Find the manifest. xml file under. Repo in the source directory. This is a hidden file that can be viewed by LS-.
CD. Repo
Gedit manifest. xml
Set fetch = "Git: // android.git.kernel.org /"
Change
Fetch = "Git: // android.git.linaro.org /"
10. Execute repo sync
OK. Download the source code! Applaud !!! Haha ....
The younger brother is also a newbie. please correct me if you have any mistakes. If you have any questions! Leave a message!
------------------------
The following error is prompted:
/Home/xxxxxx/bin/repo: Line 1: Unexpected syntax error near "newline"
/Home/xxxxxx/bin/repo: Line 1: '<! Doctype HTML public "-// IETF // dtd html 2.0 // en
According to the above method