由于国内无法直接从googlesource里下载代码,国内一些大学给大家提供了镜像服务
清华镜像: https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/ 科大镜像: https://lug.ustc.edu.cn/wiki/mirrors/help/aosp/
下载前的准备
下载Android代码,首先需要在Linux平台下进行,比如安装 ubuntu或deepin 下载前先安装repo脚本和git软件。
下载git软件
sudo apt-get install git
下载repo 脚本
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
如果无法从googleapis.com网站下载可以从镜像网站下载,如下:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod a+x ~/bin/repo
下载代码
初始化仓库:
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-12.0.0_r15
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest
同步代码
repo sync -c -j18
repo sync -c -j18 <仓库名称>
收藏:下面是常用的仓库:
hardware/interfaces
hardware/ril
frameworks/base
frameworks/opt/telephony
frameworks/opt/net/ims
packages/apps/Settings
packages/apps/CarrierConfig
packages/apps/SecureElement
packages/services/Telecomm
packages/services/Telephony
packages/services/Mms
packages/providers/TelephonyProvider
system/netd
system/libhidl
system/libhwbinder
system/hwservicemanager
– 完毕 –
|