The Linux Side Of Android

The Linux Side Of Android

Related image

On a day to day basis we often hear that Android is a Linux based operating system, ok maybe not daily but I am sure you have heard this before. In this post I am going explain how Android is related to Linux and how they are different.

 What is Linux exactly? 

Image result for linux

Well Linux is just a kernel, a kernel is the core of an operating system(OS), it is the part that talks to the hardware and makes it possible for other software to run smoothly on a computer. Most Linuxes have four elements: the kernel, the HAL (Hardware abstraction Layer where drivers that are not compiled into the kernel), the Userspace (where applications 'reside'), and finally, the desktop environment, or UI (user interface), such as GNOME, KDE, Xfce and others. the userspace is generally GNU  and Linux is the kernel. The Linux kernel was developed in 1991 as an open source operating system for desktop computers by Linus Torvalds.


What is Android exactly?

Image result for android

Android is an open source operating system created for mobile devices by Google. The original developer of the Android software, Android, Inc., was purchased by Google, Inc. in 2005. It has been developed based on the Linux 2.6 kernel. 

Basically Android is a modified Linux kernel with functions and APIs to enable it to operate efficiently and effectively on mobile devices. The Linux kernel that runs on Android has been modified primarily for the power needs of mobile devices with small batteries and relatively slower processing power compared to desktop computers (but this is debatable because new generation smartphones are pretty powerful).  Some of the specialized functions and APIs are for interacting with the mobile communications and also to implement a common programming and user interface to help app developers to create apps that run on the countless Android devices out there. The Android gui and package system are built on java from the ground up.

Diving In


Android is, technically speaking, a distribution of Linux or whats known as a Linux distro. Usually a Linux distro refers to a desktop one like Ubuntu or Arch, but the Linux kernel can be compiled for nearly any architecture (x86, x64, ARMv3/4/etc...) thats why Linux can run almost effortlessly on different hardware including Android phones.

The beauty of Android's design is how little the kernel has been modified. Most embedded systems try to make drastic changes to the kernel. Android is the opposite: only minimal changes are made to the kernel, but the user-space has been completely changed unlike that of any other Linux distros. In fact, Android's user-space is so different from standard Linux, you can easily say that Android is not in any way a Linux system, except for the kernel.


Some Of The Kernel Modifications in Android:

  • ashmem (Android Shared Memory), a file-based shared memory system.
  •   Binder, an inter-process communication (IPC) and remote procedure call (RPC) system.
  •    logger, a high-speed in-kernel logging mechanism optimized for writes.
  •   Paranoid Networking, a mechanism to restrict network I/O to certain processes.
  •   pmem (Physical Memory), a driver for mapping large chunks of physical memory into user-space.
  •   Viking Killer, a replacement OOM killer that implements Android's "kill least recently used process" logic under low memory conditions.
  •   wakelocks, Android's unique power management solution, in which the default state of the device is sleep and explicit action is required (via a wakelock) to prevent that.

More here

Conclusion 

Android can be thought of as an application-specific implementation of Linux. LINUX is an open source OS that accepts contributions from the community at large.  Android uses the Linux kernel but also adds Google's own extensions along with app layer and graphical subsystem.

Thats it folks, you can now walk into any party and start impressing people with your knowledge about Linux/Android 😅. Join us next time when we dive deep into Android roms, bootloaders and that sort of niceness we all need in our lives.

Comments

Post a Comment