diff --git a/introduction.md b/introduction.md index d778cd7..5493b3a 100644 --- a/introduction.md +++ b/introduction.md @@ -8,6 +8,79 @@ Let’s start by building a foundational Knowledge about AOSP ## BEFORE YOU CONTINUE REMEMBER THIS CONDITION: YOU ARE NOT ALLOWED TO REPRODUCE THIS GUIDE BY FORM TO BUSSINESS. THIS IS FULLY FREE OPENSOURCE. IF YOU WANT TO MAKE AN MORE APPEALING RELIABLE WAY TO TEACH THEN GO AHEAD AND COPY, FORK , DO WHATEVER YOU WANT BUT MAKE IT FREE, OPENSOURCE, EASY TO ACCESS. DONT ACT CLEVER. + + +### What is Android? + +Android is **not** just an operating system — it’s a **software stack** built to run on hardware that might have no keyboard, no mouse, no user with root. It blends: + +- A **Linux kernel** to manage memory, devices, and processes. +- A set of **native libraries** to talk to hardware and do heavy lifting (SQLite, OpenGL, libmedia). +- A **custom C library** (`bionic`) built for speed and small footprint. +- A **Java-based application runtime** that executes apps via the **Android Runtime (ART)**. +- A framework of **system services** that expose hardware and OS features to apps. +- A **security sandbox** using permissions, UIDs, SELinux, and more. + +Android is simultaneously: +- A Linux-based OS, +- A runtime virtual machine system, +- A real-time device controller, +- And a platform for user-facing apps. + + + +### How Is It Layered? (The Real Stack) + +Let’s build it from the bottom up: + +``` +🔌 Hardware (CPU, GPU, WiFi, Audio) + └─ Kernel (Linux + Android patches) + └─ HAL (Hardware Abstraction Layer) + └─ Native Libraries (C/C++ - libcamera, libaudio, etc.) + └─ Android Runtime (ART) + └─ Framework (Java APIs + System Services) + └─ Apps (SystemUI, Settings, 3rd-party apps) +``` + +> Each layer talks *only* to the one below or above it. This is key to Android’s modularity — especially post-Project Treble. + + + +### Who Runs the Show? + +Android runs multiple “worlds” at once: + +| Actor | Role | +|----------------------|-------------------------------------------------| +| `init` | First userspace program — spawns everything. | +| `root` user | Owns early daemons and critical services. | +| `system` user | Runs many Android services (like Zygote). | +| `app_*` UIDs | Every app has its own UID, sandbox, and SE domain. | +| SELinux | Enforces Mandatory Access Control at runtime. | + +This isn’t a simple “everything is root” Linux OS — Android is **deeply compartmentalized**, by design. + +--- + +### Core Pillars That Power Android + +These are internal subsystems you’ll soon master: + +- **Binder IPC**: A high-speed communication bus for everything (init → Zygote, App → Service, etc.) +- **Zygote**: A pre-loaded Java runtime that forks apps to save time/memory. +- **System Server**: Core Java service manager (ActivityManager, WindowManager, etc.) +- **HALs**: Hardware interfaces, now split into modules (`android.hardware.*`) and often vendor-owned. +- **Properties**: System-wide variables like `ro.build.type` or `persist.sys.theme`. +- **Overlay System**: Used to change system UI behavior without modifying APKs (RRO/OMS). +- **Partitions**: `/system`, `/vendor`, `/product`, `/boot`, `/data` — each plays a defined role. + +--- + +This is the framework that *everything else will plug into*. You’ve now met the major players, understood the control model, and seen how Android is not just Linux with extras — it’s a carefully layered OS built for scalability, modularity, and un-rooted users. + + + ### What is AOSP? The **Android Open Source Project (AOSP)** is the official open-source codebase of Android maintained by Google. It includes all the components that power Android devices — from the low-level kernel, up to the system apps and libraries. @@ -19,6 +92,9 @@ It's split into layers, kind of like a cake: 4. **Android Runtime (ART)** – Runs your apps written in Java or Kotlin. 5. **Framework Layer** – High-level APIs that app developers use. 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.