android architecture
DESCRIPTION
Android ArchitectureTRANSCRIPT
Android Architecture
by Lope Emano
The Android Stack
Overview
● Linux Kernel Layer● Native Layer● Application Framework Layer● Applications Layer
Linux Kernel Layer
Linux Kernel Layer Overview
Never really interacts with developers but is the heart of the whole system.
Android OS is a Linux Fork.
Acts as an interface between device’s hardware and the upper layers.
Linux is a proven driver model
Linux Kernel Layer Overview
Provides following functions to the system:
● Hardware Abstraction● Memory Management Programs● Security Settings● Power Management Software● Other Hardware Drivers (Drivers are programs that
control hardware devices.)● Support for Shared Libraries● Network Stack
Android and the Linux Kernel
Native Libraries Layer
Native Libraries Layer Overview
Libraries carry a set of instructions to guide the device in handling different types of data.
Libraries handle generating web pages, network security, decoding music, video files, etc..
Open Source
Native Libraries Layer Overview
● Surface Manager: composing windows on the screen● SGL: 2D Graphics● Open GL|ES: 3D Graphics Library● Media Framework: Supports playbacks and recording of
various audio, video and picture formats - codecs● FreeType: Font Rendering● WebKit: OpenSource Browser Engine● libc: System C libraries● SQLite: Database● Open SSL: Secured Networking
Android Runtime
Dalvik Virtual Machine
Open-source software
Written by Dan Bornstein
Named after the fishing village of Dalvík in Eyjafjörður, Iceland, where some of the author’s ancestors lived
It is the software responsible for running apps on Android devices
To be replaced by ART which started in Android 4.4 KitKat
Dalvik Virtual Machine (more)
● It is a Register based Virtual Machine.● It is optimized for low memory requirements.● It has been designed to allow multiple VM instances to
run at once.● Relies on the underlying OS for process isolation,
memory management and threading support.● Operates on DEX files.
Application Framework Layer
Application Framework Layer
Provides many higher-level services to applications in the form of Java classes.
Application developers are allowed to make use of these services in their applications.
You will be talking to these guys a lot.
Important Blocks
● Activity Manager: Manages the activity life cycle of applications.
● Content Providers: Manage the data sharing between applications.
● Telephony Manager: Manages all voice calls. We use telephony manager if we want to access voice calls in our application.
● Location Manager: Location management, using GPS or cell tower
● Resource Manager: Manage the various types of resources we use in our Application
Applications Layer
Applications Layer
The applications are at the topmost layer of the Android stack
An average user of the Android device would mostly interact with this layer
This is you
Applications Layer
Sample applications on this layer:
● SMS client app● Dialer● Web browser● Contact manager
What we’ve learned
● Linux serves as the foundation for the Android OS● There are many layers that help our app run● These layers abstract themselves as much as
possible s.t. we only need to talk to the Applications Framework Layer.
References:
● http://www.edureka.co/blog/beginners-guide-android-architecture/
● http://www.tutorialspoint.com/android/android_architecture.htm
● http://en.wikipedia.org/wiki/Dalvik_%28software%29