Book
  • Introduction
  • Welcome !!
  • Chapter 1: The mobile ecosystem
    • Fragmentation is the devil
    • There is more than one type of mobile app
    • ... more than one type of app
    • ... one type of app
    • Under pressure (ee da de da de) !!
    • Further reading!!
  • Chapter 2: Let's start with design thinking
    • A taste of design thinking
    • The five steps
    • Design for everybody
    • Accessibility in mobile apps
  • Chapter 3: Give me a context and I will give you an app
    • Users
    • Personas? Users ? What is the difference?
    • Please, help me to model the context
    • The context canvas
  • Chapter 4: Powerful models
    • Data architecture is the foundation of analytics
    • From data to information and knowledge
    • Information/Knowledge in our mobile ecosystem
    • Questions to ask yourselves when building and classifying questions
    • The visualization-data map
    • On the scene: describing how personas interact with your app
  • Chapter 5: A GUI is better than two thousand words
    • 'Good to Go:' Let's explore the Design Systems
    • Designing GUI Mocks
    • No prototype... no deal
  • Chapter 6: About mobile operating systems ... and other deamons
    • The Android OS ... son of LINUX
    • iOS son of Darwin? or is it iOS son of UNIX?
    • Kernels
  • Chapter 7: Yes, software architecture matters !!
    • Self-test time
    • About design and design constraints
    • Architects' mojo: styles and patterns
    • What you need is a tactic !!
    • Self-test time 2 (for real)
    • Further reading
  • Chapter 8: Finally... coding
    • MVC, MVVM, MV*, MV...What?
    • Programming models: the Android side
    • Hello Jetpack, my new friend... An Android Jetpack Introduction
    • Programming models: the iOS side
    • Controllers and more controllers
    • Flutter son of... simplicity
    • Programming models: Flutter?
    • Flutter: State matters... Let´s start simple
    • Flutter: State matters... Complex stuff ahead
    • Micro-optimizations
  • Chapter 9: Data pipeline
    • Generalities data pipelines
    • Data storage types
    • Types of data pipelines
  • Chapter 10: Error Retrieving Chapter 10
    • Eventual Connectivity on Mobile Apps
    • How to handle it on Android
  • Chapter 11: The jewel in the crown: Performance
    • As fast as a nail
    • Memory bloats
    • Energy leaks
    • Final thoughts
  • Chapter 12. Become a performance bugs exterminator
    • Weak or strong?
    • Micro-optimizations
    • The single thread game !!
    • Using multi-threading like a boss !!
    • Caching
    • Avoiding memory bloats
    • Further readings
Powered by GitBook
On this page
  1. Chapter 6: About mobile operating systems ... and other deamons

The Android OS ... son of LINUX

PreviousChapter 6: About mobile operating systems ... and other deamonsNextiOS son of Darwin? or is it iOS son of UNIX?

Last updated 1 year ago

(By Mario Linares-Vásquez)


The Android OS is an open source mobile operating system developed by Google and based on the Linux Kernel. It is composed of a set of architectural layers following a software stack model (i.e., there is no communication between layers that are not neighbors in the stack), having the Linux Kernel as the foundation, and an Applications layer as the closest interaction point for the end users. The first version of Android was released in 2008 and as of today 29 versions of the OS have been released.

The kernel is the core of an OS that provides main tasks such as process, device, and resources management. Kernels can follow a microkernel, monolithic, or hybrid architecture. The latter one combines both, microkernel and monolithic architectures. The Linux kernel is a .

In the Android OS, each layer is composed of subsystems/components mostly implemented in Java and C/C++.

The Figure above depicts the Android OS software stack (including predominant implementation languages). Some of those components are developed by third-party contributors of the Android open source project (AOSP), such as original equipment manufacturers (OEM) and Linux contributors; for instance, the Libraries layer (a.k.a., native libraries) contains an Android’s standard C library named Bionic, and the Runtime layer includes an independent Java Library implementation (Apache harmony or an OpenJDK-based implementation for newer OS versions), both developed by third-party contributors.

The Android OS stack is composed of the following layers:

  • Applications: this layer contains software running on the device that uses the Android APIs to implement specific features, like geo-localization. The components in this layer are the mobile “apps” (mostly developed by Google) that are shipped with the Android OS and we use daily such as Browser, Calendar, Telephony, Messaging, and Settings; these apps are mostly written in Java and the Android API, although some apps can include native C/C++ code.

  • Android Framework: provides apps (and developers) with the building blocks and common tasks required for exposing/using device- and Android-specific features such as managing UI elements and sensors. The Android Framework contains the Android APIs used by Android apps, and the Android managers (a.k.a., services) that implement the services and features exposed by the APIs; examples of these services are the View System and the Activity Manager that are in charge of managing the different views and view groups available in the GUI, and of controlling applications life cycle and the activity/task stack, respectively. This layer is mostly implemented in Java.

  • Runtime: contains the Virtual Machine (Dalvik/ART) and the core libraries required for the execution of apps and services on the device. The Runtime layer is required for ensuring apps portability across different devices. Examples of the core libraries in the Runtime layer are the independent implementation of Java used by Android (e.g., Apache Harmony), and the Bouncy castle library for cryptography.

  • Native Libraries: provide low level functionalities and computational intensive services required by the Android Framework and the Runtime, such as the Bionic libc library, the WebKit browser engine, OpenGL, SSL, and the Media Framework. The libraries are written in C/C++.

  • Hardware Abstraction Layer (HAL): it is the bridge between the high level representations of the hardware used in the libraries, and low level representations used by the kernel. It is a set of interfaces for hardware-specific software that needs to be implemented by OEMs and hardware manufacturers. Components in the HAL are written in C/C++.

  • Linux Kernel: it provides the Android OS with core OS systems infrastructure, a security model, networking, and memory and process management, among others. Android uses a modified version of Linux tailored to mobile devices; this tailored version includes changes/enhancements such as the Android Binder, Logger, ashmem, power management, wakelocks, and mechanisms for memory management (e.g., Android Low Memory Killer).

If you wanna learn more about the Android OS architecture check the video (Google IO 2008) and the [Platform Architecture ](https://developer.android.com/guide/platform/index. html)article. Also, more details of the Android-specific contributions added to the Linux kernel are described in the .

Anatomy and Physiology of an Android
Embedded Linux Wiki
monolithic kernel