Search code examples
androidandroid-source

How can I check out Android source code in Windows OS?


I try to search for it but I just cant. I am running Windows 7 on Lenovo G460 laptop. I tried to install Ubuntu on it but I cannot use Wireless to connect to the internet for some reason.

Is there anyway for me to get a look at Android source code or at least just the Calendar part of it?


Solution

  • You can browse the android source code using their repository browser. If you want to check out a specific project (i.e. download the source), you will need to get the version control system Git. When you have Git running, you can either clone a complete repository using git clone https://android.googlesource.com/projectname.git or just get the HEAD (the most current version of all files, useful if you only want to browse through the source) by doing git clone --depth 1 https://android.googlesource.com/projectname.git.

    The project name is the top folder you select on the repository browser, for example platform/packages/apps/Calendar for the Calendar app. Then the full command is git clone https://android.googlesource.com/platform/packages/apps/Calendar.