repo/git Android/CyanogenMod srouce code

For getting the whole Android/CM rom source code,
1. get the repo first.
2. make sure the git is installed.

1. how to get the repo:
$ curl > ~/bin/repo
2. how to install git (Ubuntu):
apt-get install git-core git-svn gitk git-gui git-email gnupg

** other tools
sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl valgrind

** For Android rom:
repo init -u -b android-2.3.1_r1 (the whole build)
** For CM rom: // Click "Fork" button, and copy the "HTTPS clone URL" for git.
repo init -u git:// -b cm-12.0    // Cm12的代码, 基于android5.0

repo init -u git:// -b cm-11.0    // Cm11的代码, 基于android4.4, 大于23.4 GB

** Related URL:

** Related Git:
git clone
git clone
git clone (but too big, 2.04GB)

参考文章:  //设置ndk, 编译环境Cygwin工具搭建及配置, 但android-ndk-r7b(自带toolchain, 不需要装cygwin)。  //Android环境搭建3 编译Android源码  //GitHub使用(二)-- 从代码库下载代码到本地  //Build Android source codes (looks on Mac PC)

** Sample for fetch CM 11 source code:

xxxxxx@xxxxxx-PC ~/test
$ curl > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24081  100 24081    0     0  14071      0  0:00:01  0:00:01 --:--:-- 19264

xxxxxx@xxxxxx-PC ~/test
$ chmod a+x ~/bin/repo

xxxxxx@xxxxxx-PC ~/test
$ PATH=~/bin:$PATH

or edit ~/.profile file
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
$ source ~/.profile

xxxxxx@xxxxxx-PC ~/test
$ git config --global  ""

xxxxxx@xxxxxx-PC ~/test
$ git config --global "xxxxxx"

xxxxxx@xxxxxx-PC ~/test
$ repo init -u git:// -b cm-11.0

Your identity is: xxxxxx <>
If you want to change this, please re-run 'repo init' with --config-name

Testing colorized output (for 'repo diff', 'repo status'):
  black    red      green    yellow   blue     magenta   cyan     white
  bold     dim      ul       reverse
Enable color display in this user account (y/N)? y

repo has been initialized in /home/xxxxxx/test

xxxxxx@xxxxxx-PC ~/test
$ ls -al
total 8
drwxr-xr-x+ 1 xxxxxx None 0 Mar 19 00:43 .
drwxr-xr-x+ 1 xxxxxx None 0 Mar 19 00:46 ..
drwxr-xr-x+ 1 xxxxxx None 0 Mar 19 00:46 .repo
xxxxxx@xxxxxx-PC ~/test
$ repo sync