Almost everyone familiar with the Android. Of course, who doesn’t? If you are even a very little techy guy then you must know about it. Android is the most popular operating system (OS) owned by the tech giant Google. The greatest thing about it that it’s an open source OS. This thing differentiates it. In this article, we will understand the Android OS architecture. So without any further ado, let’s get started.
What is Android OS?
Android is a mobile operating system (OS) based on a modified version of the Linux kernel and other open source software and designed primarily for touchscreen mobile devices such as smartphones and tablets. In addition, Google has further developed Android TV for televisions, Android Auto for cars, and Wear OS for wrist watches, each with a specialized user interface. Variants of Android are also used on game consoles, digital cameras, PCs and other electronics.
Android was unveiled in 2007, with the first commercial Android device launched in September 2008. The OS has since gone through multiple major releases, with the current version being 9.0 “Pie”, released in August 2018. The core Android source code is known as Android Open Source Project (AOSP) and is primarily licensed under the Apache License.
The architecture of Android OS
The Android OS integrated with different types of layers. Let’s discuss and understand these layers and terminology separately.
1: The Linux Kernel
The foundation of the Android platform is the Linux kernel. For example, the Android Runtime (ART) relies on the Linux kernel for underlying functionalities such as threading and low-level memory management.
Using a Linux kernel allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
2: Hardware Abstraction Layer (HAL)
The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware components, such as the camera or Bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
3: Android Runtime (ART)
For devices running Android version 5.0 (API level 21) or higher, each app runs in its own process and with its own instance of the Android Runtime (ART). ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format designed especially for Android that’s optimized for minimal memory footprint. Build toolchains, such as Jack, compile Java sources into DEX bytecode, which can run on the Android platform.
Android also includes a set of core runtime libraries that provide most of the functionality of the Java programming language, including some Java 8 language features, that the Java API framework uses.
4: Native C/C++ Libraries
Many core Android system components and services, such as ART and HAL, are built from native code that requires native libraries written in C and C++. The Android platform provides Java framework APIs to expose the functionality of some of these native libraries to apps.
For example, you can access OpenGL ES through the Android framework’s Java OpenGL API to add support for drawing and manipulating 2D and 3D graphics in your app.
If you are developing an app that requires C or C++ code, you can use the Android NDK to access some of these native platform libraries directly from your native code.
5: Java API Framework
The entire feature-set of the Android OS is available to you through APIs are written in the Java language. These APIs form the building blocks you need to create Android apps by simplifying the reuse of core, modular system components, and services, which include the following:
- A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an embeddable web browser.
- A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files.
- A Notification Manager that enables all apps to display custom alerts in the status bar.
- An Activity Manager that manages the lifecycle of apps and provides a common navigation back stack.
- Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their own data.
- Developers have full access to the same framework APIs that Android system apps use.
6: System Apps
Android comes with a set of core apps for email, SMS messaging, calendars, internet browsing, contacts, and more. Apps included with the platform have no special status among the apps the user chooses to install. So a third-party app can become the user’s default web browser, SMS messenger, or even the default keyboard (some exceptions apply, such as the system’s Settings app).
The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don’t need to build that functionality yourself – you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify.
So that’s it for today guys. Did you enjoy reading this article? If so, then please share it. If you have any suggestions and queries related to the post, let me know in the comment section below. Please do like and share this post to your circle to explore the knowledge you must know.