下载篇之AOSP

1.使用国内镜像下载
There is error when repo init -u https://android.googlesource.com/platform/manifest according to the google website <https://source.android.com/setup/build/downloading>
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable  

使用google无法下载,需要使用https://aosp.tuna.tsinghua.edu.cn/platform/manifest

2. 下载步骤 
2.1步骤
#mkdir ~/bin
#PATH=~/bin:$PATH
#curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
#chmod a+x ~/bin/repo  

#mkdir  android9
#cd android9
#git config --global user.name "jason"
#git config --global user.email "jason@xxxx.com"

#repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r3

#repo sync -j12

2.2问题
(1)repo: 是一个python脚本,可能出现
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)
解决方法:
$ sudo update-ca-certificates --fresh
$ export SSL_CERT_DIR=/etc/ssl/certs


(2)fatal: unable to access 'https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest/': server certificate verification failed. CAfile: none CRLfile: none

解决:
$export GIT_SSL_NO_VERIFY=1

(3)如何查android分支
https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds(要翻墙)

(4)无法checkout
repo sync 表示从服务器下载代码,无法checkout表示还没有下载完.
如果没有下载完,需要手动去下载:
方法: 先删除掉为下载完的目录,在指定该目录下载
step1: rm device/google/bramble-kernel
step2: repo sync device/google/bramble-kernel –force-sync
step3:rm device/google/bramble-kernel/.git/index.lock
step4: repo sync device/google/bramble-kernel –force-sync

(5)​​​​​​​如单独下载单个project

1、打开.repo/manifiest.xml文件(这是隐藏文件夹,可用Ctrl+h显示)

2、找到所要下载的project,使用path或者name字段的值都可以,直接跟在repo sync后作为参数即可。

 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值