android o/s - clemson universityyfeaste/855assignments/presentations/... · android o/s - history...
TRANSCRIPT
Android O/S
Shengying Liu Wenqian Tao Grant Trudel
Android O/S
• Grant : History, Features, Applications • Wenqian : Application Framework,
Hardware, Components • Shengying Liu :Libraries, Runtime, Kernel
Android O/S - HistoryAndroid, INC October 2003
Andy Rubin Rich Miner Nick Sears Chris White
Co-founder of Danger
Co-founder of Wildfire Communications
Once a VP at T-Mobile
WebTV head of design and interface development
Android
Android O/S - History
To develop “smarter mobile devices that are more aware of its owner's location and preferences” (Andy Rubin)
Digital Cameras
Smartphones
`
$10,000
Steve Perlman
Android O/S - History
August 17, 2005
Android O/S - History
Android O/S - History
“Sooner”
InformationWeekSeptember 2007
Android O/S - History
• November 5, 2007
Open Handset Alliance
Android O/S
October 2008 HTC Dream
Android O/S - History
• 2010 – Nexus devices running Android • HTC + Google produce Nexus One • Nexus devices demonstrate latest Android
features
Android O/S - History
• March 13, 2013
Andy RubinSundar Pichai
Chrome O/S
Android O/S - HistoryMobile market share (Apr 10,
2013)
0.030.08
0.38
0.01
0.24
0.26
Android 4.1 (Jelly Bean)Android 4.0.x (ICS)Android 3.0-3.2 (Honeycomb)Android 2.3 (Gingerbread)Android 2.2 (Froyo)Android 2.1 (Éclair)
Source: http://www.nomtek.com/mobile-market-share-and-statistics-for-ios-android-and-other/
Android O/S - Features
• General • Connectivity • Media • Hardware Support • Other
Android O/S – FeaturesGeneral
• Messaging – SMS & MMS – Threaded text messaging – Android Cloud to Device Messaging (C2DM) – Google Cloud Messaging (GCM)
• Web browser – Based on Blink (previously WebKit)
layout engine – Chrome’s V8 JavaScript – Scores 100/100 on Acid3 test on version 4.0
Android O/S – FeaturesGeneral
• Voice based features • Multi-touch • Multitasking • Screen capture • Video calling • Multiple language support • Accessibility – Text to speech – Enhancements for those with hearing difficulties
Android O/S – FeaturesConnectivity
• Android supports:
GSM/EDGE Wi-Fi
Bluetooth LTE
CDMA EV-DO
UMTS NFC
IDEN WiMAX
Android O/S – FeaturesConnectivity
• Bluetooth – Voice dialing – Sending contacts – Sending files (OPP) – Accessing phone book (PBAP) – A2DP (multimedia audio streaming) – AVRCP (remote control audio/video) – Keyboard, mouse, and joystick
Android O/S – FeaturesConnectivity
• Tethering – Allows a phone to be used as a wireless or wired
Wi-Fi hotspot
Android O/S – FeaturesMedia
• Streaming media support – RTP/RTSP streaming – HTML progressive download (HTML5 <video> tag) – Adobe Flash streaming & HTTP dynamic
streaming (Flash plugin) – Apple HTTP Live Streaming (RealPlayer for
Android) since 3.0
Android O/S – FeaturesMedia
Android supports these audio / video / still media formats
WebM H.263 H.264 AAC HE-ACC
MPEG-4 SP AMR AMR-WB MP3 MIDI
Ogg Vorbis FLAC WAV JPEG PNG
GIF BMP WebP
Android O/S – FeaturesMedia – External Storage
• MicroSD slot – Can read FAT32, Ext3, Ext4 file system files
• Many devices use USB ‘A’ receptacle
File System Method of Reading
FAT32 Linux Kernel VFAT driver
Other 3rd
Android O/S – FeaturesHardware Support
• Still or video cameras • Touchscreens • GPS • Accelerometers – Measures g-force
• Gyroscopes – Measures orientation
• Barometers – Measures atmospheric pressure
Android O/S – FeaturesHardware Support
• Magnetometers –magnetization / magnetic fields
• Gaming controls • Proximity & pressure sensors • Thermometers • Accelerated 2D bit blits (combining bitmaps
into a single raster operator) • Accelerated 3D graphics
Android O/S - Applications
• Apps written in Java using Android SDK • SDK includes – Debugger – Software libraries – Emulator – Documentation – Sample code – Tutorials
Android O/S - Applications
• Official IDE is Eclipse using the Android Development Tools (ADT) plugin
• Also available: – a Native development Kit (for C/C++) – Google App Inventor (for novice programmers) – Various cross platform mobile web app
frameworks
Android O/S - Applications
• January 2014: Apache Cordova unveiled by Google – Framework for porting Chrome HTML 5 apps
wrapped in a native app shell • Google Play Store = the primary app store
installed on Android devices – Allows users to browse, download, and update
apps published by Google & 3rd party developers
Android O/S - Applications
Android O/S – Applications3rd Party Marketplace
• Amazon Appstore • GetJar • SlideMe • F-Droid – Only provide apps distributed under free & open
source licenses
Android Application Framework
Main Functions
Task & Activity & Process
Activity
contentProvider
Activity
service
Activity Activity
contentProvider
service
task
APK package APK package
process
processprocess
Activities are…• a concrete class in the API
• an encapsulation of a particular operation
• run in the process of the APK which install them
• managed as an activity stack
Tasks are…• more of a notion than an concrete API entity
• a collection of related Activities
• capable of spanning multiple processes
• associated with their own UI history stack
• what users on other platforms know as “applications”
• associated with their own UI history stack
Activity Managerstarting
running
pausedstopped
destroyed
onCreate()!onStart()!onRestoreInstanceState()!onResume()
onSaveInstanceState()!onPause()
onResume()
onSaveInstanceState() onStop()
onDestroy() or
<process killed>
<process killed>
3)onResume()!2)onStart()!1)onRestart()
System Libraries
Surface Manager
Graphics Libraries
Media Framework
Free Type
Main Functions
SSL
SQLite
WebKit
(Open GL|ES, SGL) are two core graphics libraries
contains all of the codecs that are required for multimedia experience
used for display management
used to render the fonts
used for internet security
provide database support
opensource browser engine
Libraries Overview
• Type: C/C++ standard library • Platform: x86, x86-64, ARM, ARM64, MIPS, MIPS64 • GOAL: light weight, abandon the trivia features of standard library • Features: small size, faster speed • Implementation: Java Native Interface(JNI) Android Native
Development Kit (NDK)
JNI General Workflow
Android NDK Application
Android is not LinuxWindowing system :!! X11! ! GTK!! ! Pango!!Graphic :!! Cairo! ! ! ! Skia!!GNU C :!! glibc ! ! ! ! Bionic!!Multimedia :!! ALSA,ffmpeg!! ! ! ! opencore
Android = Android Runtime + Linux Kernel
Linux Device Driver
Memory!Manager
Process!Manager
Androidism Driver
Logger
Binder
Alarm
Low Memory Killer
Other
Linux Kernel
HAL Application!Component UI
Java Runtime Framework
Dalvik Virtual Machine
C/C++ Runtime Framework
Android Runtime
…
Logger
log_main!! ! Any events!!
log_events!! ! System hardware events!!
log_radio!! ! Wireless events!!
log_system!! ! System software events
Access the logs of the system and app.
BinderWhat is Binder?
Process 1 Process 2!
Activity Service!
OR
Binder
Client Service User Space
Kernel Space
Service !Manager
Binder Driver!/dev/binder
Application
System
open ioctl open ioctlopen ioctl
IPC
Binder
Service Service Manager
String void*… …… …… …
Service ListRegister
User ProcessService manager proxy Service Address
get service manager proxy
ServiceManagerProxy.GetService()
Service proxy
Binder
Binder Entity
BpBinder
HAL(Hardware Abstract Layer)
A Good Example
Android HALWhat is HAL?
An abstract layer that capsulated the kernel drivers !and provides API to the upper layer.
Framework & Applications
External Libraries & Runtime
Linux Device Driver
HAL (libhardware)
Sensor!Stub! Stub! Stub!
HAL (libhardware)
User Space
Kernel Space
Apache License!!Control the parameters and processes
GNU License!!Hardware access logic
Dalvik Virtual Machine
Java Virtual Machine Dalvik Virtual Machine
Instruction Set Java Bytecode!(Stack Based)
Dalvik Bytecode!(Memory Based)
File Format .class file!(one file,one class)
.dex file!(one file,many classes)
Java Virtual Machine VS Dalvik Virtual Machine
Thank you !