Patrick Brady of Google’s partner group gave a very detailed rundown of the technical innards of Android at last weeks Google I/O event.
There's still a lot of un-reported information from the conference in relation to Android.
At its foundation, Android is based on Linux 2.6.4. Patrick said they would stay with that release until there was some reason to move. Google made a number of kernel enhancements for Android including: alarm, ashmem, binder, power management, low memory killer, kernel debugger, and logger. All the kernel enhancements have been contributed back to the community under the GNU Public License (GPL), so if you’re interested in looking at the code you can find the source repository at http://git.android.com .
Google developed a custom library for the C compiler (libc) called Bionic. This was necessary for three main reasons:
Bionic has built-in support for important Android-specific services such as system properties and logging. It doesn’t support certain POSIX features, like C++ exceptions and wide chars, which were not needed on Android. Thus it’s not quite compatible with the gnu libc. All native code must be compiled against bionic, not glibc.
- License: they wanted to keep GPL out of user-space. Bionic code uses the BSD license.
- Size: the library has to be loaded in each process, so it needs to be small. Bionic is about 200K, or half the size of glibc (the GNU version of libc).
- Speed: limited CPU power means it needs to be fast. Bionic has a small size and fast code paths, including a very fast and small custom pthread implementation.