Android os
This presentation is the property of its rightful owner.
Sponsored Links
1 / 49

Android OS PowerPoint PPT Presentation


  • 90 Views
  • Uploaded on
  • Presentation posted in: General

Android OS. Google's Mobile Device Operating System. Intro & Overview. Steve Mance. Agenda. Intro/Overview Hardware and IO Kernel Software Architecture Programming Languages Application Framework and Components Future for mobile and non-mobile platforms.

Download Presentation

Android OS

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Android os

Android OS

Google's Mobile Device

Operating System


Intro overview

Intro & Overview

Steve Mance


Agenda

Agenda

  • Intro/Overview

  • Hardware and IO

  • Kernel

  • Software Architecture

  • Programming Languages

  • Application Framework and Components

  • Future for mobile and non-mobile platforms


Intro overview what is android

Intro/Overview - What is Android?

  • Operating System optimized for Mobile Devices

  • Open Source

  • Maintained by Google

  • Based on the Linux kernel


Intro overview system overview

Intro/Overview - System Overview


Intro overview history

Intro/Overview - History

  • Android Inc. founded 2003

  •  Purchased by Google from initial dveloper in 2005

  •  Version 2.0 released 2009

    •  Starts to take hold in the Smartphone Market

  • Version 3.0 released 2011

    • Predominantly used in Tablets


Intro overview features

Intro/Overview - Features

  • Apps

    • The "Programs" of Android

    • Composed of application components

  • Widgets

    • Provide information and tools directly on the Home Screen

    • No need to launch an activity

  • Marketplace

    • A place for App distribution, run by Google

    • Developers can sell their apps or give them away freely

    • Third Party distributors also available


Intro overview marketshare

Intro/Overview - Marketshare


Intro overview marketshare1

Intro/Overview - Marketshare

  • Late 2009/Early 2010 Android begins it's growth in the US Smartphone market

  •  As of Janurary 2011 the Android OS has the highest marketshare in smartphones in the US

  • Now more prevalent than iOS (Apple) and Blackberry (RIM)


Intro overview relevant devices

Intro/Overview - Relevant Devices

Tablets:

Motorola Xoom

Samsung Galaxy Tab 4G

Dell Streak

Asus Eee-Pad Transformer

+More

Phones:

HTC Thunderbolt

Motorola Droid/2/X

HTC Evo

Samsung Nexus S

+Many More


Hardware and i o

Hardware and I/O

Dmitiry Lozovatskiy


Device requirements

Device Requirements

Chipset:    ARM-based (32-bit Advanced reduced instruction set computer architecture machine). Dalvik VM graphics processing, currently assume an ARM architecture.

Memory:    128 MB RAM; 256 MB Flash External.  Android can boot and run in     configurations with less memory, but it isn't recommended.

Storage:    Mini or Micro SD. Not necessary for basic bring up, but recommended.

Primary Display:    QVGA (320×240) TFT LCD or larger, 16-bit color or better.

Touch screen interface no smaller than 2.8 inches in size.

Navigation Keys: 5-way navigation with 5 application keys, power, camera and  volume controls.

Camera:    Must have a resolution of at least 2 megapixels, but not required.

USB:     Standard mini-B USB . For flashing the device system images and debugging.

Bluetooth:     1.2 or 2.0, but not required.


Kernel

Kernel

Geoff Hetherington


About the android kernel

About the Android Kernel

  • Derived from the Linux 2.6 kernel, with added enhancements not found in Linux

  • Kernel mode and user mode are used the same as in the Linux kernel


Ashmem

Ashmem

  • Anonymous Shared Memory

  • Ashmem uses virtual memory

  • The kernel is allowed to free this shared memory

  • More viable for low memory devices, because it can discard shared memory units


Android os

Pmem

  • Process memory allocator

  • Similar to ashmem, but uses physically contiguous memory as opposed to virtual memory

  • Manages large, contiguous regions of memory shared between user space and the kernel drivers


Binder

Binder

  • A tool for inter-process communication

  • Binder driver manages synchronization between processes

  • Facilitated using different states

    • Receive blocked

    • Ready

    • Send blocked

    • Reply blocked


Logger

Logger

  • System logging, separate from the Linux kernel’s own logging system

  • Stores logs from applications, events, and the system

  • Write path is optimized to avoid overhead from open(), write(), and close()


Android power management

Android Power Management

  • Wake locks are used to hold the machine awake until a wake lock is released

  • Wake locks issued in user space, handled by kernel

  • Power management can shut CPU down if there are no active wake locks


Multithreading and multitasking

Multithreading and Multitasking

  • Expensive operations are done in a background service

  • Slow work is done in a background thread

  • Ensure the UI is responsive to the user

  • Processes are not killed when the user closes an application, instead they remain in the background


Removal from linux kernel

Removal From Linux Kernel

  • Android code removed from Linux kernel as of December, 2009

  • Kernel development has been removed from the Linux kernel tree

  • Android kernel includes features that would need to be integrated into Linux kernel to merge it into main kernel tree


Software architecture

Software Architecture

Raanan Korinow


System libraries

System Libraries

  • libc for C and C++

    • Why not glibc?

  • libpthread

    • not 100% POSIX compliant

  • Isn't Android programmed in Java?

  • SDK vs NDK


More libraries

More Libraries

  • SSL

  • SQLite

  • WebKit (and LibWebCore for embeddable webpages)

  •  Audio Manager

  • Media Framework

    • MediaPlayer


Graphics libraries

Graphics Libraries

  • Scalable Graphics Library (SGL- for 2D)

  • OpenGL for Embedded Devices (for 3D)

  •  FreeType (vector and bitmap fonts)

  •  Surface Manager

    • Composes 2D and 3D windows, widgets, apps, toolbars and more using Surface Flinger

    • Uses Binder IPC to get buffers from apps to put into frames


Hardware abstraction libraries

Hardware Abstraction Libraries

  • GPS, Radio, Camera, Bluetooth, other I/O

  • Hardware drivers must implement in order for applicationss to use them

  • Applications interact with the abstraction libraries, not the driver

  • Promotes variety in hardware without breaking applications

  • Gives OS tighter control over devices


Android vs linux software architecture

Android vs Linux Software Architecture

  • No native window library

  • Does not support full set of GNU libraries

  • Difficult to port Linux applications to Android, but possible if working within libc constraints


Reboot bug 2008

Reboot Bug (2008)

Android allowed a remote device to be controlled over serial port

If device not attached, phone would execute ALL text input as shell commands

Typing “reboot” in an email/browser/anywhere would result in phone rebooting

Architecture and Components at fault! Promptly fixed, but jeopardized Android’s reputation.


Programming on android

Programming on Android

Jin Kim


Application development

Application Development  

  • Most Android applications written in Java

  • However, no Java Virtual Machine in the platform  

  • Java classes compiled into Dalvik virtual machine

  • Dalvik - a specialized virtual machine designed specifically for Android


Android software development kit sdk

Android Software Development Kit (SDK)

  • The SDK includes a comprehensive set of development tools.

  • Includes a debugger, libraries, documentation, sample code

  • These tools are accessed through an Eclipse plugin called ADT (Android Development Tools) or from command line

  • Developing with Eclipse is preferred (but not required)


Steps for developing applications

Steps for Developing Applications

 1. Install Eclipse or own IDE

 2. Install ADT plugin, or an editor of your choice

 3. Set up Android Virtual Devices or hardware devices on which you will install your applications

 4. Create an Android project

  • Contains all source code and resource files for your application. Built into an .apk package that you can install on Android devices. 

     5. Build and run your application 


Steps for developing applications1

Steps for Developing Applications

 6. Debug your application with the SDK debugging tools

  • Involves using a JDWP-compliant debugger along with the tools provided with Android SDK.

     7. Test your application with the Testing and Instrumentation             framework

  • The Android SDK provides a testing and instrumentation framework to help set up and run tests


Support for additional languages

Support for Additional Languages

  • In 2009, Google announced the Android Native Development Kit (NDK)

    • Allows developers to build Android software components with C and C++

    • Comes with limitations, however

    • Intended to be used alongside Java to code individual parts of programs, not as a full alternative

  • Google also launched the Android Scripting Environment (ASE) - allows developers to build apps with Python and Lua


New language

New Language

  • July, 2009, Google released language called Simple, designed specifically for Android apps

  • Simple - based on BASIC

  • Easy to learn and use language

  • Gives both amateur and professional programmers  a quick and easy way to write Android apps


Application components

Application Components

Jason Loewy


Android components

• Four types: Activities -   

  Services - Content   

  Providers - Broadcast 

  Receivers

• Part of the building blocks 

  of applications

• Each component type 

  performs its own unique 

  action

Android Components


Component activity

• Activities can be thought of 

  as a single view that 

  provides a user interface

• Each activity is it's own 

  entity but all activities work 

  together to form the 

  application.

Component - Activity


Component services

• Services are tasks that run

  in the background

• Run on the main process 

  thread unless otherwise 

  specified

• Examples include playing

  music while using other

  applications, handling 

  network transactions, etc

(Image from http://marakana.com)

Component - Services


Component content provider

• Content Providers allow for 

  cross application

  communication

• Applications must have 

  necessary permission levels

  to communicate

• For example allows 

  applications to select an 

  image from the phones   

  library, select a contacts  

  info from the contacts list, 

  etc

Component - Content Provider


Component broadcast receiver

• Broadcast are system wide

  notifications

• Broadcast Receivers allow

  applications to receive those

  notifications and act 

  accordingly

• For example releasing 

  allocation memory on a low 

  memory warning.

Component - Broadcast Receiver


Android s future

Android's Future

Adam LaFave


Growth

Growth

Android predicted to grow in market share:

  •  38.6% (#2) tablet OSes by 2015

  •  48.8% (#1) phone OSes by 2015


Reasons for growth

Reasons for Growth

  • Open Source

    • Many handset / tablet makers utilize this free OS (HTC, Motorola, Samsung)

      • Saturates the market with Android hardware on multiple carriers

    • Free to develop on -- no overhead charge for developing apps (iOS)

  • Strong fan base

  • Alternative to iOS-based devices

  • It's Google


With great growth comes great responsibility

With Great Growth Comes Great Responsibility

Fragmentation

  • Different screen sizes, hardware features, user interfaces and carrier-decided OS updates cause inconsistent Android experience

  • After selling a device, manufacturer has little incentive to offer updates

    Security

  • More users = more attractive to malware writers

  • "Open" market means it's customer's responsibility to stay away from malicious software

  • Smartphone use in business world poses risk


Mobile growth visualized

Mobile Growth Visualized


Merger with chrome os

Merger With Chrome OS

Eric Schmidt (ex-CEO):

  • The two efforts [Android and Chrome OS] will ultimately converge.

  • "We're working overtime to get these technologies merged in the right way."

    What does this mean for Android?


Merger with chrome os1

Merger With Chrome OS

Chrome OS heavily utilizes the cloud.

  • A small hard drive is only needed for the OS itself.

    The merger may bring more cloud services to Android, possibly eliminating the need for internal storage.

  • Pictures, songs, videos, etc. may not need to be stored on the devices themselves -- instead pulled from the cloud when requested.


References and resources

References and Resources

http://elinux.org/Android_Kernel_Features

http://cs736-android.pbworks.com/w/page/5834465/ASHMEM

http://elinux.org/Android_Logging_System

http://developer.android.com/index.html

http://developer.android.com/resources/articles/painless-threading.html

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html

http://www.kroah.com/log/linux/android-kernel-problems.html

http://www.silicon.com/technology/software/2011/02/16/android-chrome-os-to-converge-says-googles-eric-schmidt-39746988/http://www.gartner.com/it/page.jsp?id=1626414http://www.gartner.com/it/page.jsp?id=1622614

http://www.eweek.com/c/a/Mobile-and-Wireless/Androids-Surging-Popularity-10-Factors-Driving-Its-Growth-485860/

http://www.pcworldme.net/2011/02/20/fragmentation-could-stunt-androids-growth/

http://developer.android.com/guide/basics/what-is-android.html

http://arstechnica.com/open-source/news/2009/06/android-goes-beyond-java-gains-native-cc-dev-kit.ars

http://www.informationweek.com/news/internet/google/218700186


  • Login