BCA / B.Tech 6 min read

Android Architecture in English

Android Architecture in English:


Android Architecture in English


1. Linux Kernel Layer

 Role:
  • This is the lowest level of Android.
  • The entire Android system is based on it.
  • It acts as an interface between hardware and software.
 Main Functions:
  • Driver Support: Drivers that control hardware like the camera, keyboard, display, Bluetooth, Wi-Fi, etc., are located here.
  • Process Management: Supports multitasking.
  • Memory Management: Manages memory efficiently.
  • Power Management: Controls battery usage.
  • Security: Keeps programs separate from each other (sandboxing).
2. Hardware Abstraction Layer (HAL)

 Role:

  • HAL acts as a bridge between the hardware and higher-level Android APIs.
  • It makes hardware features available through APIs.
 Example:

  • Camera HAL for using the camera.
  • Audio HAL for audio-related tasks.
  • Separate HAL Modules exist for sensors, GPS, Bluetooth, etc.
3. Android Runtime (ART) and Native Libraries

3.1 Android Runtime (ART):

  • This is the part of the Android OS that runs the apps.
  • From Android 5.0 (Lollipop), ART (Android Runtime) replaced Dalvik.
 Features:

  • Ahead-of-Time (AOT) Compilation: It compiles code in advance, which improves performance.
  • Garbage Collection: Automatically cleans up unused memory.
3.2 Native Libraries:

  • These are special libraries written in C/C++ that are used to enhance the functionality of apps.
 Key Libraries:

  • WebKit: For browsing-related tasks.
  • SQLite: For data storage (database).
  • Media Framework: For processing video and audio.
  • OpenGL ES: For 2D/3D graphics.
4. Application Framework

 Role:

  • It provides developers with the necessary tools and APIs to create Android applications.
  • It provides an interface between the user and the system.
 Main Components:

  • Activity Manager: Controls the lifecycle of an application.
  • Content Providers: For data sharing between apps.
  • Resource Manager: Manages external resources (images, strings, etc.).
  • Location Manager: Provides facilities related to GPS location.
  • Notification Manager: For displaying notifications.
5. Applications Layer

 Role:

  • This is the highest level of the Architecture.
  • It contains all the applications that the user uses.
 Example:

  • Default Apps: Dialer, SMS, Contacts, Browser, etc.
  • Third-Party Apps: WhatsApp, Instagram, Facebook, etc.