[Steps]
Ubuntu 10.04 LTS is my environment, though it doesn't matter very much.
The general guideline for downloading Android codes is available on http://source.android.com/source/download.html.
According to the above guideline, you are assumed to have the utility, repo, to run successfully it, and to have .repo directory. This is the point where I met the firewall problem.
You need to replace all uses of GIT protocol, "git:", with "http:" in the initialization. I have a little tip to do this quickly and, hopefully, correctly.
- $ grep -sr "git:" .repo | cut -d: -f1 | xargs -d '\n' sed -i -e 's/git:/http:/g'
- -s of grep to suppress error messages
- -r of grep to do recursively
- -d: of cut to use ':' as a delimeter
- -f1 of cut to select the first column of the delimetered tokens
- -d '\n' of xargs to use '\n' as a delimeter of xargs this time
- -i of sed to replace each matched pattern with the target one in place
- -e 's/git:/http:/g of sed to give a command to substitute every occurrence of "git:" with "http:" globally