Thursday, February 27, 2014

Understanding Android Open Source Project

A while ago someone asked on Quora about some good ways to understand the AOSP. Although I don't work with Android internals anymore, it was fun looking back into AOSP and finding some sources (no pun intended). Here's my answer (edited for this blog):

Obviously, first go to AOSP site and follow the instructions to download the source.

Although outdated, take a look at Android Platform Developer's Guide (it's a copy of the old PDK, removed from Android site now). You can also check the source for older tags, such as gingerbread, probably under docs there are instructions on how to build the documentation. But don't blindly follow them. Sometimes I find it easier starting from where things started instead of diving into what's the current state.

I highly recommend setting up ctags, AOSP is just too big for Eclipse and you can't build it anyway using Eclipse (or Android Studio or IntelliJ).  Or try GLOBAL.

Chrome has a nice extension developed by Roman Nurik, it adds an “ad” keyword to the omnibox to search Android documentation and, the interesting point to your situation, adds a “view source” link in documentation pointing to the source of that class (look at screenshots in Android SDK Search extension to get an idea of what I'm talking about). This way you familiarize yourself with Android source code while developing normal apps.

Look at some patches sent to Gerrit Code Review. Also, try to solve some bugs in the Issue Tracker, it's an easier way to focus on one task and not get overwhelmed.

I also recommend this book: Embedded Android and some Marakana/New Training videos:

Some videos of Karim Yaghmour (Embedded Android author):

Also, although not exclusive to AOSP/low level stuff, understanding how IPC is done on Android is fundamental to understand Android:

Last, but not least, take a look at Android Builders Summit videos:
Android Builders Summit 2011 (download list)
Android Builders Summit 2012 (download list)
Android Builders Summit 2013 (youtube playlist)

I'd do a shameless plug and link to my own presentation on this topic, but it's in Portuguese and indeed doesn't make much sense without someone presenting it.

No comments: