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:
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 Speed100 24081 100 24081 0 0 14071 0 0:00:01 0:00:01 --:--:-- 19264xxxxxx@xxxxxx-PC ~/test$ chmod a+x ~/bin/repoxxxxxx@xxxxxx-PC ~/test$ PATH=~/bin:$PATHor edit ~/.profile file# set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH"fi$ source ~/.profilexxxxxx@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.0Your identity is: xxxxxx <xxxxxx@gmail.com>If you want to change this, please re-run 'repo init' with --config-nameTesting colorized output (for 'repo diff', 'repo status'): black red green yellow blue magenta cyan white bold dim ul reverseEnable color display in this user account (y/N)? yrepo has been initialized in /home/xxxxxx/testxxxxxx@xxxxxx-PC ~/test$ ls -altotal 8drwxr-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 .repoxxxxxx@xxxxxx-PC ~/test$ repo sync
更多相关文章
- Android(安卓)NDK学习 简介
- 如何打造一个 Android(安卓)编译时注解框架
- 个人练习:ListView绑定数据和显示的几种方式
- 【Android(安卓)应用开发】 Android(安卓)APK 反编译 混淆 反编
- Android发送短信
- 利用Handler来更新android的UI
- Android(安卓)近百个项目的源代码,覆盖Android开发的每个领域
- Android第一行代码(2版)——阅读笔记
- Ubuntu14.04下最新Android(安卓)NDK安装