Resource Roundup: Android Source Code

Much has been made of Android being open source. Strategically, this is of huge importance. Tactically, though, your average Android application development may feel somewhat locked out of the source code, simply due to volume. The entire set of Android source code takes up 2.1GB, which means learning anything from it may be as difficult as finding a needle in a haystack.

So, here’s your map to some needles of interest.

First, the source code as a whole is hosted on http://source.android.com/, and any questions you may have about the source code should go on one of the discussion groups related to the source code itself.

While the source is hosted as a roster of git repositories, your easier way to find what you want will be through the Web. There are two approaches for this:

  1. Use Google Code Search, restricting your search to things in the Android package. For example, you can search for references to specific classes, like SQLiteOpenHelper, via package:android SQLiteOpenHelper. This is especially useful when you want to find other classes that reference a particular class of interest (e.g., which Android built-in apps use SQLiteOpenHelper).
  2. Browse the source code via GitWeb.

Here are some of the more useful GitWeb trees for Android SDK developers:

Browsing the trees will get you to the source code for individual classes.

If you are looking simply to reuse some code (under the Apache License 2.0), it is probably simplest to just cut-and-paste. For example, DroidEx was created by examining some of the classes that make up DDMS and hierarchyviewer, to see how they accessed the screenshot service offered by Android devices and emulators.

About author

AndroidGuys
AndroidGuys 4639 posts

Founded on November 5, 2007, we've enjoyed bringing you the latest in Android news and rumors. Updated daily, we strive to deliver reviews, opinions, and updates on all things related to Android.

You might also like

News and Rumors

Ice Cream Sandwich ported to the Nexus One, running quite well [Video]

Ice Cream Sandwich may not yet be available on any device other than the not yet released Galaxy Nexus, but the oldest of the Nexus family has already received an

News and Rumors

Sprint launching Kyocera Rise release date and price leaked

Sprint is one of the four major carriers in the USA and it’s offering a great line of Android smartphones that are capable of running LTE and also they got

News and Rumors

Canadian Dream Owners Get Free Magics, No Joke!

Some Strings Attached… It’s true, Rogers has officially announced that all Canadian HTC Dream owners can upgrade to the HTC Magic free of charge. For background information on this story,

1 Comment

Leave a Reply