Android源码下载步骤(Ubuntu)

来源:互联网 发布:mysql不显示重复数据 编辑:程序博客网 时间:2024/06/11 05:17

1、设置软件源

apt-get install  <packagename>     无法使用的解决办法( Ubuntu 出现apt-get: Package has no installation candidate问题

# apt-get update

# apt-get upgrade

# apt-get install <packagename>

添加第三方地址:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

sudo apt-get update

2、安装git-core、curl

3、下载repo

$curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo >repo
$chmod 777 repo

4、申请下载的帐号和密码

https://android.googlesource.com/new-password

5、把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 如果不存在此文件则自己新建一个),一定要放在当前用户的home目录下,root要放到root的home目录下

6、repo init -u https://android.googlesource.com/a/platform/manifest -b android-2.3.3_r1

7、输入以下内容,这是为了解决repo sync 下载到99%的时候无反应的情况。
$sudo sysctl -w net.ipv4.tcp_window_scaling=0

8、repo sync 


原创粉丝点击