Download Android source code on Windows

Source: Internet
Author: User
Tags git client

I. Preparations

1. Download The msysgit Tool

Git client program in windows,: 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 one to view it.
See 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 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 later.
We can easily download these features.

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. But I only found it after half a day.
The Android Application Framework source code that is urgently needed is in platform/frameworks/base. Git. The download command is as follows:

Java code

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 and do not enter the "core" Package (this is just a description). Otherwise
The 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, this is not the case
Directory hierarchy. You can create a folder and put all the downloaded source code packages in it.

Iv. Summary

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

It is recommended that Android Developers download the package by themselves, because the new version of Android will continue in the future, which may change the API, so they will continue to download the source code again.
Of course.

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

Note: This article from http://www.cnmsdn.com/html/201101/1296289262ID9355.html
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.