Android源代码下载

来源:互联网 发布:25岁学编程 编辑:程序博客网 时间:2024/05/26 19:19

  以下操作在VirtualBox中的Fedora-17虚拟机上进行,工作目录为/mnt/disk2/source/android-2.2/

1、  下载python脚本repo

#curl"http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ./repo

#chmod 777 ./repo

成功!

标准的地址不可用:curl http://android.git.kernel.org/repo>./repo

这个网址的repo没试过:

http://code.google.com/p/git-repo/downloads/list

http://code.google.com/p/git-repo/downloads/detail?name=repo-1.19&can=2&q=

 

2、  android-2.2版的别名是froyo。以下获取该软件仓库分支的信息

#repo init -u https://android.googlesource.com/platform/manifest-b froyo

#repo init -u https://android.googlesource.com/platform/manifest-b android-2.2_r1

 

3、  直接repo sync同步会报错

打开./ .repo/manifest.xml文件,找到 fetch属性,修改为:http://android.googlesource.com/

再次运行 ./repo sync ,下载成功。

 

4、   打包压缩为android-2.2.tar.bz2

#tar –jcvf /mnt/share/android-2.2.tar.bz2 –C /mnt/disk2/sourceandroid-2.2 <注意:目录和android-2.2间有空格>

打包压缩后大小为675MB。


5、   下载android内核源码

git clone http://android.googlesource.com/kernel/common.git

cd common

git branch –a    //查看分支

git checkout remotes/origin/android-2.6.39    //检出android-2.6.39内核


0 0
原创粉丝点击