2010年2月25日 星期四

下載android source code

Installing Repo
Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git. To install, initialize, and configure Repo, follow these steps:
Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
$ cd ~
$ mkdir bin
$ echo $PATH

Download the repo script and make sure it is executable:

$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo


Initialise your repository, linking it to the cupcake branch where current development is focused.

  
$ repo init -u git://gitorious.org/android-on-freerunner/freerunner_platform_manifest.git -b cupcake

You will be asked for your name & email during the initialisation. These are used for stamping your commits later.

Now each time you issue a Git or Repo command in this directory it will automatically be referring to the Cupcake branch.

Synchronise the repository. This step will take a very long time for the first sync.

 
$ repo sync

如果你在防火牆後,可以按照以下方法:

I successfully 'GIT' android source through http proxy. Here is my steps:
Download a tool corkscrew from http://www.google.com/url?sa=D&q=http://www.agroman.net/corkscrew/&usg=AFQjCNH80ZnHJCws2QE4Zj6IAISoIMClhQ

$tar zxvf corkscrew-2.0.tar.gz

$cd corkscrew-2.0

$./configure

$make

$cp corkscrew ~/bin

# or to any directory in your $PATH
Create a shell script named 'git-proxy' in ~/bin, include following content:

#!/bin/sh exec ~/bin/corkscrew proxy port $*

Replace ~/bin/ and <...> with your own information.
and then run following command:

$git config --global core.gitproxy ~/bin/git-proxy

沒有留言: