what is android? - bloomsburg university of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfa...

43
What is Android? Mobile Device Application Development COMPSCI 345 Fall 2017

Upload: vudang

Post on 26-May-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

What is Android?

Mobile Device Application DevelopmentCOMPSCI 345

Fall 2017

Page 2: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is an Operating System

● An interface between users/applications and the hardware.

Provides a high-level view of I/O devices. Provides useful abstractions: processes, memory, files...

● Resource allocator

Mediates conflicting requests for CPU time, access to devices,and other resources.

● Control program

Provides environment for safe execution of user applications. Example: prevents a process from accessing memory outside

its address space or writing to the boot sector.

Page 3: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is an Operating System

● Built on top of Linux (kernel version 3.10.49).

● Linux (written in C) handles: thread management. memory management. power management.

● Android is not (?) a Linux distribution. The kernel was modified for mobile devices. Optimized for minimal memory footprint. Does not include many standard tools and libraries.

Page 4: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Why Linux?

● Hardware manufacturers can develop device drivers for awell-known kernel.

● Security:

A mature open-source kernel in widespread use. Trusted by corporations and security experts. Constantly being researched, attacked, and fixed.

● Application sandbox:

Every app runs as a separate Linux process. Actually, all software above the kernel is sandboxed.

Page 5: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Not Just an Operating System

● “Android is an open source, Linux-based software stackcreated for a wide array of devices and form factors.”

A software stack is a set of software subsystems thatcomprise a platform for the execution of applications.

Devices: smartphones, tablets, wearables, ...

A form factor is determined by size, shape, and otherphysical characterisitcs of devices. Example: mobilephone form factors include bar, flip, and slider.

Page 6: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps

Page 7: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

● Thread management● Memory management● Power management● Drivers

usb wifi audio camera display keypad bluetooth binder (IPC) shared memory

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps

Page 8: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps● Provides standard

interfaces exposingdevice capabilities toJava API framework.

Audio

Sensors

Camera

Bluetooth

Page 9: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps● Many core system

components run nativecode requiring librarieswritten in C or C++.

● Java API Frameworkexposes some of theselibraries to apps.

Libc

Webkit

Open GL ES

OpenMAX AL

Media Framework

Page 10: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps● Designed to run

multiple VMs onlow-memory devices.

● Runtime librariesthat implement mostof the core Java API.

Page 11: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps● The building blocks used

by app developers.

● Java classes for:

UI components

UI layouts

Activities

Resources

Notifications

Content providers

Page 12: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

● Stored in the read-only/system/app folder.

Web browser

Calendar

Camera

Dialer

Email

Android is a Software Stack

Hardware Abstraction LayerHardware Abstraction Layer

Native C/C++Libraries

Native C/C++Libraries

AndroidRuntimeAndroidRuntime

Linux KernelLinux Kernel

Java API FrameworkJava API Framework

System AppsSystem Apps

Page 13: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Dalvik Virtual Machine

● VM for executing Android apps.

● Optimized for running multiple instances.

● Register-based. Fewer (but more complex) instructionscompared with stack-based VMs (like the JVM).

Linux KernelLinux Kernel

Hardware Abstraction LayerHardware Abstraction Layer

Android RuntimeAndroid Runtime

App A

Dalvik VM

App B

Dalvik VM

App C

Dalvik VM

App D

Dalvik VM

Page 14: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Dalvik Virtual Machine

JavaCompiler

JavaCompiler

SourceCode

SourceCode

ByteCodeByteCode JVMJVM

Page 15: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Dalvik Virtual Machine

DEXCompiler

DEXCompiler

DalvikByteCode

DalvikByteCode

DalvikVM

DalvikVM

JavaCompiler

JavaCompiler

SourceCode

SourceCode

ByteCodeByteCode JVMJVM

Page 16: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android Runtime (ART)

● Successor of Dalvik for improved performance. AOT compiler. Improved garbarge collection. More debugging features.

● Runs DEX bytecode for backward compatibility.

● History: Included in 4.4 (KitKat) as alternative runtime. Replaced Dalvik entirely in 5.0 (Lollipop). Added JIT compiler with code profiling in 7.0 (Nougat).

Page 17: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android Development

● In order to write apps, you will need: JDK (SE) 7 or 8 The Android SDK Android Studio

● Apps can be run in the SDK’s emulator or deployeddirectly to an attached device.

● Some knowledge of XML is needed. app configuration resource management

Page 18: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Using Java

● All features of Java 7 are supported.

● Supported features of Java 8: lambda expressions method references type annotations repeatable annotations (API 24 only) default and static interface methods (API 24 only)

● Google vs. Oracle: can an API be copyrighted?

Page 19: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Other Development Languages

● The NDK enables use of native-code languages likeC and C++, and libraries written in those languages.

● Google’s own Go programming language. A compiled, concurrent, garbage-collected, statically

typed language developed at Google. Open source. Go imports the public repository. Home FAQs Splash Article

Page 20: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Other Development Languages

● Kotlin is now an official Android language. Resembles but improves upon Java (safer, more concise) Designed to interoperate with Java. Can use the Java Class Library. Runs on the JVM. Can be compiled to JavaScript source code. Created and developed by JetBrains. Fully supported in Android Studio.

Page 21: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android SDK

● Developer tools compiler debugger emulator

⋮● Documentation

● Sample code and tutorials

● Implementation of the Android API

Page 22: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Android Studio

● Google’s official IDE for Android development

● Built on top of IntelliJ IDEA (Community Edition)

World-class code editing, debugging, performancetooling, a flexible build system, and an instantbuild/deploy system all allow you to focus onbuilding unique and high quality apps.

Page 23: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Material Design

● A design philosophy for the look-and-feel of an appthat allows for a unified experience across platformsand device sizes.

● Three guiding pinciples: Material is the metaphor. Bold, graphic, intentional. Motion provides meaning.

Page 24: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Material is the Metaphor

● Inspired by paper and ink.

● Grounded in tactile reality.

● Surfaces and edges provide visual cues.

● Familiar tactile attributes suggest affordances.

● Flexibility of material creates new affordances thatsupercede laws of physics without breaking them.

● Realistic lighting shows seams, divides space, andindicates moving parts.

Page 25: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Bold, Graphic, Intentional

● Elements of print-based design create hierarchy,meaning, and focus. typography space scale color

● Immerses user in the experience.

● Emphasis on user actions makes core functionalityimmediately apparent and provides waypoints.

Page 26: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Motion Provides Meaning

● Primary user actions are inflection points thatinitiate motion, transforming the whole design.

● Objects presented without breaking continuity ofexperience, even as they transform and reorganize.

● Motion focuses attention and maintains continuity.

● Transitions efficient yet coherent.

Page 27: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

History

2001 Google starts filing for mobile patents.

2005 Google purchases Android, Inc.

2007 Open Handset Alliance

2008 Android 1.0

2009 Android 1.5

2010 Sued by Oracle for copyright/patent infringement.

2011Acquires Motorola and 17,000 patents. Purchases 1023 patents from IBM.

Page 28: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

History

● Google sync:

Gmail, Contacts, Calendar● Standard apps

alarm clock, dialer,launcher, gallery,calculator, settings

● App downloads and updatesthrough Android Market

Version Android 1.0

API Level 1

Release Date 09/23/2008

● Web Browser

● WiFi and Bluetooth

● Camera

● Media Player

● Instant messaging

● Text messaging

● Google Maps with Street View

Page 29: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

History

● Map improvements

● Save attachments

● Show/hide dial pad

Version Android 1.1

API Level 2

Release Date 02/09/2009

Page 30: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Cupcake

● Widgets

● Pictures in contacts

Version Android 1.5

API Level 3

Release Date 04/27/2009

● Video recording/playback

● Animated screen transitions

● Auto-rotation option

● Upload to YouTube and Picassa

● Virtual keyboards with text prediction and user dictionary

Page 31: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Donut

● Text-to-speech engine

Version Android 1.6

API Level 4

Release Date 09/15/2009

● Expanded gesture framework

● Multlingual speech synthesis

● Integrated camera/gallery

● Select multiple photos for deletion

● Enhanced voice and text entry search

● View app screenshots in Android Market

Page 32: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Eclair

Version Android 2.0

API Level 5

Release Date 10/26/2009

● Live wallpapers

● Multi-touch events

● Improved Google Maps

● Tap contact photo to call

● Many new camera features

● Add multiple accounts to adevice for synchronizationof email and contacts

Version Android 2.1

API Level 7

Release Date 01/12/2010

Version Android 2.0.1

API Level 6

Release Date 12/03/2009

● Improved typing speed on virtual keyboard with smarterdictionary that uses contact names as suggestions.

Page 33: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Froyo

● USB tethering

● File uploads in browser app

● JavaScript V8 engine in Chrome

● Numeric and alphanumeric passwords

● Android Cloud to Device Messaging (C2DM) support

Version Android 2.2

API Level 8

Release Date 05/20/2010

● Adobe Flash support

● WiFi hotspot functionality

● Support for high PPI displays

Page 34: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Gingerbread

● Support for extra-large screens

● Last version to target only phones

● Oldest version still used in the wild

● Native support for new sensors (gyroscope, barometer, ...)

Version Android 2.3

API Level 9

Release Date 12/06/2010

● Multiple cameras

● Native support for VoIP

● NFC support, allowing user toread an NFC tag embedded inposter, sticker, advertisement.

Version Android 2.3.3

API Level 10

Release Date 02/09/2011

Page 35: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Honeycomb

Version Android 3.0

API Level 11

Release Date 02/22/2011

● Optimized for tablets

● Holographic UI

● Fragments API

● Action bar

● System bar

● USB On-The-Go

● Encrypt user data

● External keyboards

Version Android 3.1

API Level 12

Release Date 05/10/2011

Version Android 3.2

API Level 13

Release Date 07/15/2011

Page 36: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Ice Cream Sandwich

● Unified SDK for both tablets and phones

● Improved Holographic UI with Roboto font family

● Improved camera app with zero shutter lag, time lapsesettings, panarama mode, ability to zoom while recording

Version Android 4.0

API Level 14

Release Date 10/18/2011

● Photo editor

● Face Unlock

● Customizable launcher

● Improved voice integrationVersion Android 4.0.3

API Level 15

Release Date 12/16/2011

Page 37: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Jelly Bean

Version Android 4.1

API Level 16

Release Date 07/09/2012

● Smoother UI

● Multichannel audio

● Camera improvements

● Expandable notifications

● Lock screen improvements

● Multi-user support on tablets

● RTL languages supported

● Open GL ES 3.0 support

Version Android 4.2

API Level 17

Release Date 11/13/2012

Version Android 4.3

API Level 18

Release Date 07/24/2013

Page 38: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

KitKat

● Wearable extensions

● Wireless printing

● Android Runtime (experimental)

● New framework for UI transitions

Version Android 4.4

API Level 19

Release Date 10/31/2013

● NFC host card emulation,enabling device to replacesmart cards

● Storage Access Framework

● UI updates for Google MapsVersion Android 4.4W

API Level 20

Release Date 06/25/2014

Page 39: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Lollipop

● Support for 64-bit CPUs

● Open GL ES 3.1 on supported GPU configurations

● 15 new languages: Basque, Bengali, Burmese, Chinese(Hong Kong), Icelandic, Kannada, Kyrgyz, Macedonian,Malayalam, Marathi, Nepali, Sinhala, Tamil, and Telugu

Version Android 5.0

API Level 21

Release Date 11/12/2014

● ART

● Tap and Go

● Project Volta

● Flashlight app

● Material Design

Version Android 5.1

API Level 22

Release Date 03/09/2015

Page 40: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Marshmallow

● Doze mode

● Native fingerprint reader support

● MIDI support for musical instruments

● App permissions now granted at runtime

● Automatic full backup and restore for apps

● Contextual support from keywords within apps

Version Android 6.0

API Level 23

Release Date 10/05/2015

Page 41: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Nougat

● Daydream virtual reality platform

● Picture-in-picture support for Android TV

● New JIT compiler with code profiling to ART

● Another system partition for seamless system updates

Version Android 7.0

API Level 24

Release Date 08/22/2016

● Ability to screen zoom

● Multi-window support

● Vulcan 3D rendering API

● Unicode 9.0 emoji supportVersion Android 7.1

API Level 25

Release Date 10/04/2016

Page 42: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Usage (April 2017)

Version Share

Lollipop 32%

Marshmallow 31%

KitKat 20%

JellyBean 10%

Nougat 5%

Ice Cream Sandwich 1%

Gingerbread 1%

Page 43: What is Android? - Bloomsburg University of …facstaff.bloomu.edu/dcoles/345/docs/what_is.pdfA mature open-source kernel in widespread use. Trusted by corporations and security experts

Popularity in 2017

● 1,000,000 new users every day

● 1,000,000,000 active users daily

● 2,000,000,000 active users monthly

● 87.5% of global smartphone market share

● Largest installed base of any mobile platform