Android Architecture Overview

Akash
3 min readJul 12, 2020

Android is a Linux Based free and open source operating system led and developed by Google and the Open Handset Alliance.Android O.S is originally developed by Andy Rubin.

Android Architecture

The Android architecture is divided into four parts:

APPLICATION

Mainly for system applications, such as desktop, alarm, settings, calendar, phone, SMS and other system applications.

APPLICATION FRAMEWORK

The Android application framework provides APIs for developers of the application layer, which is actually an application framework. Since the upper level application is built in JAVA, this level provides the following services:

1) Rich and extensible views (Views) that can be used to build applications, including lists, grids, text boxes, buttons, and even embeddable webs. Browser

2)Content Providers allow applications to access data from another application (such as a contact database) or share their own data;

3)Resource Manager provides access to non-code resources such as local strings, graphics, and layout files;

4)Notification Manager allows the application to display custom prompts in the status bar;

5)Activity Manager is used to manage the application lifecycle and provide common navigation fallback capabilities.

Android Runtime

Android includes a core library that provides most of the functionality of the Java programming language core library. Every Android application runs in its own process and has a separate Dalvik virtual machine instance. Dalvik is designed as a device that can run multiple virtual systems efficiently at the same time.

From lollipop onwards, instead of Dalvik they are using ART(Android Run Time).At install time, ART compiles apps using the on-device dex2oat tool. This utility accepts DEX files as input and generates a compiled app executable for the target device.

The virtual machine executes (.dex) the Dalvik executable, which is optimised for small memory usage. At the same time, the virtual machine is register-based. All classes are compiled by the JAVA compiler and then converted to the .dex format by the virtual machine through the “dx” tool in the SDK.

Libraries

Android includes some C/C++ libraries that can be used by different components in the Android system. They serve developers through the Android application framework. Here are some core libraries:

i. System C Library: A standard C system library ( libc ) inherited from BSD that is specifically tailored for embedded linux-based devices.

Ii. Media Library: Based on PacketVideo OpenCORE. The library supports a variety of commonly used audio and video formats for playback and recording, as well as support for still image files. The encoding formats include MPEG4, H.264, MP3, AAC, AMR, JPG, PNG.

Iii. Surface Manager: Manages the display subsystem and provides seamless integration of 2D and 3D layers for multiple applications.

Iv. LibWebCore: A new web browser engine that supports Android browsers and an embeddable web view.

v. SGL: the underlying 2D graphics engine

Vi. 3D libraries: Based on OpenGL ES 1.0 APIs, the library can use hardware 3D acceleration (if available) or use highly optimised 3D soft acceleration.

Vii. FreeType: Bitmap and vector font display.

SQLite: A lightweight, relational database engine that is available for all applications.

Linux Kernel

Android’s core system services rely on Linux kernels such as security, memory management, process management, network protocol stacks and driver models. The Linux kernel also acts as an abstraction layer between the hardware and software stacks.

--

--