Top Banner
Introduction to android platform
25

01 02 - introduction - adroid stack

Jun 11, 2015

Download

Technology

Siva Reddy

introduction - adroid stack
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 01  02 - introduction - adroid stack

Introduction to android platform

Page 2: 01  02 - introduction - adroid stack

Agenda

Android Stack

Software development

Page 3: 01  02 - introduction - adroid stack

Android Software Stack

Page 4: 01  02 - introduction - adroid stack

Android S/W Stack - Linux Kernel

Android Runs on Linux

•Android is based on the Linux kernel• Android is not Linux• No native windowing system• No glibc• Does not include full set of standard linux utilities• Kernel source at http://git.android.com

Providing an abstraction layer between the H/W and the rest of the S/W stack

Relying on Linux Kernel 2.6 for core system services and uses only "Kernel" portion in Linux

Memory and Process Management

Network Stack

Driver Model

Security

• The supplied device drivers include Display, Camera, Keypad, WiFi, Flash Memory, Audio, and IPC (inter-process communication).

• Adb command opens linux shell

Page 5: 01  02 - introduction - adroid stack

Why Linux kernel for Android ?

•Great memory and process management

•Great permissions based security model

• Proven driver model

•Support for shared libraries

• It’s already open source

Page 6: 01  02 - introduction - adroid stack

Android S/W Stack - Linux Kernel (Cont)

Typical Directory Tree of Android

Page 7: 01  02 - introduction - adroid stack

Android S/W Stack - Linux Kernel (Cont)

Boot sequence

• Alarm

• Ashmem

• Binder

• Power Management

• Low memory killer

• Kernel debugger

• Logger

Kernel Enhancements

Page 8: 01  02 - introduction - adroid stack

Android S/W Stack - Runtime

Core Libraries

Providing most of the functionality available in the core libraries of the

Java language APIs -

Data Structures

Utilities

File Access

Network Access

Graphics

Etc

Page 9: 01  02 - introduction - adroid stack

Android S/W Stack - Runtime Dalvik Virtual Machine

Providing environment on which every Android application runs

Each Android application runs in its own process, with its own instance of the Dalvik

VM.

Dalvik has been written so that a device can run multiple VMs efficiently.

Register-based virtual machine

Executing the Dalvik Executable (.dex) format

.dex format is optimized for minimal memory footprint.

Compilation

Relying on the Linux Kernel for:

Threading

Low-level memory management

executes dex code, which is translated

from Java byte code

16bit, register based

cf. Java bytecode is 8bit, stack based

Page 10: 01  02 - introduction - adroid stack

Android S/W Stack - Libraries

Including a set of C/C++ libraries used by components of the Android system

Exposed to developers through the Android application framework

Libc: Stucture c standard lib.

SSL: Secure Socket Layer

SGL: Underling 2D grapics engine

OpenGL|ES: 3D image engine

Media Framework: Core part of

Android multi-media –

MPEG4,H.264,MP3,AAC,AMR,JPG,P

NG

SQLite: Light wait relational Embedded

database

WebKit: Kernel of web browser

FreeType: Bitmap and Vector font

renderer

SufraceManager: Manage difference

windows for different applications

Page 11: 01  02 - introduction - adroid stack

Android S/W Stack - Libraries

• The media libraries are based on PacketVideo’s(http://www.packetvideo.com/) OpenCORE. These libraries are responsible for recording and playback of audio and video formats.

• A library called Surface Manager controls access to the display system and supports 2D and 3D.

• The WebKit library is responsible for browser support; it is the same library that supports Google Chrome and Apple Inc.’s Safari.

• The FreeType library is responsible for font support.

• SQLite (http://www.sqlite.org/) is a relational database that is available on the device itself. SQLite is also an independent open source effort for relational databases and not directly tied to Android. You can acquire and use tools meant for SQLite for Android databases as well.

Page 12: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework

Most of the application framework accesses these core libraries through the Dalvik VM, the

gateway to the Android Platform

An application can broadcast its capabilities so that other applications can reuse these

functionalities

View System Used to build an application, including lists, grids, text boxes, buttons, and embedded

web browser

Content Provider Enabling applications to access data from other

applications or to share their own data

Resource Manager Providing access to non-code resources (localized string, graphics, and layout files)

Notification Manager Enabling all applications to display customer alerts in the status bar

Activity Manager Managing the lifecycle of applications and providing

a common navigation backstack

Page 13: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework (Cont)

Page 14: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework (Cont)

Page 15: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework (Cont)

Page 16: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework (Cont)

Page 17: 01  02 - introduction - adroid stack

Android S/W Stack - App Framework (Cont)

Page 18: 01  02 - introduction - adroid stack

Android S/W Stack - Application

Android provides a set of predefined core applications, which handles the phone basic features

These are replaceable applications

Examples :

Email Client

SMS Program

Calendar

Maps

Browser

Contacts

Etc

All applications are written using the Java language.

Page 19: 01  02 - introduction - adroid stack

Android S/W Stack - language

Page 20: 01  02 - introduction - adroid stack

Application Architecture

Page 21: 01  02 - introduction - adroid stack

Software development

•Development requirements• Java• Android SDK

•IDE and Tools

•Android SDK Class Library Developer Tools Emulator and System Images Documentation and Sample Code

•Eclipse IDE + ADT (Android Development Tools) Reduces Development and Testing Time Makes User Interface-Creation easier Makes Application Description Easier

Page 22: 01  02 - introduction - adroid stack

Android SDKandroid.jar Java archive file containing all of the Android SDK classes necessary to build

your application.

documention.html and docs directory The SDK documentation is provided locally and

on the Web. It's largely in the form of JavaDocs, making it easy to navigate the many

packages in the SDK. The documentation also includes a high-level Development Guide and

links to the broader Android community.

Samples directory The samples subdirectory contains full source code for a variety of

applications, including ApiDemo, which exercises many APIs. The sample application is a

great place to explore when starting Android application development.

Tools directory Contains all of the command-line tools to build Android applications. The

most commonly employed and useful tool is the adbutility (Android Debug Bridge).

Usb_driverDirectory containing the necessary drivers to connect the development

environment to an Android-enabled device, such as the G1 or the Android Dev 1 unlocked

development phone. These files are only required for developers using the Windows

platform.

Page 23: 01  02 - introduction - adroid stack

Android Tools

Emulator

Android applications may be run

on a real device or on the Android

Emulator, which ships with the

Android SDK.

•ADB (Android Debug Bridge)

The ADB utility lets you connect

to the phone itself and issue

rudimentary shell commands,

such as copying files to and from

the device

Page 24: 01  02 - introduction - adroid stack

Advantages

Benefits

Open Platform/License Free

Robust OS Kernel, Innovative Library Packages

Ease App. Development

Rapid Improvement

Challenges

Performance Consideration

Hard to Integrate for Vendors

Too Much Google Dependent

Key Factor: Market Response

Page 25: 01  02 - introduction - adroid stack

Questions?