国内android源码下载方法
生活随笔
收集整理的這篇文章主要介紹了
国内android源码下载方法
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
安裝配置Git
sudo apt-get install git git config --global user.email "xxxxxxx@gmail.com" git config --global user.name "xxxxx"安裝python
sudo apt-get install python配置環(huán)境變量PATH
把用戶home目錄下bin目錄添加到環(huán)境目錄中
mkdir ~/bin echo "PATH=~/bin:\$PATH" >> ~/.bashrc source ~/.bashrc安裝curl
sudo apt-get install curl安裝repo
使用清華的repo
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo chmod +x repo設(shè)置repo 更新源
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'初始化某android版本git倉(cāng)庫(kù)
mkdir ~/android/android6.0 cd ~/android/android6.0 repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-6.0.1_r16下載源碼
repo sync只下載部分源碼
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-6.0.1_r16完成后
可以先修改工程目錄下 .repo/manifests/default.xml
只保留需要想要的的path,刪除不需要的
然后在repo sync
下載kerenl源
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/common.gitgit branch -agit checkout 版本總結(jié)
以上是生活随笔為你收集整理的国内android源码下载方法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: win7下安装sqlServer2000
- 下一篇: 我写的万年历插件(含天干地支,农历,阳历