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:
http://source.android.com/source/downloading.html#installing-repo
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/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 https://android.googlesource.com/platform/manifest -b android-2.3.1_r1 (the whole build)
** For CM rom:
https://github.com/CyanogenMod/android // Click "Fork" button, and copy the "HTTPS clone URL" for git.
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0    // Cm12的代码, 基于android5.0

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

** Related URL:
https://github.com/username/android
http://source.android.com/source/using-repo.html

** Related Git:
git clone https://github.com/username/android_frameworks_native.git
git clone https://github.com/username/android.git
git clone https://android.googlesource.com/platform/prebuilt.git (but too big, 2.04GB)

参考文章:

http://my.oschina.net/tonywolf/blog/49214  //设置ndk, 编译环境Cygwin工具搭建及配置, 但android-ndk-r7b(自带toolchain, 不需要装cygwin)。

http://winuxxan.blog.51cto.com/2779763/502340  //Android环境搭建3 编译Android源码

http://bach-dream.iteye.com/blog/1333278  //GitHub使用(二)-- 从代码库下载代码到本地

http://conifertw1.blogspot.com/2014/10/build-android-source-codes.html  //Build Android source codes (looks on Mac PC)

** Sample for fetch CM 11 source code:

xxxxxx@xxxxxx-PC ~/test
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
:: :: --:--:-- 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
PATH="$HOME/bin:$PATH"
fi
$ source ~/.profile xxxxxx@xxxxxx-PC ~/test
$ git config --global user.email "xxxxxx@gmail.com" xxxxxx@xxxxxx-PC ~/test
$ git config --global user.name "xxxxxx" xxxxxx@xxxxxx-PC ~/test
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 Your identity is: xxxxxx <xxxxxx@gmail.com>
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
drwxr-xr-x+ xxxxxx None Mar : .
drwxr-xr-x+ xxxxxx None Mar : ..
drwxr-xr-x+ xxxxxx None Mar : .repo
xxxxxx@xxxxxx-PC ~/test
$ repo sync

repo/git Android/CyanogenMod srouce code的更多相关文章

  1. 【转】使用git 工具下载android.jar Source Code

    为了开发android应用,在开发时发现sdk没有源代码,这样在开发时太麻烦了,下面说说如何下载源代码,以及如何配置. 下载源代码需要git,先下载一个git.下面的操作都是在windows下完成的. ...

  2. [Android] repo 下载Android源码(国内镜像)

    reference : http://blog.csdn.net/shenlan18446744/article/details/51490560 repo 下载Android源码(国内镜像) 下载r ...

  3. jenkins+git部署环境,出现Failed to connect to repository : Command "git ls-remote -h http://gitlab.xxxxx.git HEAD" returned status code 128stdout: stderr: fatal: repository 'http://gitlab.xxxxx.git' not fou

    1.部署jenkins+git源码管理的方式,源码管理报128stdout 源码管理出现如下错误: Failed to connect to repository : Command "gi ...

  4. git android.google 源码:Unknown SSL protocol error in connection to code.google.com:443

    想要提取android的源码.就必须要使用git.下面是本人安装的过程发生的问题: 1.1安装git.win的命令行的客户端(相当与svn的乌龟那样使用).http://git-scm.com/dow ...

  5. 在win7下使用git和gitlab进行code review

    1.安装 Git-2.6.3-64-bit.exe  下载地址:http://pan.baidu.com/s/1hqGvwnq 2.根据收到的邮件进入gitlab网站,并修改密码登陆 3.新建一个文件 ...

  6. ubuntu18.04系统安装及php7.2,apache2,mysql8,git,svn,composer,vs code 到安装 php 扩展配置php.ini 实现 laravel5.8 运行

    简介:记录自己从系统安装到环境配置完毕运行laravel的记录    • 下载ubuntu18.04桌面版        ○ ubuntu18.04中国官网 https://cn.ubuntu.com ...

  7. Version Controlling with Git in Visual Studio Code and Azure DevOps

    Overview Azure DevOps supports two types of version control, Git and Team Foundation Version Control ...

  8. Android Studio Eclipse Code Formatter

    在从Eclipse转到Android Studio上开发后,如果还想继续使用在Eclipse上制定的自定义的Code Formatter的话,需要按如下步骤操作:1.进入Settings界面,如果能看 ...

  9. Android 中的code sign

    Android 中和ios中都有code sign.它们的目的一样,都是要保证程序的可靠性,最基本实现原理也一样.但是sign的过程比较不同. 下面记录一点Android sign的重要知识. 请参看 ...

随机推荐

  1. ZOJ 1494 Climbing Worm 数学水题

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=494 题目大意: 一只蜗牛要从爬上n英寸高的地方,他速度为u每分钟,他爬完u需要 ...

  2. html5 在移动端的缩放控制

    viewport 语法介绍: 01 <!-- html document --> 02 <meta name="viewport" 03     content= ...

  3. [Ramda] Compose lenses

    We can compose lenses to get value: const addrs = [{street: '99 Walnut Dr.', zip: '04821'}, {street: ...

  4. [Compose] 8. A curated collection of Monoids and their uses

    const { List } = require('immutable-ext'); const Right = x => ({ chain : f => f(x), ap : other ...

  5. [GraphQL] Use GraphQLList with GraphQLObject Types

    When working with collections of things in GraphQL, we'll always reach out for the GraphQLListType. ...

  6. 小强的HTML5移动开发之路(52)——jquerymobile中的触控交互

    当使用移动设备进行触控操作时,最常用的就是轻击.按住屏幕或者手势操作,jQuery Mobile可以通过绑定的触控事件来响应使用者的特定触控行为. 一.轻击与按住 直接上代码(一切皆在代码中,细细品吧 ...

  7. css3 实现水晶按钮

    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee432e), color-sto ...

  8. js获取浏览器尺寸

    Javascript: alert(document.body.clientWidth);        //网页可见区域宽(body) alert(document.body.clientHeigh ...

  9. svn: E200033: database is locked解决办法

    svn执行update,却被告知database is locked! 执行 svn update,却抛出个错误警报: svn: E200033: database is locked, execut ...

  10. Gibbs 采样定理的若干证明

    坐标平面上的三点,A(x1,y1),B(x1,y2),C(x2,y1),假设有概率分布 p(x,y)(P(X=x,Y=y) 联合概率),则根据联合概率与条件概率的关系,则有如下两个等式: {p(x1, ...