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. js面向对象的选项卡

    前言: 选项卡在项目中经常用到,也经常写,今天在github突然看到一个面向对象的写法,值得收藏和学习. 本文内容摘自github上的 helloforrestworld/javascriptLab  ...

  2. 10.8 android输入系统_实战_使用GlobalKey一键启动程序

    11. 实战_使用GlobalKey一键启动程序参考文章:Android 两种注册(动态注册和静态注册).发送广播的区别http://www.jianshu.com/p/ea5e233d9f43 [A ...

  3. 【习题5-5 UVA-10391】Compound Words

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 枚举每一个串的分割点. 看看左右两个串在不在字符串中即可. [代码] #include <bits/stdc++.h> ...

  4. iOS Objc Runtime 教程+实例Demo

    样例Demo 欢迎给我star!我会继续分享的. 概述 Objc Runtime使得C具有了面向对象能力,在程序执行时创建,检查.改动类.对象和它们的方法.Runtime是C和汇编编写的,这里http ...

  5. 安装及XShell软件的配置

    Linux系统centOS7在虚拟机下的安装及XShell软件的配置   前面的话 本文将详细介绍Linux系统centOS7在虚拟机下的安装 准备工作 [系统下载] 在安装centOS7之前,首先在 ...

  6. Emacs常用快捷键

    基本命令 C-x C-f 打开/新建文件 C-x C-s 保存当前缓冲区 C-x C-w 当前缓冲区另存为 C-x C-v 关闭当前Buffer并打开新文件 C-x i 光标处插入文件 C-x b 切 ...

  7. Java随机验证吗

    <span style="font-size:18px;">package com.java.process.jsp; import java.awt.Color; i ...

  8. TensorFlow on Windows: “Couldn't open CUDA library cudnn64_5.dll”

    TensorFlow on Windows: "Couldn't open CUDA library cudnn64_5.dll" 在 windows 下,使用 import te ...

  9. 使用XX-Net永久访问真正的互联网

    XX-Net基于GoAgent(代理软件),使用谷歌App Engine(GAE)代理服务器通过防火墙,是github上的一个开源项目. https://github.com/XX-net/XX-Ne ...

  10. php.ini 修改上传文件的限制

    打开php.ini,首先找到file_uploads = on ;是否允许通过HTTP上传文件的开关.默认为ON即是开upload_tmp_dir ;文件上传至服务器上存储临时文件的地方,如果没指定就 ...