Download Android source code in Windows

Source: Internet
Author: User


The source code of Android is managed in multiple parts. For example, you want to view the source code of bootloader.

You can use git to execute git clone git: // to clone the source code of bootloader. However, there are too many Android modules. If you want to clone the source code of the entire android project, it would be too difficult to do this one by one, So Google made a Python script to download the source code of the entire project, but this script requires the Linux environment, if you want to use it in Windows, you must build a simulated Linux environment in windows. You can search for the simulated environment on the Internet, here we use cygwin to build it. This is very simple.

1. Install cygwin

Download cygwin and go to the next step (Note: if you install cygwin for the first time, select install from Internet

Then, select the installation location, the location of the temporary file, and the settings for connecting to the network. the key step is to select the library and program to be installed. The following are the installation:

Net-> curl

Devel-> git, Git-completion, Git-Gui, gitk

Libs-> libreadline6, libiconv2

Editors-> Vim

Python-> Python

If not, you can search on the search.

2. Download Repo

Start cygwin, then CD/bin, switch to the bin directory and run the curl>./repo to download repo to the bin directory.

Chmod A + x repo grants it executable permissions.

3. Use repo to download Android source code

Switch to user directory

Cd ~

Create a directory for storing source code (the directory name is random)

Mkdir androidsource

CD androidsource

Set Repo

Repo init-u git: // (this process will allow you to enter a nickname and a Gmail mailbox)

Capture Android source code

Repo sync (this time may be longer, which depends on your network speed ).

After the download is complete, you can see the source code in the androidsource directory.

Reference: P = 204

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: 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.