Download Android source code on Windows

Source: Internet
Author: User
Tags git client
I. Preparations

1. Download The msysgit Tool

Git client in WindowsProgram,: Http://code.google.com/p/msysgit/

See:

2. Install the msysgit Tool

See:

3. Create a folder on the disk

To store the android source code downloaded by the GIT tool, see:

4. Open the GIT command line window

Right-click the newly created folder, see:

For the GIT command line window, see:

Ii. Start download

1. Visit the android source code download website

This website is managed like SVN + Apache, visit address: http://android.git.kernel.org/

See:

This step is very important. Before proceeding, familiarize yourself with this website. Especially in the red box, they are the path of the project to which Android belongs. You can click a button to check the link. For more information, see:

You can view its sub-directory. For more information, see:

Why do we need to explain this? I didn't know about this function at first. I found out what I wanted for a long time. So I want to download the source code of other projects in the future. Through this function, we can easily download it.

2. Enter the download command in the GIT command line.

Let's take a look at the download command syntax, see:

Explanation: The project path after "+" in the red box is the sub-path in the column seen in the previous step.

Observe the previous page to know that the source code of the android project is scattered everywhere. Therefore, we need to download the required source code in a targeted manner, which is king. However, after half a day, I found the Android Application Framework source code that I urgently needed, which is located in platform/frameworks/base. Git. The download command is as follows:

JavaCode

Git clone git: // android.git.kernel.org/platform/frameworks/base.git

See:

3. Download complete

1. Git command line window status

See:

Note: Do not forget to run the "exit" command in the command line to exit the window.

2. Content in the downloaded folder

See:

Note: When you associate with Eclipse, you can directly locate the displayed directory of the path, instead of entering the "core" Package (this is just a prompt description ), otherwise, other source code will be invisible, such as the location package. From this, we can draw a conclusion that any source code package downloaded separately in the future can be directly thrown into this directory. In fact, it is not necessary to follow this directory level to create a folder, and then put all the downloaded source code packages into it.

Iv. Summary

The entire download process took about three hours. Because I only downloaded the source code of the application framework in the android architecture system, a total of over 500 mb, about MB after compression. Is it easy?

It is recommended that Android Developers download the package by themselves, because the new version of Android will be released in the future, which may change the API, so the source code will be downloaded again. It is a rainy day.

Okay, now we can associate them with eclipse! What an exciting thing!

Note: This article is transferred from external Source code Download it and learn it more conveniently later.
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.