If you’re reading this article, you probably are wondering why Android OS takes so much space? You might noticed that storage on your Android has shrunk after being used for a couple of years. It’s obvious that there are major changes when you compare how much storage Android OS requires at that time when you’ve taken it out of the box.
Before we dive into a detailed explanation of what determines Android OS storage on the smartphone, first let’s take a look at some statistics. It’ll help you to understand how storage requirements changed since the Android 1.0 release.
Android 1.0 was the first commercial version of the Android operating system, released in September 2008. The size of the Android 1.0 OS varied depending on the device it was installed on and the specific features and configurations included by the manufacturer. However, the basic Android 1.0 source code was approximately 85 megabytes in size.
Right after the first release, Android has been designed to use as little resources as possible. It was originally squeezed into the HTC Dream (also known as the T-Mobile G1), which only had 256MB of internal storage for Android and all its default apps.
Since then, Android strives to be a lightweight operating system for smartphones so it can run on a variety of devices.
Android OS basic architecture
The Android OS generally consists of a Linux kernel and a collection of C/C++ libraries that are exposed through an application framework that provides services, and management of the applications at their run time. Android was created on the open-source kernel of Linux. One main reason for choosing this kernel was that it provided proven core features on which to develop the Android operating system.
1. Security – The Linux kernel handles the security between the application and the system.
2. Memory Management – It efficiently handles memory management thereby providing the freedom to develop our apps.
3. Process Management – It manages the process well and allocates resources to processes whenever they need them.
4. Network Stack – It effectively handles network communication.
5. Driver Model – It ensures that the application works. Hardware manufacturers can build their drivers into the Linux build.
Running on top of the kernel, the Android framework was developed with various features. It consists of various C/C++ core libraries with numerous open-source tools. Some of these are:
1. The Android Runtime – The Android runtime consists of core libraries of Java and ART (the Android RunTime). Older versions of Android (4.x and earlier) had Dalvik runtime.
2. Open GL (graphics library) – This cross-language, cross-platform application program interface (API) is used to produce 2D and 3D computer graphics.
3. WebKit – This open-source web browser engine provides all the functionality to display web content and simplify page loading.
4. Media frameworks – These libraries allow you to play and record audio and video.
5. Secure Socket Layer (SSL) – These libraries are there for Internet security.
It is the third section of the architecture. It provides one of the key components which is called Dalvik Virtual Machine. It acts like Java Virtual Machine which is designed especially for Android. Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device. The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality, including security, threading, and memory management.
The Android team has built on a known set of proven libraries, built in the background, and all of it is exposed through Android interfaces. These interfaces wrap up all the various libraries and make them useful for the Developer. They don’t have to build any of the functionality provided by the android. Some of these interfaces include:
1. Activity Manager – It manages the activity lifecycle and the activity stack.
2. Telephony Manager – It provides access to telephony services as related subscriber information, such as phone numbers.
3. View System – It builds the user interface by handling the views and layouts.
4. Location manager – It finds the device’s geographic location.
Android applications can be found at the topmost layer. At the application layer, application can be installed on this layer only. Examples of applications are Games, Messages, Calendar, Contacts, etc.
Today’s Android OS architecture in layers
Today Android OS weights ~4GB including all the nescessarry apps like Maps, Contacts, Photos, Calendar, Email and other.
If Android OS takes significantly more space then just 4GB, then most likely you have Samsung Galaxy. Isn’t that right? You should keep in mind that biggest manufacturers like Samsung delivers their new devices with pre-installed apps by third parties who have paid for space on their devices. Most of pre-installed apps can’t be removed from the device, but can be hidden from the home screen. Pre-installed apps like Facebook, for instance, obtains more extensive system permissions which would not be allowed in an app store, enabling it to keep track of users more effectively. Other common pre-loaded software include Netflix, Microsoft Office and Spotify. We assign them to the section called “Privileged Apps” and that’s most of the case why Android OS takes so much space.
If a phone is purchased from a carrier there will also be extra applications included throught which they are hoping to sell more services or additional products. The amount of space taken up by these bloatware varies between countries and providers.
Here’s a detailed visualisation of the clean Android OS structure in layers. Each layers is explained in details below:
Android app – app created solely using the Android API. Google Play Store is widely used to find and download Android apps, though there are many other alternatives. In some cases, a device manufacturer might want to preinstall an Android app to support the core functionality of the device.
Privileged app – app created using a combination of the Android and system APIs. These apps must be preinstalled as privileged apps on a device.
Device manufacturer app – app created using a combination of the Android API, system API, and direct access to the Android framework implementation. Because a device manufacturer might directly access unstable APIs within the Android framework, these apps must be preinstalled on the device and can be updated only when the device’s system software is updated.
System API – represents Android APIs available only to partners and OEMs for inclusion in bundled applications. These APIs are marked as @SystemApi in the source code.
Android API – is the publicly available API for third-party Android app developers.
Android framework – group of Java classes, interfaces, and other precompiled code upon which apps are built. Portions of the framework are publicly accessible through the use of the Android API. Other portions of the framework are available only to OEMs through the use of the system APIs. Android framework code runs inside an app’s process.
System services – are modular, focused components such as SurfaceFlinger, and MediaService. Functionality exposed by Android framework API communicates with system services to access the underlying hardware.
Android runtime (ART) – Java runtime environment provided by AOSP. ART performs the translation of the app’s bytecode into processor-specific instructions that are executed by the device’s runtime environment.
Hardware abstraction layer (HAL) – is an abstraction layer with a standard interface for hardware vendors to implement. HALs allow Android to be agnostic about lower-level driver implementations. Using a HAL lets you implement functionality without affecting or modifying the higher level system.
Native daemons and libraries – Active libraries interact directly with the kernel or other interfaces and don’t depend on a userspace-based HAL implementation.
Kernel – is the central part of any operating system and talks to the underlying hardware on a device. Where possible, the AOSP kernel is split into hardware modules and vendor-specific modules.
Factors taking significant amount of space
There are several factors that can take up a significant amount of space on an Android operating system, including but not limited to:
- Operating system updates: When the Android operating system updates, it typically requires more space to install the new version. These updates can take up several gigabytes of space.
- Pre-installed apps: Many Android devices come with pre-installed apps that take up a significant amount of space. While some of these apps are useful, others may be unnecessary for the user and can be removed.
- App data and cache: Apps store data and cache on the device, which can accumulate over time and take up a lot of space. Clearing the cache or uninstalling unused apps can help free up space.
- Media files: Photos, videos, and music files can take up a lot of space on an Android device. Moving these files to an external storage device or cloud storage can help free up space on the device.
- Downloads: Downloading large files, such as movies or games, can take up a lot of space on an Android device. It’s important to manage downloads and delete files that are no longer needed.
- System logs: Android devices store system logs that can take up space over time. Clearing these logs can help free up space.
You can manage the storage space on an Android device by regularly checking for unnecessary files and apps, clearing apps cache and data, moving files to external storage, and monitoring downloads folder.
Leave a Reply