从零开始的的android源码编译之源码下载

                从零开始的的android源码编译之源码下载

如果没有安装虚拟机和ubuntu系统的可以参考我之前的文章

从零开始的的android源码编译之安装waware虚拟机,图文详解

从零开始的的android源码编译之安装ubuntu系统,图文详解

1.首先做一些准备工作

安装curl

sudo apt-get install curl

安装git

sudo apt-get install git

配置你的用户名和邮箱

git config --global user.name 你的名字

git config --global user.email 你的email

2.下载repo

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
## 如果上述 URL 不可访问,一般是被墙拦了,可以用下面的:
## curl -sSL 'https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT' |base64 -d > ~/bin/repo
chmod a+x ~/bin/repo

3.创建目录

mkdir android_5.0

cd android_5.0

4.初始化仓库

同步线上最新代码

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
## 如果提示无法连接到 gerrit.googlesource.com,可以运行gedit ~/bin/repo,把 REPO_URL 一行替换成下面的:
## REPO_URL = 'https://gerrit-googlesource.proxy.ustclug.org/git-repo'

同步指定版本

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-5.0.1_r1

具体版本号可以参考:https://blog.csdn.net/arxi/article/details/52292291

5.同步源码树(以后只需执行这条命令来同步):

repo sync

接下来就是漫长的等待时间啦,如果网速好的话,2个小时搞定,网速不好也没有关系,这个是支持断点续传的,如果下载失败,再次运行repo sync就可以啦

6.关闭ubuntu自动锁屏

由于ubuntu会默认打开无操作锁屏,这样很不方便,可以把自动锁屏关闭

打开桌面右上角的设置按钮

找到 亮度和锁屏

 

最后期待你的评论和建议,咱们下次再见

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值