android系统源码下载

来源:互联网 发布:广州美工培训学校 编辑:程序博客网 时间:2024/05/23 16:38
参考://https://source.android.com/source/downloading#installing-repo


//设置环境变量

mkdir ~/bin
PATH=~/bin:$PATH


//下载repo文件

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo


//源码目录

mkdir AndroidOSCode  
cd AndroidOSCode


//如果没有安装Git
sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "you@example.com"


//下载最新版的

repo init -u https://android.googlesource.com/platform/manifest

//下载对应版本

或repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1


//同步源码

repo sync