推荐当贝市场

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 72702|回复: 1

[源码] Android源码下载

[复制链接]
发表于 2013-8-28 16:30 | 显示全部楼层 |阅读模式
5
1、先安装curl、git工具。
   
2、创建一个放android源码的目录。   
$ mkdir ~/Android_src   
$ mkdir ~/bin   
3、下载repo   
$ cd ~/bin   
$ curl http://android.git.kernel.org/repo > ~/bin/repo   
$ chmod a+x ~/bin/repo   
4、将repo工具所在的路径加入环境变量里PATH(/etc/environment/)中。   
或是在使用repo工具时,手动指定repo路径。   
$ cd ~/Android_src   
$ ~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git   
注:可加 -b 指定所要下的版本,如不加则默认为最新版本。   
5、同步代码   
$~/bin/repo sync   
注:这过程比较慢长,一较要2~3个小时(主要由风速决定)   
   
如感觉上述麻烦,可新建如下脚本,只要运行如下脚本一切ok!!!   
#!/bin/sh   
  2 ########################################   
  # Create ~/Android_src directory   
  # Create ~/bin directory   
  ########################################   
sudo ln -snf /bin/bash /bin/sh   
if [ -z $(which curl ) ] ; then   
    sudo apt-get -y --force-yes --reinstall install curl   
fi   
if [ -z $(which git-core ) ] ; then   
    sudo apt-get -y --force-yes --reinstall install git-core   
fi   
test -d ~/bin || mkdir ~/bin   
   
test -e ~/bin/repo || curl http://android.git.kernel.org/repo > ~/bin/repo   
test -x ~/bin/repo || chmod a+x ~/bin/repo   
   
test -d ~/Android_src || mkdir ~/Android_src   
cd ~/Android_src   
~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git   
~/bin/repo sync   
   

相关帖子

发表于 2018-10-19 07:51 | 显示全部楼层
谢谢分亭
回复 顶一个 踩

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /2 下一条

Archiver|小黑屋|新帖|标签|软件|Sitemap|ZNDS智能电视网 ( 苏ICP备2023012627号 )

GMT+8, 2026-11-7 04:00 , Processed in 0.028045 second(s), 9 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表