一.Android版本与Linux内核的关系

英文名

中文名

版本号

API level

发布时间

内核版本

1.1 2008.9
Cucake 纸杯蛋糕 1.5 3 , NDK 1 2009.4 2.6.27
Dount 甜甜圈 1.6 4 , NDK 2 2009.9 2.6.29
Eclair 松饼 2.0 5 2009.10 2.6.29
Eclair 松饼 2.0.1 6
Eclair 松饼 2.1 7 , NDK 3 2.6.29
Froyo 冻酸奶 2.2.x 8,NDK 4 2010.5 2.6.32
Gingerbread 姜饼 2.3 - 2.3.2 9 , NDK 5 2010.12 2.6.35
Gingerbread 姜饼 2.3.3 - 2.3.7 10
Honeycomb 蜂巢 3.0 11 2011.2
Honeycomb 蜂巢 3.1 12 , NDK 6 2011.5
Honeycomb 蜂巢 3.2.x 13 2011.7
Ice Cream Sandwich 冰激凌三明治 4.0.1 - 4.0.2 14 , NDK 7 2011.10
Ice Cream Sandwich 冰激凌三明治 4.0.3 - 4.0.4 15 , NDK 8
Jelly Bean 果冻豆 4.1.x 16 2012.6
Jelly Bean 果冻豆 4.2.x 17 2012.10
Jelly Bean 果冻豆 4.3.x 18
KitKat 奇巧巧克力 4.4 - 4.4.4 19 2013.9

以下是每个版本的详细分支,比如安卓4.4-kitkat,内部还有分支,分为4.4.1,4.4.2等等,下载的时候最好下载一个分支就好了,不然容量太大。

Build Branch Version Supported devices
KTU84Q android-4.4.4_r2 KitKat Nexus 5 (hammerhead) (For 2Degrees/NZ, Telstra/AUS and India ONLY)
KTU84P android-4.4.4_r1 KitKat Nexus 5, Nexus 7 (flo/grouper/tilapia), Nexus 4, Nexus 10
KTU84M android-4.4.3_r1.1 KitKat Nexus 5 (hammerhead)
KTU84L android-4.4.3_r1 KitKat Nexus 7 (flo/deb/grouper/tilapia), Nexus 4, Nexus 10
KVT49L android-4.4.2_r2 KitKat Nexus 7 (deb Verizon)
KOT49H android-4.4.2_r1 KitKat Nexus 5, Nexus 7 (flo/deb/grouper/tilapia), Nexus 4, Nexus 10
KOT49E android-4.4.1_r1 KitKat Nexus 5, Nexus 7 (flo/deb/grouper/tilapia), Nexus 4, Nexus 10
KRT16S android-4.4_r1.2 KitKat Nexus 7 (flo/deb/grouper/tilapia), Nexus 4, Nexus 10
KRT16M android-4.4_r1 KitKat Nexus 5 (hammerhead)
JLS36I android-4.3.1_r1 Jelly Bean Nexus 7 (deb)
JLS36C android-4.3_r3 Jelly Bean Nexus 7 (deb)
JSS15R android-4.3_r2.3 Jelly Bean Nexus 7 (flo)
JSS15Q android-4.3_r2.2 Jelly Bean Nexus 7 (flo)
JSS15J android-4.3_r2.1 Jelly Bean Nexus 7 (flo/deb)
JSR78D android-4.3_r2 Jelly Bean Nexus 7 (deb)
JWR66Y android-4.3_r1.1 Jelly Bean Galaxy Nexus, Nexus 7 (grouper/tilapia), Nexus 4, Nexus 10
JWR66V android-4.3_r1 Jelly Bean Galaxy Nexus, Nexus 7 (grouper/tilapia), Nexus 4, Nexus 10
JWR66N android-4.3_r0.9.1 Jelly Bean Galaxy Nexus, Nexus 7 (grouper/tilapia/flo), Nexus 4, Nexus 10
JWR66L android-4.3_r0.9 Jelly Bean Nexus 7
JDQ39E android-4.2.2_r1.2 Jelly Bean Nexus 4
JDQ39B android-4.2.2_r1.1 Jelly Bean Nexus 7
JDQ39 android-4.2.2_r1 Jelly Bean Galaxy Nexus, Nexus 7, Nexus 4, Nexus 10
JOP40G android-4.2.1_r1.2 Jelly Bean Nexus 4
JOP40F android-4.2.1_r1.1 Jelly Bean Nexus 10
JOP40D android-4.2.1_r1 Jelly Bean Galaxy Nexus, Nexus 7, Nexus 4, Nexus 10
JOP40C android-4.2_r1 Jelly Bean Galaxy Nexus, Nexus 7, Nexus 4, Nexus 10
JZO54M android-4.1.2_r2.1 Jelly Bean
JZO54L android-4.1.2_r2 Jelly Bean
JZO54K android-4.1.2_r1 Jelly Bean Nexus S, Galaxy Nexus, Nexus 7
JRO03S android-4.1.1_r6.1 Jelly Bean Nexus 7
JRO03R android-4.1.1_r6 Jelly Bean Nexus S 4G
JRO03O android-4.1.1_r5 Jelly Bean Galaxy Nexus
JRO03L android-4.1.1_r4 Jelly Bean Nexus S
JRO03H android-4.1.1_r3 Jelly Bean
JRO03E android-4.1.1_r2 Jelly Bean Nexus S
JRO03D android-4.1.1_r1.1 Jelly Bean Nexus 7
JRO03C android-4.1.1_r1 Jelly Bean Galaxy Nexus
IMM76L android-4.0.4_r2.1 Ice Cream Sandwich
IMM76K android-4.0.4_r2 Ice Cream Sandwich Galaxy Nexus
IMM76I android-4.0.4_r1.2 Ice Cream Sandwich Galaxy Nexus
IMM76D android-4.0.4_r1.1 Ice Cream Sandwich Nexus S, Nexus S 4G, Galaxy Nexus
IMM76 android-4.0.4_r1 Ice Cream Sandwich
IML77 android-4.0.3_r1.1 Ice Cream Sandwich
IML74K android-4.0.3_r1 Ice Cream Sandwich Nexus S
ICL53F android-4.0.2_r1 Ice Cream Sandwich Galaxy Nexus
ITL41F android-4.0.1_r1.2 Ice Cream Sandwich Galaxy Nexus
ITL41D android-4.0.1_r1.1 Ice Cream Sandwich Galaxy Nexus
ITL41D android-4.0.1_r1 Ice Cream Sandwich Galaxy Nexus
GWK74 android-2.3.7_r1 Gingerbread Nexus S 4G
GRK39F android-2.3.6_r1 Gingerbread Nexus One, Nexus S
GRK39C android-2.3.6_r0.9 Gingerbread Nexus S
GRJ90 android-2.3.5_r1 Gingerbread Nexus S 4G
GRJ22 android-2.3.4_r1 Gingerbread Nexus One, Nexus S, Nexus S 4G
GRJ06D android-2.3.4_r0.9 Gingerbread Nexus S 4G
GRI54 android-2.3.3_r1.1 Gingerbread Nexus S
GRI40 android-2.3.3_r1 Gingerbread Nexus One, Nexus S
GRH78C android-2.3.2_r1 Gingerbread Nexus S
GRH78 android-2.3.1_r1 Gingerbread Nexus S
GRH55 android-2.3_r1 Gingerbread earliest Gingerbread version, Nexus S
FRK76C android-2.2.3_r2 Froyo
FRK76 android-2.2.3_r1 Froyo
FRG83G android-2.2.2_r1 Froyo Nexus One
FRG83D android-2.2.1_r2 Froyo Nexus One
FRG83 android-2.2.1_r1 Froyo Nexus One
FRG22D android-2.2_r1.3 Froyo
FRG01B android-2.2_r1.2 Froyo
FRF91 android-2.2_r1.1 Froyo Nexus One
FRF85B android-2.2_r1 Froyo Nexus One
EPF21B android-2.1_r2.1p2 Eclair
ESE81 android-2.1_r2.1s Eclair
EPE54B android-2.1_r2.1p Eclair Nexus One
ERE27 android-2.1_r2 Eclair Nexus One
ERD79 android-2.1_r1 Eclair Nexus One
ESD56 android-2.0.1_r1 Eclair
ESD20 android-2.0_r1 Eclair
DMD64 android-1.6_r1.5 Donut
DRD20 android-1.6_r1.4
DRD08 android-1.6_r1.3
DRC92 android-1.6_r1.2

二.下载源码分为2大部分

1.Android源码;

2.Android内核(Android Linux Kernel);

三.如何下载Android内核

git clone git://android.git.kernel.org/kernel/common.git

四.如何查看Android内核的版本(代码级查看)

在内核代码目录:

运行命令:git branch –a

运行实例

[root@localhost common]# git branch -a (查看版本)

* android-2.6.36

remotes/origin/HEAD -> origin/android-2.6.36

remotes/origin/android-2.6.35

remotes/origin/android-2.6.36

remotes/origin/archive/android-2.6.25

remotes/origin/archive/android-2.6.27

remotes/origin/archive/android-2.6.29

remotes/origin/archive/android-2.6.32

remotes/origin/archive/android-gldfish-2.6.29

remotes/origin/archive/android-goldfish-2.6.27

五.如何获得指定版本的Linux内核

要想下载2.6.29内核,只要最后执行一下(进入下载后的目录):

git checkout remotes/origin/archive/android-2.6.29 (即上面列出的版本分支)

此时下载到的是2.6.29版本内核了

六.如何获得Android某个版本的源码

例如获得Android1.5的源码

repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake

repo sync

Android 1.5:Cupcake(杯子蛋糕)

Android 1.6:Donut(甜甜圈)

Android 2.0 / 2.1:Eclair(闪电泡芙)

Android 2.2:Froyo(冷冻忧格)

Android 3.0:Gingerbread(姜饼)

Android 3.5:Honeycomb(蜂巢)

Android 4.0:Ice Cream(冰淇淋)

本质上:

想取某个branch而不是主线上的代码,我们需要用-b参数制定branch名字

七.如何获取Android当前主干上最新版本的所有的sourcecode

repoinit-ugit://android.git.kernel.org/platform/manifest.git

八.如何获取需要某一个project的代码

比如kernel/common,就不需要repo了,直接用Git即可

gitclonegit://android.git.kernel.org/kernel/common.git

九.列出本地所有分支

git branch

十.如何获取某个branch的代码

如果需要某个branch的代码,用git checkout即可。

比如我们刚刚获取了kernel/common的代码,那就先进入到common目录,然后用下面的命令:

gitcheckoutorigin/android-goldfish-2.6.27-bgoldfish

这样我们就在本地建立了一个名为goldfish的android-goldfish-2.6.27分支,代码则已经与android-goldgish-2.6.27同步。

更多相关文章

  1. Android(安卓)闹钟管理类的使用
  2. Android学习篇之Menu的使用
  3. opengrok setup on ubuntu for android source code browser
  4. android图表ichartjs
  5. Android(安卓)闹钟管理类的使用
  6. Android(安卓)Activity的启动
  7. 编译android的linux内核
  8. android用户界面-组件Widget-画廊视图Gallery
  9. APP开发实战94-Vector静态图的使用

随机推荐

  1. MySQL 外键约束和表关系相关总结
  2. MySQL 使用索引扫描进行排序
  3. [置顶] Android上传文件到Web服务器,PHP接
  4. Android关机流程解析
  5. Android(安卓)技巧 - listview 里面的图
  6. Android(安卓)中加入SD card 应用
  7. Android(安卓)去掉标题栏,状态栏,导航栏
  8. android 布局
  9. Android(安卓)2012年9月19日_001
  10. Android(安卓)中数据库查询方法 query()