AOSP Foundations
3 min read

The packages/ Directory

A look at the built-in system applications, background services, and content providers that ship with AOSP.

While frameworks/ provides the underlying APIs and window management, the packages/ directory contains the actual Android applications (.apk files) that a user interacts with out of the box.

Unlike third-party apps downloaded from the Play Store, the apps in this directory are built concurrently with the operating system itself. They frequently possess elevated system permissions and utilize hidden APIs that regular developers cannot legally access.

Core Subdirectories

The packages/ directory is logically divided into several sub-folders based on the type of application.

packages/apps

This is the most visible directory, containing the source code for the standard user-facing applications.

  • Settings: The central settings hub. It is one of the most complex apps in AOSP because it must interface with almost every underlying hardware and software manager (Bluetooth, Wi-Fi, Display, Battery).
  • Launcher3: The default home screen and app drawer.
  • Dialer & Messaging: The default phone and SMS applications.
  • Camera2: A basic reference implementation of a camera application.
# Example: Compiling only the Settings app rapidly
m Settings
adb install -r out/target/product/generic/system/priv-app/Settings/Settings.apk

packages/providers

Content Providers are a core Android component designed to securely share data between different applications via IPC. This directory holds the foundational system providers.

  • MediaProvider: Scans the internal storage and SD card for music, photos, and videos, indexing them into a SQLite database so gallery apps can instantly display them without manually traversing the massive file system.
  • ContactsProvider: Securely stores and manages the user's address book, ensuring only authorized apps can read or modify phone numbers.
  • TelephonyProvider: Manages the local SQLite database of SMS messages and carrier APN configurations.

packages/services

These are applications that run entirely in the background without a graphical user interface.

  • Telephony: The core phone process that communicates directly with the cellular modem hardware (the RIL) to handle voice calls and mobile data connections.
  • Car: Specialized background services utilized by the Android Automotive OS for interacting with vehicle hardware metrics.

packages/inputmethods

Contains the software keyboards (IMEs) that pop up when a user taps a text field. The default AOSP keyboard (LatinIME) is located here.

Modifying System Apps

When developing a custom ROM or a proprietary device, modifying the default applications is extremely common.

  • If you simply want to change the visual theme of the Settings app (e.g., changing colors or icons), you should use the Android Overlay (RRO) system rather than modifying the raw Java code here. Overlays are cleaner and easier to maintain.
  • If you are building a specialized device (like a point-of-sale kiosk), you might entirely delete Launcher3 from the build system and replace it with your own locked-down, proprietary home screen application.