I was able to obtain the Android source code.
Here's a screenshot in Eclipse of what prompted me to go searching for the Android source code.
Obtaining the source was MUCH more of a challenge than I expected, and took me several hours yesterday evening (plus an overnight download). Somehow I just imagined that the source would be available by Android API version as a ZIP or JAR file. Nope ...
In order to get it installed on Windows (which is officially not supported per the Android Open Source Project documentation), here's what I had to do:
Here's a screenshot in Eclipse of what prompted me to go searching for the Android source code.
(really ugly when you try control-clicking on an Android API class only to get this)
Obtaining the source was MUCH more of a challenge than I expected, and took me several hours yesterday evening (plus an overnight download). Somehow I just imagined that the source would be available by Android API version as a ZIP or JAR file. Nope ...
In order to get it installed on Windows (which is officially not supported per the Android Open Source Project documentation), here's what I had to do:
- Install Cygwin. I installed Cygwin 1.7.9-1, the latest, obtained from cygwin.com.
- The setup.exe is a Web Installer. I specified C:\cygwin as my Root Directory, installed for All Users. When running setup.exe, administrator privileges are required.
- In the Cygwin Setup - Select Packages dialog, I found packages for curl, git, and python. These 3 will be necessary for obtaining the Android Source. This installation was a bit tricky, so I want to document this well here:
Cygwin - curl installation
Cygwin - git installation
Cygwin - Python installation
- From here, complete installation of Cygwin.
- Once Cygwin has been installed, create a local directory to hold the Android Source. In my case, I used C:\android\android-source.
- Open a Cygwin terminal session and type:
cd /cygdrive/c/android/android-source
(of course, using whatever path for your local directory). - Now, type:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/repo
This will pull down the repo Python script used by the Android SDK Team and place it in your local directory for Android Source. - Next, type:
repo init -u https://android.googlesource.com/platform/manifest
This will create a .repo file and initialize the directory to hold the Android Source. - Finally, type:
repo sync
This will do the actual downloading of the Android Source. It takes a long time, and pulled down 8.72 GB into my local working directory.