Android is an open source operating system aimed for portable devices, but also present in desktop devices. Its kernel is a modified version of Linux kernel.
Android was first released in 2008.
This post is an introduction to the operating system.
Explaining Android
Android is developed by a consortium of developers and companies known as the Open Handset Alliance, where American company Google is probably the most known as it provides the most used distribution of Android.
Android and its logo is trademarked by Google.
The free and open-source (FOSS) core distribution of Android is known as Android Open Source Project (AOSP), colloquially known as Vanilla Android. This versions has minimum functionality, and other distributions are built on top of this version.
AOSP is released under different FOSS licenses. While the kernel is released under a GPLv2-only copyleft license, most of the software developed exclusively for Android is released under an Apache 2.0 permissive license.
Google Android, commonly referred just as Android, is a proprietary distribution by Google, built over AOSP.
When someone uses the term Android most of the times is referring to Google Android specifically. In this post, Google Android is used to refer to Google’s distribution of Android, AOSP to the open-source core distribution and Android as an umbrella term for the operating system.
Android Architecture
Android kernel is a modification of Linux kernel. Nowadays, both projects follow different paths.
Android uses an implementation C standard library called Bionic, that adapted existing BSD libraries that worked for BSD kernel to be used for Linux kernel. Because of this relationship, it is released under a BSD license instead other Android core components that are released in Apache 2.0.
Android avoided using existing C standard libraries for Linux kernel such as GNU C (glibc) or uClibc because of different reasons. Some of them were technical, such as memory usage or performance when taking into account mobile devices. There were also legal reasons, because these libraries were released under an LGPL license. If they were linked as this would require device manufacturers to allow end users to modify the C library (glibc) or dynamically link to other versions.
Apps are developed over a Java framework and are run through a virtual machine. The Java framework was based on the now defunct Java implementation of Apache Harmony, and then replaced on an implementation based on OpenJDK from Android 7.0 “Nougat” since December 2015.
Application Runtime in Android
The official Integrated Development Environment (IDE) for Android development is Android Studio.
Android apps can be developed in either Java or Kotlin. Both of them are interpreted programming languages whose source code is compiled into Java bytecode.
Java bytecode is converted to Dalvik bytecode as .dex files, that are designed to improve performance on mobile devices.
Dalvik bytecode was run on Dalvik virtual machine (DVM) until Android 4.4, and then Android Runtime (ART) in Android 4.4 and later Android versions. They both came comes preinstalled on Android.
The main difference between DVM and ART is that DVM compiled code just-in-time while ART does it ahead-of-time (AOT), saving battery.
Sun Microsystems’ Java Virtual Machine (JVM) was never installed on Android devices, and DVM and later ART were installed instead
The reason ART (and its predecessor Dalvik) was used instead of the JVM is that both Dalvik and ART were specifically optimized for mobile devices with limited resources. Additionally, Sun Microsystems and Google did not come to an agreement on the use of the official Java SE libraries in Android, which led to Android using its own implementation of the Java API, contributing to legal disputes between the companies.
Take note that ART (and Dalvik) read .dex files instead of the .class files read by JVM. In this way, ART requires that .class files with Java bytecode are recomplied into .dex files using a dex compiler.
Android Versions
Android has different versions or releases.
Android versions:
- 4.4 “KitKat”
- 5.0 “Lolipop”
- 6.0 “Marshmallow”
- 7.0 “Nougat”
- 8.0 “Oreo”
- 9.0 “Pie”
- 10
- 11
- 12
- 13
- 14
- 15 (2024)
Version 4.4 “KitKat” included ART together with Dalvik virtual machine.
Version 5.0 “Lolipop” included ART exclusively, and excluded of Dalvik.
Version 7.0 “Nougat” started using a Java implementation based on OpenJDK.
Android Distributions
Android distributions, also known as Android versions, are the different versions of AOSP available to users. I use the term “distribution” in this post because it is more specific and less ambiguous than the term “version”.
As already mentioned, the FOSS core Android distribution is AOSP, all other distributions deriving from it. AOSP lacks the Google proprietary software that Google Android users could be accustomed, like Play Store or Chrome. Instead, it comes by default with some white brand non-Google apps, like a debranded browser.
Google Android is the most popular distribution of Android and includes proprietary software like Google Mobile Services (GMS) (that includes the Play Store and Google Services), Chrome, Google Maps and other Google apps.
There are other distributions that could be either fully FOSS or proprietary.
Android Open-Source Distributions
To find a list of FOSS distributions, please read this post.
Android Proprietary Distributions
Portable devices manufacturers use to create their one distributions of AOSP to customized the operating system and offer exclusive functionalities.
Some proprietary Android distributions are Google Android, One UI by South Korean company Samsung or MIUI by Chinese company Xiaomi.
Hardware compatible with Android
As Android was aimed for mobile devices, it is mostly compatible with processors used on mobile devices. For example, there are Android versions for ARM, ARM64 and x86 processors.
Android Libraries
Android libraries are usually distributed as Android Archive files with .aar extension.
Android Security
You can read about security aspects of Android on this post.