浅谈Android12系统源码下载


之前有写过相关的文章,但是呢发现有点不好使了,还是将最新的方式写一下。
虚拟机软件:VMware® Workstation 16 Pro
桌面版本:ubuntu-20.04.3-desktop-amd64.iso(我选择了原先的16版本时坑有点多,最后选择了最新版本)

a.安装vm-tools

方便Windows 和Linux之间拷贝数据
sudo apt-get install open-vm-tools-desktop

b.解决问题

遇到问题:server certificate verification failed. CAfile
通过下面命令可以解决:
git config --global http.sslverify false
git config --global https.sslverify false

c.准备环境阶段

sudo ln -s /usr/bin/python3 /usr/bin/python
apt install curl
apt install repo
apt install vim
apt install git

d.下载源码阶段

我抄我自己,哈哈~

1.创建bin
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

2.修改 两个文件
vim ~/.bashrc
增加
export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/’
vim ~/bin/repo
替换
REPO_URL = ‘https://gerrit-google.tuna.tsinghua.edu.cn/git-repo’

3.配置用户名
git config --global user.email “[email protected]
git config --global user.name “allengao”

4.拉取并初始化
mkdir soucre
cd source
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest

5.同步数据
repo sync

由于第四步是默认拉的master分支,那就会自动拉的最新12版本哈,不用特别指定12版本

e.搞定

在这里插入图片描述
确认一下版本:
在这里插入图片描述
差不多就这些了~

猜你喜欢

转载自blog.csdn.net/angelsmiling/article/details/121447425