23, the Android source code is so get (plot)

Source: Internet
Author: User


Android Learning to a certain extent, you must read more code more thinking, Android source code is very good learning materials, this article is to download the source of Android. We know that the source code for Android is managed by Git, a distributed version Control tool, which is cumbersome to download, and we are here to illustrate the steps in a way that you can certainly learn.

first step, install VMware I'm assuming you're under Windows, and Android source code will be more downloaded under Linux. Then we will install a virtual machine to create a Linux environment. Unfamiliar classmates go to Google "VMware Workstation 7.1 Installation".

Step Two: Install Ubuntu10.04 This step is unfamiliar to the classmate to search for "install Ubuntu10.04 in VMware" need to remind, it is best to install in the graphical interface, the installation process is slow, need to wait a little patience, I was 95% and waited for nearly 20 minutes ^_^. Maybe for some people above two steps is a threshold, but I believe it will not be you.

The third step: Enter Linux, open the terminal Oh, I still have a picture of it, talk about, I know this you will ^_^

Fourth step: Install git and curl in the terminal window, tap the command below

sudo apt-get install Git-core curl

such as the first line, the following all the way to enter, installation completed.

Fifth step: Install the repo script

Curl Http://android.git.kernel.org/repo >~/repo

Sixth step: Give Repo executable permissions map or the top one, take a closer look

chmod a+x ~/repo

Seventh Step: Create a new directory mydroid, then enter the directory map or the top one, take a closer look
mkdir mydroid

CD mydroid

Eighth step: Repo initialization map or the top one, take a closer look

~/repo Init-u Git://android.git.kernel.org/platform/manifest.git

In the meantime need to enter the name and mailbox, random input, test color selection is, finally you will get a similar "repo initialized in/home/nebulayao/mydroid" hint, stating the success of the initialization. The picture is as follows:

Nineth Step: Repo synchronization

~/repo Sync

OK, because there are about 2 more grams of data to download, so wait for the time to go out to eat a meal, play a few game DotA ...

Finally you see this sentence Syncing work tree:100%, done means that the download is complete.

Tenth Step: Acceptance Results: What's the use of downloading the source code? We go into the Mydroid/packages/apps/phone directory to see, oh this is the Android system in the phone call the source code of the program, yes, you did not read wrong! There are treasures everywhere ^_^

Related Article

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.