1.1 & 1.2 Android OS Overview, Evolution, and Layered Architecture
Android OS: An open-source, Linux-based software stack created by Google and the Open Handset Alliance (OHA) designed for mobile smartphones, tablets, wearables (WearOS), TV (Android TV), and automotive systems.
The 5 Key Layers in Android Architecture:
- 1. Linux Kernel (Foundation): Provides core system services: hardware abstraction, device drivers (Display, Camera, Bluetooth, Wi-Fi, Audio, Binder IPC), memory management, process management, and security.
- 2. Hardware Abstraction Layer (HAL): Exposes standard C/C++ interfaces to hardware vendors, allowing the higher-level framework to interact with device hardware without knowing device-specific driver implementations.
- 3. Native C/C++ Libraries & Android Runtime (ART):
- Native Libraries: WebKit/Blink (browser engine), SQLite (database engine), OpenGL ES / Vulkan (3D graphics), FreeType (font rendering), Media Framework.
- Android Runtime (ART): Replaced legacy Dalvik Virtual Machine (DVM). Uses Ahead-Of-Time (AOT) compilation and Just-In-Time (JIT) profiling to convert DEX bytecode into native machine instructions at installation/runtime, providing smoother execution and reduced battery consumption.
- 4. Application Framework: Java/Kotlin APIs providing reusable services to apps: Activity Manager, Window Manager, Package Manager, Telephony Manager, Resource Manager, Location Manager, Notification Manager, Content Providers.
- 5. Applications Layer (Top Layer): Native core apps (Phone, SMS, Camera, Contacts, Settings) and third-party user-installed applications.