updated readme
update introduction added most crucial dir info aosp-source-tree
This commit is contained in:
@ -310,7 +310,7 @@ You can also make or modify and use your it as you wish but its kinda hardcoding
|
|||||||
## ***Deeper Look Into Some Important Directories***
|
## ***Deeper Look Into Some Important Directories***
|
||||||
---
|
---
|
||||||
|
|
||||||
Let’s roll on, Srinivasa — this time zooming into some of the ***most important internal folders*** of the AOSP tree. Since we finished the top-level overview, I’ll now guide you into the internal structures of key folders, one at a time.
|
Let’s roll on, This time zooming into some of the ***most important internal folders*** of the AOSP tree. Since we finished the top-level overview, I’ll now guide you into the internal structures of key folders, one at a time.
|
||||||
|
|
||||||
Let’s begin with:
|
Let’s begin with:
|
||||||
|
|
||||||
@ -337,12 +337,188 @@ Within `frameworks/base/`, you’ll find even more subdivisions:
|
|||||||
You’ll basically live inside `base/` if you're customizing Android behavior at the system level.
|
You’ll basically live inside `base/` if you're customizing Android behavior at the system level.
|
||||||
|
|
||||||
|
|
||||||
|
Next one of the most foundational areas of AOSP.
|
||||||
|
|
||||||
|
|
||||||
|
#### `system/` – Core Android System Components
|
||||||
|
|
||||||
|
This folder is where much of Android’s **native system infrastructure** resides. It influences early boot, power management, process control, and security. Let’s break down its key subdirectories:
|
||||||
|
|
||||||
|
| Subdirectory | Purpose |
|
||||||
|
|----------------------|---------|
|
||||||
|
| `core/` | Hosts `libcutils`, `liblog`, and native tools used system-wide. Also includes `toolbox` utilities (like `ls`, `ps`, etc.). |
|
||||||
|
| `sepolicy/` | SELinux policy source files (`.te`, `.cil`, `.fc`), defining what services can do at runtime. |
|
||||||
|
| `init/` | The `init` program implementation: parses `init.rc`, spawns daemons, mounts filesystems, applies permissions. |
|
||||||
|
| `libvintf/` | Verifies system/vendor interface compatibility (VINTF), part of Treble. |
|
||||||
|
| `libfmq/`, `libhidl/`| Fast message queues and legacy HIDL support libraries. |
|
||||||
|
| `update_engine/` | OTA update mechanism used by Android (especially in A/B partitions). |
|
||||||
|
| `netd/` | Manages Android’s networking stack — DNS, interfaces, tethering, etc. |
|
||||||
|
| `logging/` | Logging subsystem (`logcat`, buffer management, etc.). |
|
||||||
|
| `security/` | Key attestation, keystore, and related cryptography frameworks. |
|
||||||
|
| `tools/` | Misc utilities for packaging and system dev (like `mksysimg`). |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
##### Why `system/` Matters:
|
||||||
|
|
||||||
|
- It's one of the **earliest initialized** parts of Android.
|
||||||
|
- Many of Android’s core daemons (like `vold`, `servicemanager`, `lmkd`, etc.) live or are launched from here.
|
||||||
|
- If you're working with **`init.rc`**, **SELinux**, or **system binaries**, this folder is your best friend.
|
||||||
|
|
||||||
|
|
||||||
|
Next we’ll venture into the next big one: `packages/` — home to settings, UI, and the launcher you see on screen.
|
||||||
|
|
||||||
|
Let’s dive into a folder that paints what you see on screen and holds the apps Android users interact with every day.
|
||||||
|
|
||||||
|
|
||||||
|
#### `packages/` – System Apps & UI Components
|
||||||
|
|
||||||
|
This folder contains the **built-in Android applications**, launchers, and essential UI layers. When you see Settings, SystemUI, or even the default Launcher — this is where the magic begins.
|
||||||
|
|
||||||
|
| Subdirectory | Purpose |
|
||||||
|
|------------------------|---------|
|
||||||
|
| `apps/` | Official system apps like `Contacts`, `Dialer`, `DeskClock`, `Messaging`, etc. |
|
||||||
|
| `Settings/` | The Android Settings app — from toggles to hidden developer options. |
|
||||||
|
| `SystemUI/` | Status bar, notification panel, Quick Settings, lock screen, and more. |
|
||||||
|
| `InputMethods/` | Default input methods like LatinIME (keyboard apps). |
|
||||||
|
| `Screensavers/` | Built-in screen savers (aka “Daydreams” from older Androids). |
|
||||||
|
| `Providers/` | Content providers (e.g., `MediaProvider`, `TelephonyProvider`). |
|
||||||
|
| `WallpaperPicker/` | System wallpaper selector UI. |
|
||||||
|
| `Launcher3/` | Reference launcher used by AOSP — the “home screen” experience. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
##### Why `packages/` Matters:
|
||||||
|
|
||||||
|
- You’ll go here to **customize or replace stock apps**, like tweaking SystemUI for a custom ROM.
|
||||||
|
- It's where **Java + XML combine**: you get layouts, drawables, logic, and resource overlays all working together.
|
||||||
|
- If you're building a **modular or minimalist ROM**, this is the place to trim or enhance.
|
||||||
|
|
||||||
|
Most apps here use a mix of:
|
||||||
|
- Java/Kotlin for app logic
|
||||||
|
- XML for layouts and UI
|
||||||
|
- Gradle or Make/BP for build definitions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Next through `vendor/` — where proprietary code lives, or `external/`, home of all the open-source third-party dependencies. Or if you're curious to enter the Android build pipeline soon, we can start looking at the `build/` and `prebuilts/` folders next.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `vendor/` – Vendor-Specific Code & Proprietary Binaries
|
||||||
|
|
||||||
|
This directory is crucial for any **device-specific AOSP build**. It houses all the **non-open-source blobs, configs, and binaries** provided by SoC vendors (like Qualcomm, MediaTek) and OEMs (like Motorola, Samsung).
|
||||||
|
|
||||||
|
| Subdirectory | Purpose |
|
||||||
|
|------------------------|---------|
|
||||||
|
| `vendor/<oem>/` | Top-level vendor folder, e.g., `vendor/google/`, `vendor/motorola/`. |
|
||||||
|
| `proprietary/` | Closed-source firmware blobs — camera libs, WiFi drivers, etc. |
|
||||||
|
| `prebuilt/` | Precompiled binaries needed during the build. |
|
||||||
|
| `sepolicy/` | Vendor-specific SELinux extensions to complement system policies. |
|
||||||
|
| `init/` | Vendor init RC scripts (like `init.vendor.rc`), executed by Android `init`. |
|
||||||
|
| `lib64/`, `lib/` | Vendor-shipped native shared libraries. |
|
||||||
|
| `bin/` | Daemons or executables (e.g., `thermal_engine`, `imsd`). |
|
||||||
|
| `etc/` | Config files for RIL, audio, graphics, etc. |
|
||||||
|
| `modules/` | Kernel modules (`.ko` files) required at runtime. |
|
||||||
|
|
||||||
|
|
||||||
|
##### Why `vendor/` Is Essential:
|
||||||
|
|
||||||
|
- **Required for real hardware builds**: Without this, AOSP runs only on generic emulators.
|
||||||
|
- **Partition separation** (Treble): It's split from `/system` and mounted as `/vendor`, isolating hardware code.
|
||||||
|
- For ROM devs like you, **extracting vendor blobs** is key for porting AOSP to new devices.
|
||||||
|
|
||||||
|
|
||||||
|
Next we continue with `external/`, which houses all third-party open-source libraries.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `external/` – Third-Party Open Source Libraries
|
||||||
|
|
||||||
|
This directory is Android’s curated collection of open-source projects it depends on. These aren’t developed by Google but are **vital for system functionality**.
|
||||||
|
|
||||||
|
| Subdirectory Examples | Purpose |
|
||||||
|
|-----------------------------|---------|
|
||||||
|
| `openssl/`, `boringssl/` | Cryptographic libraries. |
|
||||||
|
| `libxml2/`, `jsoncpp/` | XML and JSON parsing. |
|
||||||
|
| `clang/`, `llvm-project/` | Android’s compiler and tooling stack. |
|
||||||
|
| `f2fs-tools/`, `e2fsprogs/` | Filesystem utilities. |
|
||||||
|
| `icu/` | Unicode and internationalization support. |
|
||||||
|
| `protobuf/` | Google’s Protocol Buffers serialization. |
|
||||||
|
| `libziparchive/`, `zlib/` | Archiving and compression. |
|
||||||
|
|
||||||
|
These folders are regularly updated to sync with upstream versions, but with **patches to fit Android’s needs** (like BoringSSL replacing OpenSSL).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `build/` (revisited) – Android Build Logic
|
||||||
|
|
||||||
|
While we already mentioned it briefly, let’s look deeper.
|
||||||
|
|
||||||
|
| Subdirectory | Role |
|
||||||
|
|---------------------------|------|
|
||||||
|
| `make/` | Legacy Make-based system. Includes `envsetup.sh`, `lunch`, product configs. |
|
||||||
|
| `soong/` | Modern Go-based build engine (`Android.bp`, `blueprint`) — much faster and more modular. |
|
||||||
|
| `kati/`, `ninja/` | Makefile-to-ninja converters for optimized builds. |
|
||||||
|
| `tools/` | Scripts for packaging OTAs, generating `system.img`, etc. |
|
||||||
|
|
||||||
|
This folder orchestrates **how the entire source tree gets transformed into flashable images**.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `prebuilts/` – Precompiled Tools and Artifacts
|
||||||
|
|
||||||
|
| Subdirectory | Purpose |
|
||||||
|
|------------------------|---------|
|
||||||
|
| `clang/`, `gcc/`, `ndk/` | Prebuilt compilers and toolchains — used instead of building them from source. |
|
||||||
|
| `sdk/`, `gradle-plugin/` | Android SDK and build tools for app developers. |
|
||||||
|
| `misc/`, `tools/` | Helper binaries and scripts (e.g., `aapt`, `adb`, `fastboot`). |
|
||||||
|
|
||||||
|
**Why it matters:** These binaries are version-locked and optimized — saving hours of build time. For example, building LLVM/Clang from scratch would be a nightmare without this.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `toolchain/` – Compiler Source Trees
|
||||||
|
|
||||||
|
| Subdirectory | Purpose |
|
||||||
|
|----------------------------|---------|
|
||||||
|
| `llvm/`, `riscv/`, `arm/` | Source for platform-specific compilers and assembler/linker utilities. |
|
||||||
|
| `binutils/`, `gcc/` | Older toolchain components, still used on some branches. |
|
||||||
|
|
||||||
|
**Why it matters:** If you're modifying native C/C++ build behavior, targeting exotic architectures, or tinkering with LLVM itself, this is the forge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `soong/` – Soong Build System Engine
|
||||||
|
|
||||||
|
- The brains behind the `Android.bp` system — written in Go.
|
||||||
|
- Interprets Blueprint files to produce Ninja build rules.
|
||||||
|
- Works side by side with Makefiles (especially during legacy-to-Soong transitions).
|
||||||
|
|
||||||
|
This is what powers modern AOSP builds — lightning-fast, modular, and dependency-aware.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### `vndk/` & `product/` – Partitioned Modularity
|
||||||
|
|
||||||
|
| Folder | Role |
|
||||||
|
|------------|------|
|
||||||
|
| `vndk/` | Shared native libraries (Vendor Native Development Kit) for Treble compliance. |
|
||||||
|
| `product/` | Extra product-specific apps, overlays, or configs (goes into `/product` partition). |
|
||||||
|
|
||||||
|
These ensure **modularization** between the system (`/system`), vendor (`/vendor`), and product (`/product`) partitions — giving manufacturers flexibility without breaking compatibility.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
And that’s it — **you’ve now mapped the entire AOSP source tree.** Every folder, from the cryptic internals to the user-facing polish, the aosp source is now yours to explore.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Quick Recap: What You Now Know
|
||||||
|
|
||||||
|
- You understand the **entire top-level AOSP directory tree**.
|
||||||
|
- You’ve explored each key folder like `frameworks/`, `system/`, `packages/`, `vendor/`, `external/`, and more.
|
||||||
|
- You know when and why to explore subfolders — based on your goals (custom ROMs, HAL integration, boot mods, etc.).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
### WELCOME
|
# WELCOME
|
||||||
|
|
||||||
If you came to learn about AOSP then you’re in exactly the right place to start from scratch. The Android source code might look intimidating at first, but once we peel back the layers bit by bit, it starts to make a lot more sense. Since you're exploring AOSP from the ground up, In this you can learn about it and how to customize it and build it and use it in your phone in a structured way.
|
If you came to learn about AOSP then you’re in exactly the right place to start from scratch. The Android source code might look intimidating at first, but once we peel back the layers bit by bit, it starts to make a lot more sense. Since you're exploring AOSP from the ground up, In this you can learn about it and how to customize it and build it and use it in your phone in a structured way.
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ It's split into layers, kind of like a cake:
|
|||||||
5. **Framework Layer** – High-level APIs that app developers use.
|
5. **Framework Layer** – High-level APIs that app developers use.
|
||||||
6. **System Apps** – Phone, Contacts, Settings, etc.
|
6. **System Apps** – Phone, Contacts, Settings, etc.
|
||||||
|
|
||||||
|
## Note : This whole guide is made with reference to the latest stable Android 15 release. Not Android 16. Once Android 16 gets stable release , then i will update it quickly.
|
||||||
|
|
||||||
### Tools You'll Eventually Use
|
### Tools You'll Eventually Use
|
||||||
|
|
||||||
|
11
readme.md
11
readme.md
@ -1 +1,10 @@
|
|||||||
This repo is made by me as an cache like thing to make the website text contents im going to make as aosp guide website. it may sound stupid because me stupid lol i agree.
|
MY PLAN:
|
||||||
|
Im learning how the AOSP works and how can i make my own custom rom. As i searched everywhere in internet there is literally no such detailed guides except the source.andoird.com by Google LLC and you may find an most outdated xda forum chats. But that is more technincally hard to understand easily. So im going to share how i learned with myself and explain it as much as i can.
|
||||||
|
|
||||||
|
The most reliable way to make it visible to begginers is to make an interactive website. So this is my first step to make the text content to my guide website.
|
||||||
|
|
||||||
|
REQUEST:
|
||||||
|
If you are an well knowleged about these contribute to this project by kindly pull request and add the things you want to share.
|
||||||
|
|
||||||
|
NOTE:
|
||||||
|
This project is not my main project. I do this as an hobby. An hobby means the things that humans do when they got some free time. So there may be an long breaks between updating and adding new the contents. I try my best to update as soon as possible.
|
Reference in New Issue
Block a user