Before we move to the details, let's take a look at the top level of the AOSP source code tree again:
The following table gives a brief description about each folder. We will look at some of them throughout this book:
Directory |
Description |
packages |
Stock Android applications. |
libcore |
Core Java library. Apache Harmony is used before Nougat. OpenJDK is used with Nougat. Some features of Java 8 are used in Nougat. |
frameworks/* |
Android framework core components. |
frameworks/base/services |
Android system services. |
art |
Android runtime. |
dalvik |
Dalvik virtual machine. |
libnativehelper |
Helper functions for use with JNI. |
system/* |
Native services and libraries. |
system/core |
A minimal Linux system to boot Android. |
bionic |
C library. |
external |
External projects imported into the AOSP. It includes both the HAL layer and system services. |
hardware |
HAL and hardware libraries. |
device |
Device-specific files and components. |
bootable |
Recovery and bootloader. |
abi |
Minimal C++ runtime type information support. |
build |
Build system and Makefiles. |
sdk |
Android SDK. |
cts |
Compatibility test suite. |
development |
Development tools. |
ndk |
Android NDK. |
tools |
Various IDE tools. |
prebuilts |
Prebuilt images and binaries. |
For a particular module or component, we may have to dig into multiple levels of subfolders to figure out what is included in it. This is especially true for the frameworks, system, and external folders. The subfolders in frameworks include Android framework layer code, but Android system services also reside in frameworks/base/services and we will look at them later in this session. The same is true for the contents in the system and external folders.