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

2. Open Git Bash

3. Type below git command







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)




4. Then Open Git bash and put command



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)





6. Write Python download script as below and save it as




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







Anything wrong here, please correct me, thanks.


Leave a Reply

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