android architecture

21
Android Architecture by Lope Emano

Upload: lope-emano

Post on 01-Jul-2015

296 views

Category:

Software


2 download

DESCRIPTION

Android Architecture

TRANSCRIPT

Page 1: Android Architecture

Android Architecture

by Lope Emano

Page 2: Android Architecture

The Android Stack

Page 3: Android Architecture

Overview

● Linux Kernel Layer● Native Layer● Application Framework Layer● Applications Layer

Page 4: Android Architecture

Linux Kernel Layer

Page 5: Android Architecture

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

Page 6: Android Architecture

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

Page 7: Android Architecture

Android and the Linux Kernel

Page 8: Android Architecture

Native Libraries Layer

Page 9: Android Architecture

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

Page 10: Android Architecture

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

Page 11: Android Architecture

Android Runtime

Page 12: Android Architecture

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

Page 13: Android Architecture

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.

Page 14: Android Architecture

Application Framework Layer

Page 15: Android Architecture

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.

Page 16: Android Architecture

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

Page 17: Android Architecture

Applications Layer

Page 18: Android Architecture

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

Page 19: Android Architecture

Applications Layer

Sample applications on this layer:

● SMS client app● Dialer● Web browser● Contact manager

Page 20: Android Architecture

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.