码迷,mamicode.com
首页 > 移动开发 > 详细

android源代码下载备注

时间:2017-04-27 12:34:06      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:led   repo sync   官方   apt   $?   googl   etc   html   down   

android源代码下载的參考网上比較多,就不贴上来了,主要是备注下下载源代码过程中须要注意的地方。

1. google官方下载步骤地址:

http://source.android.com/source/downloading.html

里面的步骤比較具体

注:先须要安装git-core和curl

$: sudo apt-get install git-core curl


2. 因为国内的原因(你懂的)。须要在/etc/hosts文件中面加入

74.125.31.82 www.googlesource.com
74.125.31.82 android.googlesource.com
203.208.46.172 cache.pack.google.com
59.24.3.173 cache.pack.google.com


3. 在下载源代码的目录里创建reposync.sh,内容:

#! /bin/bash
echo "=====start repo sync======"
repo sync
while [ $? = 1 ]; do
echo “======sync failed, re-sync again======”
sleep 3
repo sync
done

运行

$: ./reposync.sh

??

android源代码下载备注

标签:led   repo sync   官方   apt   $?   googl   etc   html   down   

原文地址:http://www.cnblogs.com/zhchoutai/p/6773546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!