0% found this document useful (0 votes)
4 views

Android Operating System Architecture

The document discusses the architecture of the Android operating system, highlighting its layers including the Kernel, Native Libraries, Application Framework, and Application layer. It emphasizes the open-source nature of Android, its widespread use, and the development framework that allows developers to create applications efficiently. Additionally, it covers the boot process and security concerns associated with Android devices.

Uploaded by

shintiyanurul29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Android Operating System Architecture

The document discusses the architecture of the Android operating system, highlighting its layers including the Kernel, Native Libraries, Application Framework, and Application layer. It emphasizes the open-source nature of Android, its widespread use, and the development framework that allows developers to create applications efficiently. Additionally, it covers the boot process and security concerns associated with Android devices.

Uploaded by

shintiyanurul29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/326507076

Android Operating System Architecture

Research · July 2018


DOI: 10.13140/RG.2.2.20829.72169

CITATIONS READS

3 19,646

1 author:

Umer Farooq
Virtual University of Pakistan
6 PUBLICATIONS 20 CITATIONS

SEE PROFILE

All content following this page was uploaded by Umer Farooq on 20 July 2018.

The user has requested enhancement of the downloaded file.


Android Operating System Architecture
Umer Farooq
Computer Science Department, Virtual University of Pakistan, Lahore ˗˗ Pakistan
[email protected], [email protected]

Abstract— As technology increasing so rapidly and tablets and smartphones. Android OS is based on
evolving in our daily life, Usage of mobile phone is the Linux kernel and developed by Google.
increasing melodramatically over the last few years. Android OS is designed for low powered devices,
Globally, if we compare usage of personal computers that run on battery and equipped with hardware
(PC) and mobile devices, mobile devices have like Global positioning system (GPS), Wireless
approximately 3.5 times [1] more usage than PCs. fidelity (WiFi), UMTS, touch screen, light and
Nowadays smart phones are not only means of orientation sensors etc. Some key features of
making voice calls or sending text messages, but it’s Android OS are:
a personal entity of almost every adult human being Dalvik Virtual Machine, Application Frame work,
which provides a lot of information and Optimized Graphics, Integrated browser, SQLite,
entertainment as well. There is nothing that user can GSM Technology, Edge, 3G, 4G, Media Support,
access on their personal computer and not on smart Camera, Bluetooth, WiFi etc.
phone. There are a lot of manufacturing companies, Android applications are mostly developed using
like Symbian, google, Microsoft, Apple, Nokia, Java Programming language by using Android
Samsung etc. who provide different kinds of smart software Development Kit (SDK). The SDK
phones equipped with wonderful technology. includes a debugger, libraries, QEMU (Quick
Android OS is unequivocally the most commonly Emulator) based handset emulator, tutorials,
used technology that was introduced to us by sample code and documentation [2]. Owing to its
Android Inc. which was then acquired by Google and open source nature Android OS has become the
released as the Android Open Source Project fastest growing mobile operating system and is
(AOSP). also favorite for many consumers and developers.
Software developers can easily add, modify and
This paper intends to explore architecture, enhance feature in to encounter the latest
different perspective features and working of android requirements of mobile technology. In addition, it
OS provides a very convenient hardware platform for
developers so by spending less effort they can
realize their ideas.
Owing to android’s powerful development
framework developers are able to create their own
Keywords— Android operating system, Android applications for wide range of devices.
Architecture, Android layers, Dalvik VM, Android Approximately more than 1.5 billion applications
Component. and games downloaded from Google Play store
each month by android users [3].
1) Introduction
2) Android Architecture
Android operating system is one of the utmost
extensively used mobile operating system Android operating system is a stack of software
nowadays. Android OS is primarily designed for components that can be divided into four layers.

1
1) Kernel Layer. 2) Native Librariesas layer. 3) in time clock that in specific time goes off and we
Application Framework layer. 4) Application wake up. Similarly, android kernel performs certain
layer. Architecture diagram of android OS is operations and schedule it properly to wake up
shown in Figure 1. application when related event takes place.
2.1.2) Binder
In android kernel binder is introduced to handle inter-
process communication (IPC) more efficiently
because IPC is very resource hungry process if it is
not handled properly. In smart phones we have very
limited recourse as compare to PCs. The purpose of
introducing binder was efficiency both in term of
speed and memory. It makes messaging calls very
efficient and boost up the performance through
shared memory, there is no replication of object as
objects are pass from one place to another by
reference, not the object itself, that is key feature of
effectively usage of memory. Binder synchronous
calls between processes. Applications and services
may run in separate processes but must communicate
and share data. Traditional Linux IPC can introduce
significant processing overhead and security holes
that is why android introduce binder.
Figure 1. 2.1.3) Power Management
Image taken from [4]
On the top of Linux power management android
2.1) Linux Kernel brought its own power management to be fit
according to the need of smart phones.
Kernel layer provides basic system functionalities 2.1.4) Low Memory killer
like process management, memory management,
device management including camera, display, Low memory killer that is handle by out of memory
keypad etc. Basically kernel used in android (OOM) handler. Whenever device is out of space it
operating system is a Linux 2.6 series kernel. Reason picks one process and kill it. Now the question is how
of chosing Linux kernel for android OS is that Linux the process will get picked and killed? Answer is
is really good at basic operation such as networking, process is selected by policy defined by device user
vast array of device drivers which take the pain out itself. Policies are passed to kernel to kill idle
of interfacing to peripheral harware. For some background running process.
special needs Google enhanced kernel to better 2.1.5) Kernel Debugger
address the needs of mobile platforms like memory AS android is an open source project and Linux
management, Process management, power kernel itself is open source that means anybody can
management, runtime enviornment special make changes into it. To keep track and watching
interprocess comminucation (IPC) machanism and these changes working fine or not android is
better handling of limited system resources [5]. provided with a Kernel Debugger.
Some major Android linux kernel enhancement are 2.1.6) Logger
as follow.
Another important part added to kernel is logger that
2.1.1) Alarm Driver log the system wide messages for troubleshot
Through alarms driver android provided applications purpose including main logger buffer, event logger
facility to wake up at any time just like we put alarm buffer, radio logger buffer and system buffer.
2.1.7) Ashmem

2
Android shared memory, ashmem for short, added in size of RAM and slow CPU. Just like JVM, Dalvik
kernel to facilitates memory sharing and has its own byte code format which is adjusted to
conservation that provide better-supports low need to android target devices. This byte code is
memory devices because it can discard shared more compressed than typical java byte code. It
memory units under memory pressure. executes files in the Dalvik executable (.dex) format
which is optimized for minimal memory footprint.
3) Native Libraries Layer DVM provides applications portability and runtime
consistency and enables each application to run in its
On the top of Linux Kernel layer is Android’s native
own process, with its own instance of DVM.
libraries. This layer enables the device to handle
different types of data and this data is specific to
4) Application Framework
hardware. As shown in figure 1. this layer is divided
into two parts one is Android library and second is Application framework layer is on top of native
android runtime. All these libraries are written in library layer. The application layer provides major
C++ programming language. These libraries do most Application programming interface (APIs) and
of the heavy lifting tasks and provide a lot of power higher-level services in the form of java classes. The
behind android platform. These libraries are called application developers are allowed to access all the
through java interface. [6]. Some of important native APIs framework for the core programs that make
libraries are: simpler the reuse of APIs components. These APIs
Libc: Android implements its own special version of are open to everybody to create android applications.
bionic libc which is small in size as compare to GNU There is different type of application components.
libs (glicb) that is too big and complicated for mobile Each type has a different lifecycle and purpose that
phone. describes how the component will be created and
SQLite: SQLite is a relational database used in destroyed.
android for data storage that is available to all 4.1) Activity
application for storing and retrieving data according An activity represents a single screen with a user
to their need. interface. In applications, activities work together to
Media Framework: Media framework provides achieve cohesive user experience. In a multiple
recording and playback of numerous audio, video activates application, typically, one activity is
and picture formats including MPEG4, MP3, AME, specified as the “main” activity which is presented to
H.264, AAC, PNG and JPG. the user upon launching the application for the first
Surface Flinger: surface flinger provides system- time. In order to perform different actions each
wide surface composer handling all surface activity can start another activity. Whenever new
rendering to frame buffer device and combines 2D activity starts, pervious one is stopped by saving state
and 3D surfaces. in a stack for later use [7]. To manage all activities
WebKit: WebKit is a browse engine used to display there is an activity manager that manages the life
HTML content. cycle of applications.
Second part of this layer is Android Runtime that is 4.2) Services
consist of Dalvik Virtual machine (DVM) and core
Java libraries. Android applications and the A service is an android component that runs in the
fundamental frameworks are written in Java background and does not provides user interface.
programming language. Java has always been Services perform long running operations and work
marketed as “write once, run anywhere.” The for remote processes. Just like other application
capability has largely been made possible by Java components, service components always run in the
virtual Machine (JVM). Instead of using standard main thread for application by default. An activity
Java virtual Machine (JVM) android uses its own can bind or connect a service running in background
Dalvik virtual machine that is designed for small to communicate with the other services through the
systems, these small systems usually provide small interface that the service exposed.

3
4.3) Content Providers 6) Android Boot Process
Shared data among applications is provided by Android boot sequence is hereby illustrated in Figure
content provider. It manages how to access data from 2. Which describe the booting process of Android.
other applications this share data could be
in SQLite database, file system, or any other
persistent storage location that an application can
easily access.
4.4) Package Manager
Android use a special extension for packages called
APK (Android Package). Package manager keeps
track of all packages available in a system and
service those packages can provide.
4.5) Window Manager
With accusation of surface flinger window manager
draw different windows on screen for interaction.
Surface flinger manages all the output on the screen.
4.6) Hardware Services
Hardware services interact with hardware
abstraction layer to access devices as direct access
is not allow there are number of manager involved Figure 2.
to get access device.
Image taken from [8]
4.7) Telephony Serive 6.1) Boot Loder
All activates related to making phone calls and When power button of device pressed, the Boot
sending text messages are handled by telephony ROM code starts executing froam pre-defined
service. It makes possible to make calls and location which is hardwired in ROM. It loads Boot
sending/receiving text messages. loader into RAM and start executing. Boot loader is
4.8) Location Service a small program that runs before android does. It is
Location services is used for location management. not part of android operating system. In first stage
GPS or cell tower are used to get location of device. bootloader detects external RAM and loads a
program which help in next stage to setup network,
5) Application Framework memory, etc. that are requires to run kernel and it
In Android architecture the application layer is the also configure parameters or input for kernel for
top layer. These comprise both the native precise purpose.
applicationa that are pre-installed with every device 6.2) Kernel
such as: Phone dialer, SMS Client, Web Browser Android kernel starts in a similar way as linux kernel.
contact Manager etc. An average user of the android When kernel lanches, it starts to setup cache,
device would mostly interact with this layer for basic protected memory, scheduling and loads different
funciton like making phone calls, sending text necessary drivers of hardware. When kernel finishes
messages, capturing pictues, browsing web, palying the system setup, it looks for “inti” system files.
videos and audios. A developer can wirte his own
application and can replace it with the existing
applicaton. There are also a lot of 3rd party applicaton 6.3) Init Process
availabe in Google play store. User can easily
download and user these application according to Init is a root process or we can say it is a very first
their needs. process that has two main responsibilities. First is

4
mounting directories like /dev/ /sys or proc. internal information and component of device.
Secondly it runs init.rc script that provide generic Whenever any bug, loophole or weakness is reported
initialization instructions it also provide user defined through public repository, android resolve that
policy or specific initialization instructions weakness and provide patch to prevent attacks.
Before the availability of security updates or in case
6.4) Zygote and Dalvik VM
of not deploying updates in devices there are chances
Zygote is virtual machine process that starts at of attacks. Timely updates deployment is vital for a
system boot. The zygote preloads and initialize core system’s security
library classes. Just like in java a separate virtual
machine instance popup in memory for separate per 7.2) Linux kernel is not adequate for secure
app, but in Android Dalivk virtual machine run as system
quick as possible for an app and instead of launching
Android is based on Linux Kernel that implements a
several instance of apps Zygote helps to code sharing
monolithic architecture in which components are
across the Dalivk VM, Achieving a lower memory
interconnected and composed all in one piece. All
footprint and minimal startup time.
kernel components e.g. device drives, Power
6.5) System Services
management, Shared Memory etc. runs in kernel
After the above steps are completed, Zygote lunches where no isolation between them is provided. Any
the system services such as starting power manager, kernel that can be exploited enables an attacker to
Package manager, context manager, battery service, modify kernel memory that can be very harmful. As
sensor service and Bluetooth services etc. Zygote many android devices manufactures often use
splits a new process to launch the system services. custom drivers for their hardware and there are
6.6) Activity Manager chances that custom made drives could be poor
When services are started activity, manager is quality containing security risks because code of
launched that provides all the methods for managing such drivers is not contributed back to Linux
the lifecycle of an activities. community and not tested by Linux community.
6.6) Lancher (Home)
When all process is stated Home screen launched that 7.3) Disabling security features by rooting
is a also a application that help users to interact with phones
device. When some application or user root his/her device
then device is not secure anymore. Rooting process
7) Android Security and threats overcomes the kernel integrity barrier. Rooted
Android security is always a hot topic. Recently, a lot system cannot put trust in its kernel the modified
of modifications are done regarding security and kernel might disable android security measure and
threats to keep devices safe. As compare to another can contain malware such as key logger that can be
Mobile OS for example Apple’s iOS, Black Barry cause of private information leakage.
OS etc. android security is low. Some of well know
security risks that make android vulnerable to attacks
are: Delay in security updates, Linux kernel is not 7.4) Bristly permission system.
adequate for secure system, Disabling security Very major and dangerous security issue is giving
features by rooting phones and Bristly Permission irrelevant access to applications during installing
system [9]. apps. Android implement mandatory access control
7.1) Delay in Security updates in the form of permission system. During installation
many application requests to user to access system
As android is an open source project any one can play resources such as, Contacts, Picture gallery, location,
or customize it. There are a lot of platform available Camera and mic access. In installation process users
to develop android app/program to access the have no option to grant access selectively, either full

5
access is granted or not at all. After installation many [4]
application gain access in our personal data. http://www.techotopia.com/index.php/An_O
verview_of_the_Kindle_Fire_Android_Archi
As it is observer that very famous application “True
tecture
Caller” that display name of caller even contact
number of caller is not saved in device. If anyone [5][9] Matthisa Lange and Adam Lackorzynski
installs this application it copies all contact and send L4Android: A Generic Operating system
back to his server to display name against contact to framework for secure smartphones
other people who does not save that contact number. [6] Rajinder Sing int. journal of Engineering
Giving access to such application over personal Research and Applications Vol.4 (Version1)
information is very risky. February 2014, pp.519-521. An overview of
Android operating system and its security
8) References features.
[1] Nisarg Gandhewar et al. Google Android: an [7] OL. Google Android Developers, Android
emerging software platform for mobile Develop
devices (International Journal on Computer Guide,http://developer.android.com/guide/top
Science and Engineering (IJCSE) ics/
[2] fundamentals.htm
http://en.wikipedia.org/wiki/Android_(operat [8] https://community.nxp.com/docs/DOC-
ing_system) 102546
[3]
https://developer.android.com/about/index.h
tml

View publication stats

You might also like