下面的所有操作都是我在新安装的Ubuntu18.04上的步骤,只要你和我的步骤一致就不会出错。
Android_4.4.2-r2
一、下载
下载直接通过清华大学AOSP镜像下载,网址https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
按照下面几个步骤来
- 下载Repo并添加到PATH中
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
chmod a+x ~/bin/repo
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
- 单独建一个目录放置Android4.4.2r2源代码
mkdir android_4.4.2-r2
cd android_4.4.2-r2
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.4.2_r2
repo sync
- 然后是漫长的等待,选择人少的时候同步,我下载的时候大概3M/s,总大小大概100G左右。不过我下载的整个镜像,总大小大概300G。
如果你会翻墙,那么直接参考Android官方文档下载源代码即可,网址https://source.android.com/setup/downloading
步骤和使用清华大学AOSP镜像类似
- 下载Repo并添加到PATH中
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a&#