Microsoft

Android Framework Architecture – The structure

Android, Inc. started with a clear mission by its creators. According to Andy Rubin, one of Android’s founders, Android Inc. was to develop “smarter mobile devices that are more aware of its owner’s location and preferences.” Rubin further stated, “If people are smart, that information starts getting aggregated into consumer products.” The year was 2003 and the location was Palo Alto, California. This was the year Android was born.

Android first came into the limelight when Google the multibillion-dollar technology company acquired it in 2005. At that time nobody knows the future of android and what companies intend with it until  2007 when Google announced the world’s first truly open platform for mobile devices. To know more about Android here.

When we talk about Android architecture, we mean how the Android system has been designed, segmented into layers, and built up to work as a system. Building such a complex system requires careful structuring to ensure all the components work together cohesively.

nordvpn

The architecture ensures that the many components function as a whole without crashing.

The Architecture and Components:


This technology stack consists of various components that allow developers and device manufacturers to work independently. This can be broken into five primary pieces—applications, application frameworks, native libraries, Android runtime, and the Linux kernel.

Applications:

Image Credit: Wikipedia

It’s the uppermost level in the hierarchy and consists of different tools. Android comes with various utility applications that support everyday phone needs, such as messaging, e-mail, Internet browsing, and various third-party applications. These applications are primarily written in the Java programming language.

IN the technical industry Java is a popular language and mostly used by developers and universities worldwide, that’s why Andy Rubin the founder of Android choose java for rapid development.

These applications are distributed through a platform called Andoird Marketplace (Now Google play store). Users are installing the applications either from the store or using external media like SD cards.

Applications Framework:

Image Credit: Wikipedia

The developers of android have the ability to create extensive, interactive, rich graphical applications for users using different tools. Later these applications deploy in the Google Play Store. Developers have full access inside the core applications APIs and Java Libraries.

The Android framework includes the following key services…

  • Activity Manager:  Controls all aspects of the activity stack and application lifecycle.
  • Resource manager: Provides access to non-code embedded resources such as strings, color settings, and user interface layouts.
  • Content Providers: Allows applications to publish and share data with other applications.
  • Notification Manager:  Allows applications to display alerts and notifications to the user.
  • View System: An extensible set of views used to create application user interfaces.

Native Libraries/Android Runtime:

Image Credit: Wikipedia

Here the lane is divided into two The native libraries and the Android runtime. The native libraries are compiled and preinstalled C/C++ binaries that the Android system depends on. These include all of the libraries in the green section of Image. This section consists of other libraries like…

Surface Manager:

The Surface Manager is used for composing what any individual screen will look like. It also does some more profound things that help Android run smoothly, such as off-screen buffering and transitions. It works like Androids Window Manager.

SQLite:

This is a database used to hold on information across sessions of an Android device. On Android, the SQLite database is stored inside of the device’s internal memory so SD cards can be interchanged without losing device-specific information.

Webkit:

It allows the HTML (HyperText Markup Language used for document designing) to be rendered and displayed to Android very quickly and efficiently. This is the default browser engine in the Android system and is available to the system and third-party applications.

Open GL/ES:

WONBO TECHNOLOGY CO LTD

The OpenGL engine processes graphics in Android. OpenGL can render both 2D and 3D objects on Android. This also supports hardware acceleration on devices with dedicated graphic chips.

Android Runtime:

Inside of the Android runtime, there are two primary components: the core Java libraries that Android provides, and the Dalvik virtual machine. The Dalvik virtual machine is Google’s implementation of Java that is optimized to be used on mobile devices. It helps the system running fast and smoothly with minimal interference.

Linux Kernel:

Image Credit: Wikipedia

The last layer is the Linux Kernel which is a computer program that acts as a  bridge between the applications and the hardware. The whole OS is built upon this kernel and it has complete control over everything in the system.

Android was initially based on the Linux 2.6 kernel, with some optimizations for mobile use. Current versions of Android are based on the Linux 4.14 kernel.

The Linux kernel provides full access to the device hardware, As a result, drivers are written in the kernel space to operate as fast and as efficiently as possible. These include things like controlling the internal radios, turning on the stereo and camera, dealing with power and battery charging, and operating the physical keyboard or buttons on the device. The Linux kernel, like Android, is an open-source project and is used widely, particularly on servers in enterprise environments.

The kernel is responsible for memory management, Device drivers management, and process management.

Device drivers:

The kernel contains the device drivers and made possible for the operating system to work with different hardware components.
These drivers provide a standard interface with which hardware components sourced from different manufacturers can work along.

As long as the manufacturers match the Android standard specifications it works fine with any configuration. Some of the driver components are…

1. USB Driver:

ESET Software

Modern devices come with different USB ports, including USB 2.0 and new versions of USB, including USB-C. These drivers make it possible to use the USB port to charge, transfer live data such as logs from the Android devices, and interact with the android file system.

2. WiFi Driver:

WiFi components embedded in mobile devices enable Android devices to connect to wifi networks. Also the driver
enables the wifi components to broadcast wifi networks and create hotspots.

3. Bluetooth Driver:

It provides a way to read and write data received from supported Bluetooth radio frequencies and enables users to configure Bluetooth manually.

4.Display Driver:

Android enables interfaces to work with display components like LCD or LED screens also helps to configure and drawing pixels.

5. Audio Driver:

The audio driver helps to transit the audio input and output. Audio drivers in the kernel enable the Android system to use audio received from these components and also produce audio output.

6. Power manager:

Android OS uses the power manager to make other components on the device power-aware. It does this by broadcasting various power-related states. These states are Standby, Sleep, and Low-Battery. On Android, the power manager is tweaked to default to sleep mode to ensure maximum battery life.

7. Flash Memory:

Flash memory is small, fast, and acts as storage where Linux kernel reads and writes into it. Also, partition the memory in such a way that the OS and other applications can easily and efficiently share the memory resource.

8. Binder:

The Linux kernel enables data sharing functionality by providing binder drivers. Binder drivers enable inter-process communication, IPC. Using IPC processes can discover other processes and share information.

Memory management:

memory management helps different applications run smoothly at a time by allocating different memory spaces for each app.
It also helps ensure that all running apps get adequate memory to function.

Process Management:

Every app in Android runs in a process. The Kernel is also responsible for managing processes. This means it’s responsible for creating, pausing, stopping, shutting, or killing down processes.

The kernel takes care of background running processes, RAM allotment, Distribution, and prioritization of processes, also enforcing security.

Skylum

Conclusion:

  • Android architecture is organized in layers and each layer solves a unique set of problems.
  • End-users interact with apps on the Application layer and  Application developers develop apps to be used on the Application layer.
  • By creating an API over native libraries Android Framework layer simplifies access to low-level components.
  • Android Runtime and Core-Libraries use low-level languages together with optimizations for mobile devices. This ensures code written by application developers runs smoothly despite Android device constraints.
  • The Linux kernel is at the bottom of the stack and interfaces with the hardware components efficiently.
Share this post with your Friends
SOUL

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *