(domestic) Perfect download Android source Ubuntu version

Source: Internet
Author: User

The article written today is inexplicable and wonderful, so I'll write another one.

First of all, for the sake of convenience, I have replaced the system with Ubuntu because it is officially recommended to use this Linux distribution (alas, CSDN lost the article to me, no motivation to write anything.) First, a system:

The version of Ubuntu is 15.04 (recommended with this version). Next is the software that we may use.

    • Git: When using the Repo tool, Git,git is not preinstalled in Ubuntu, so you need to install Git in advance and use the command:
sudo


After the installation is complete, you need to configure GIT and set up your git email and username.

git config --global"你的电子邮件地址"git config --global"你的名字"



-Curl: The official point of view is the open source file Transfer tool. Similar to thunder, or wget (this has not been heard?) )。 In fact, this tool can be used wget to replace .... Ubuntu does not install curl by default, so we need to install it ourselves:

sudo apt-get-y

OK, now that the tools are ready, let's get started.

First of all, we need to download repo tools, other domestic tutorials are from the Google website, so a lot of people are stuck here, here we do not have to worry (see note). Before we proceed, we'll open the terminal and look like this:

Execute the following command:

//新建一个bin目录mkdir ~/bin//将bin目录写入环境变量(这样你在任何目录下都可以访问)PATH=~/bin:$PATH//轮到curl工具了,我们使用curl工具下载repo,并将其放置到bin目录curl https://storage-googleapis.lug.ustc.edu.cn/git-repo-downloads/repo > ~/bin/repo//更改repo权限(不要问为啥,跟着做)chmod a+x ~/bin/repo

Did you have a sense of accomplishment after executing the above command? You're stuck here on weekdays? We continue to:

Next, create a new directory to place the Android source code (I first execute the PWD command, everyone look at my current directory), and enter the directory, as follows:

cd android

Do this step, congratulations, close to success.

Next we initialize the warehouse (what is this?) Don't know, don't ask, go on. ):

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest

(The next step is to replace the code from the server, if you only want to download a specific version of Android, you can use the following command:

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b Android版本

The Android version can refer to this URL

But we download all the code and run the command:

 repo sync


If you need to update the code later, you can run the command again.

Finally finished again, do not erase me.

(domestic) Perfect download Android source Ubuntu version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.