Android Architecture – Android Software Stack | Framework

In Android, the software stack or Android architecture is the combination of Linux Kernel, Native Libraries, Android runtime i.e. Dalvik VM, Application Frameworks and Applications.

Let us understand the android architecture using the figure below.
Android Architecture

Linux kernel

Linux kernel is responsible for Memory management, File management, Scheduling, Security and other OS duties.

This is the kernel on which Android is based. This layer contains all the low-level device drivers for the various hardware components of an Android device.

Native Libraries

Native libraries are written in C/C++  and includes Media, SQLite, OpenGL, Graphics etc. These contain all the code that provides the main features of an Android OS

Some of these libraries are:

android.app

It provides application class, activity.

android.animation

It provides classes for animation.

android.content

It provides binder related classes for example Intent, Binder.

android.database

It provides database functionality (SQLite).

android.graphics

To handle graphics.

Android Runtime

Android runtime includes Dalvik VM. The key figure in Google implementation of the JVM is Dan Bornstein, who wrote the Dalvik VM.

Dalvik is the name of a town in Iceland. Dalvik VM takes the generated java class files and combines them into one or more Dalvik Executable (.dex) files.

The goal of Dalvik VM is to find every possible way to optimize the JVM for space, performance and battery life.

Application frameworks

Application framework provides all manager for development like Activity Manager, Location Manager, and Notification Manager etc.

It exposes the various capabilities of the Android OS to application developers so that they can make use of them in their applications.

ActivityManager

It manages the Application Lifecycle and Activity stack.

LocationManager

All locations are generated by LocationManager. (Latitude, Longitude, Timestamp etc).

NotificationManager

It allows applications to show alerts and notifications to the user.

And at last, at the top Applications layer, any applications that you write are located. Like the calculator, calendar, camera etc.