源码是个好东西,有时候就是要看源码才明白。
下载repo
mkdir ~/bin PATH=~/bin:$PATH sudo apt install curl curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
同步
wget https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar # 下载初始化包 tar xf aosp-latest.tar cd AOSP //解压得到的 AOSP 工程目录 //这时 ls 的话什么也看不到,因为只有一个隐藏的 .repo 目录 repo sync //正常同步一遍即可得到完整目录,或 repo sync -l 仅checkout代码
下载
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-8.1.0_r75 其他可以参考:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/