Download Android System Source Code on Windows Platform

1. First of all, you have to install some basic tools like Git, Git client, and Python

 https://git-scm.com/

 https://tortoisegit.org/

https://www.python.org/

2. Open Git Bash

3. Type below git command

 

 

QQ截图20160528124109

 

QQ截图20160528124310

 

Then the Android Config Xml file will be downloaded in your directory. This xml file include all the paths of different versions of android system. (Including all the C, C++, Java and compiling files)

 

QQ截图20160528124504

 

4. Then Open Git bash and put command

 

QQ截图20160528124814

So all the android system versions will be displayed

5. Choose the exact version that you want and download, here I will download android-5.1.1_r37 (All the files will be downloaded, not just Android Framework)

 

 

QQ截图20160528125753

 

6. Write Python download script as below and save it as download-src.py

 

 

Note: 

Line 6: rootdir means wher you want to store the source code
Line 9: git means where your git have installed
Line 11: The path of your default.xml file

 

7. Last step is to download and enjoy, run command as below

 

 

QQ截图20160528161349

 

QQ截图20160528233527

 

Anything wrong here, please correct me, thanks.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

*