Android Architecture

Deepak Kaligotla
7 min readSep 2, 2023

--

Here I will give details about Android Architecture

The Android architecture is divided into five main layers:
1. Linux Kernel,
2. Hardware Abstraction Layer (HAL),
3. Native Libraries,
4. Android Runtime (ART) and,
5. Application Framework.
Finally System and Android apps.

Linux Kernel
1. Power Management & Linux Kernel: The Linux Kernel is the foundation layer of the Android architecture, responsible for managing hardware resources using drivers such as memory, CPU, and input/output. It also provides essential services such as security and process management. Audio, Binder(IPC), Display, Keypad, WiFi, Camera, Bluetooth, SharedMemory, USB.

2. Hardware Abstraction Layer (HAL): The HAL layer provides an interface between the Android framework and the underlying hardware of the device. It is responsible for managing low-level hardware resources such as sensors, cameras, and audio hardware.

3. Android Runtime (ART): The Android Runtime (ART) is responsible for executing and managing Android applications. It includes the Dalvik Virtual Machine, which runs applications in a sandboxed environment and manages the memory allocation. which require intensive processing, memory allocation, and network access. Includes Core libraries of languages in which application is developed.

4. Native C/C++ Libraries:
1. WebKit: Android WebKit is a web browser engine used by the Android operating system to render web pages. It is based on the WebKit engine, an open-source software project that also powers other popular web browsers such as Safari on iOS and macOS, and Google Chrome (prior to version 28) on desktop and Android. The Android WebKit engine is responsible for rendering HTML, CSS, and JavaScript code into a viewable format on the user’s device. It also supports a variety of web standards, including HTML5, CSS3, and JavaScript ES6. In more recent versions of Android, such as Android 5.0 Lollipop and newer, the default web browser engine has been replaced with the Chromium-based WebView. However, the Android WebKit engine is still used in some applications and can also be enabled in certain settings.

2. OpenMax AL: Android OpenMAX AL (Audio and Video) is an API (Application Programming Interface) that provides a standardised interface for accessing multimedia features such as audio and video decoding, encoding, and processing in Android devices. OpenMAX AL is part of the OpenMAX family of APIs, which is managed by the Khronos Group, a consortium of companies that develop open standards for graphics, media, and parallel computing. The API is designed to be hardware-agnostic, meaning that it can be used across different hardware platforms and architectures. With OpenMAX AL, Android app developers can create applications that interact with multimedia hardware and software components on Android devices, such as cameras, microphones, speakers, and video decoders. The API provides a high-level interface that simplifies the process of accessing these components and allows developers to focus on the functionality of their applications. OpenMAX AL is particularly useful for multimedia-intensive applications, such as video players, audio recording and processing applications, and augmented reality applications, among others. It provides a flexible and efficient way to access the multimedia features of Android devices, which can improve the overall performance and user experience of multimedia applications on Android.

3. Libc: In Android, libc is the C standard library that provides a set of functions and macros for performing basic operations in the C programming language. The libc library in Android is based on the GNU C Library (glibc) and provides a wide range of functionality that is essential for many software programs to run properly. The library includes functions for string manipulation, memory allocation and deallocation, input/output operations, math functions, and more. For Android developers, the libc library is an important part of the Android NDK (Native Development Kit) which allows developers to build native applications for Android using programming languages like C and C++. In addition to providing core C functionality, the Android libc library also includes some additional features that are specific to the Android platform, such as support for Android-specific system calls and APIs, as well as support for multithreading and process management. Overall, the libc library plays a critical role in the functioning of Android devices, and it is essential for developers who are building native applications for Android to understand how to use it effectively.

4. Media Framework: The Android Media Framework is a software framework that provides a set of APIs for playing, recording, processing, and streaming audio and video on Android devices. The Media Framework includes a range of multimedia features such as audio and video playback, recording, streaming, and transcoding. It also provides support for a variety of multimedia formats and codecs, including popular formats such as MP3, AAC, H.264, and more. The Android Media Framework is a core part of the Android operating system and is responsible for handling all multimedia-related tasks on Android devices. It provides a high-level API that simplifies the process of accessing multimedia functionality and allows developers to build multimedia applications with ease. The Media Framework also provides support for low-level features such as audio routing and control, which allows developers to create custom audio routing and mixing solutions. Additionally, it supports advanced features such as hardware-accelerated video decoding and encoding, which improves performance and battery life for multimedia applications on Android devices. Overall, the Android Media Framework is a powerful tool for developers who are building multimedia applications for Android, and it plays a crucial role in the functioning of many popular multimedia applications on the platform.

5. OpenGL ES: OpenGL ES (Open Graphics Library for Embedded Systems) is a cross-platform graphics API (Application Programming Interface) used to render 2D and 3D graphics on mobile devices, including Android smartphones and tablets. OpenGL ES is a subset of the desktop OpenGL API and is designed specifically for embedded systems with limited hardware resources, such as mobile devices. It provides a low-level, hardware-accelerated interface for developers to create 2D and 3D graphics with advanced features such as lighting, shading, and texture mapping. In Android, OpenGL ES is a core component of the platform and is used by many graphics-intensive applications, such as games, 3D modeling, and virtual reality applications. It provides high-performance graphics rendering capabilities that enable developers to create visually stunning and immersive applications for Android devices. Android devices support multiple versions of OpenGL ES, with each version offering different features and functionality. Developers can use OpenGL ES APIs through Android’s native development kit (NDK) to build applications that utilise advanced graphics capabilities on Android devices. Overall, OpenGL ES is a powerful and widely used graphics API in Android, which allows developers to create high-quality and visually rich applications that provide an engaging user experience. Application Framework:The Application Framework provides a set of high-level services to Android applications, such as UI, resource management, location services, messaging, and more. It includes pre-built components that can be used by developers to build their applications.

5. Java API Framework:
1. Content Providers: In Android, a Content Provider is a component that allows an application to share data with other applications. It acts as a mediator between an application and the data source, enabling the application to access and modify the data stored in the data source. Content Providers are used to manage the application’s data in a structured way, making it accessible to other applications. Here are some examples of Content Providers in Android: Contacts Provider: The Contacts Provider is used to manage the device’s contact information. It allows applications to access and modify the contacts database, making it easier to share contact information between applications. Applications can retrieve contact information such as name, phone number, email address, and photo.

2. Media Store Provider: The Media Store Provider is used to manage the device’s media files such as images, videos, and audio files. It allows applications to access and modify the media files, making it easier to share media files between applications. Applications can retrieve media file information such as file name, file path, duration, and metadata.

  1. Calendar Provider: The Calendar Provider is used to manage the device’s calendar events. It allows applications to access and modify the calendar database, making it easier to share calendar information between applications. Applications can retrieve event information such as event title, event date, event location, and event description.
  2. Settings Provider: The Settings Provider is used to manage the device’s system settings. It allows applications to access and modify the system settings, making it easier to customize the device’s behaviour. Applications can retrieve and modify system settings such as screen brightness, sound volume, and Wi-Fi settings.

In conclusion, Content Providers in Android are used to manage and share data between applications. They provide a secure and structured way for applications to access and modify data stored in a data source. The above examples are some of the Content Providers available in Android, but there are many others that developers can use to manage different types of data.

2. View System

Managers: Activity, Location, Package, Notification, resource, Telephony, Window

  1. System Apps: Settings, Messages, Mail, Contact, Camera, Phone, gallery, Calculator, Clock, Calendar, Maps, Playstore, Play Services, Android system web view, Downloads, Keyboard, Voice recorder.

Example: The Application Framework provides the UI components such as Buttons, TextViews, and EditTexts that can be used by developers to create their app’s user interface. It also provides the Location API, which enables developers to access the device’s GPS and location services.

Overall, the Android architecture is designed to be modular and flexible, allowing developers to create a wide range of applications that can run on a variety of devices with different hardware specifications. The layers work together seamlessly to provide a rich user experience and a robust platform for developers.

--

--

Deepak Kaligotla

I’m jobless, have 5.5 yrs experience in IT Tech support/helpdesk. Love learning and developing Mobile applications (Android & iOs). Contact me if you can hire