How to download AOSP

网友投稿 714 2022-11-11

How to download AOSP

How to download AOSP

In this tutorial, all is done based on Ubuntu 20.04Step1: Environment Preparation

git: It is built-in on Ubuntu by default. We set two global configs for git:(1)​​​git config --global user.email “YOUR EMAIL ADDRESS”​​​ (2)​​git config --global user.name “USER NAME”​​python: I think you should install it by​​sudo apt-get install python​​repo: Download repo tool through the following steps:(1)create a bin folder in Home directory:​​​mkdir ~/bin​​​,which is used to store the repo tool.(2)download repo tool:​​​curl > ~/bin/repo​​​ (3)change file mode bits to make it executable:​​chmod a+x ~/bin/repo​​ (4)set up environment variable:​​echo "PATH=~/bin:$PATH" >> ~/.bashrc​​​​echo "export REPO_URL=>> ~/.bashrc​​,we use source command to update the state of .bashrc:​​~$source ~/.bashrc​​. So repo can be used anywhere and Tsinghua university source will be used in our tutorial later.

Step2: initialize repo First,we create a AOSP directory to store source code:​​​~$mkdir ~/AOSP​​​ If you want to get the latest AOSP code , your should download the initialization repo:​​wget -c nthly/aosp-latest.tar​​ then unzip aosp-latest.tar file in which there is only a ​​.repo​​ folder. You can check all AOSP branches then decide to check out which one, the way is that: (1)Get into ​​.repo​​folder: ​​cd .repo/manifests​​ (2)Check branches:​​.repo/manifests$ git branch -a​​ Otherwise , you can choose a specific branch to check out like this:​​repo init -u git://mirrors.ustc.edu-/aosp/platform/manifest -b android-8.0.0_r2​​Step3: start to sync​​~/AOSP$ repo sync -c -j4 2>&1 > sync.log​​ We direct the stdout and stderr information to a log file called sync.log. From now on, we just wait for it to finish.

If it is finished ,the folder looks like this:

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Springboot线程池并发处理数据优化方式
下一篇:Android进程间通信的方式
相关文章

 发表评论

暂时没有评论,来抢沙发吧~