[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
4 comments:
It is working! Thanks for the useful info. for those facing git port block in there network.
After repo init, I did the same changes in manifest.xml; before issuing sync command.
Great to hear it helped you. Thanks for leaving your comment.
This works great! I'm behind a restrictive firewall, so I couldn't even run repo init; I had to run that from another server, tar it up, and bring it to my machine. Once I could do that, though, your script seems to have done the trick!
Works Great !!
Thanks a lot
Post a Comment