Android OS Google's Mobile Device Operating System.
-
Upload
conor-teesdale -
Category
Documents
-
view
222 -
download
0
Transcript of Android OS Google's Mobile Device Operating System.
![Page 1: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/1.jpg)
Android OS
Google's Mobile DeviceOperating System
![Page 2: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/2.jpg)
Intro & Overview
Steve Mance
![Page 3: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/3.jpg)
Agenda
• Intro/Overview• Hardware and IO• Kernel• Software Architecture• Programming Languages• Application Framework and Components• Future for mobile and non-mobile platforms
![Page 4: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/4.jpg)
Intro/Overview - What is Android?
• Operating System optimized for Mobile Devices
• Open Source
• Maintained by Google
• Based on the Linux kernel
![Page 5: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/5.jpg)
Intro/Overview - System Overview
![Page 6: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/6.jpg)
Intro/Overview - History
• Android Inc. founded 2003
• Purchased by Google from initial dveloper in 2005
• Version 2.0 released 2009o Starts to take hold in the Smartphone Market
• Version 3.0 released 2011
o Predominantly used in Tablets
![Page 7: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/7.jpg)
Intro/Overview - Features
• Appso The "Programs" of Androido Composed of application components
• Widgetso Provide information and tools directly on the Home
Screeno No need to launch an activity
• Marketplaceo A place for App distribution, run by Googleo Developers can sell their apps or give them away freelyo Third Party distributors also available
![Page 8: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/8.jpg)
Intro/Overview - Marketshare
![Page 9: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/9.jpg)
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)
![Page 10: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/10.jpg)
Intro/Overview - Relevant Devices
Phones:HTC Thunderbolt Motorola Droid/2/XHTC EvoSamsung Nexus S+Many More
Tablets:Motorola XoomSamsung Galaxy Tab 4GDell StreakAsus Eee-Pad Transformer+More
![Page 11: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/11.jpg)
Hardware and I/O
Dmitiry Lozovatskiy
![Page 12: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/12.jpg)
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.
![Page 13: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/13.jpg)
Kernel
Geoff Hetherington
![Page 14: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/14.jpg)
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
![Page 15: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/15.jpg)
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
![Page 16: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/16.jpg)
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
![Page 17: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/17.jpg)
Binder
• A tool for inter-process communication
• Binder driver manages synchronization between processes
• Facilitated using different stateso Receive blockedo Readyo Send blockedo Reply blocked
![Page 18: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/18.jpg)
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()
![Page 19: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/19.jpg)
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
![Page 20: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/20.jpg)
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
![Page 21: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/21.jpg)
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
![Page 22: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/22.jpg)
Software Architecture
Raanan Korinow
![Page 23: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/23.jpg)
System Libraries
• libc for C and C++o Why not glibc?
• libpthreado not 100% POSIX compliant
• Isn't Android programmed in Java?
• SDK vs NDK
![Page 24: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/24.jpg)
More Libraries
• SSL
• SQLite
• WebKit (and LibWebCore for embeddable webpages)
• Audio Manager
• Media Frameworko MediaPlayer
![Page 25: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/25.jpg)
Graphics Libraries
• Scalable Graphics Library (SGL- for 2D)
• OpenGL for Embedded Devices (for 3D)
• FreeType (vector and bitmap fonts)
• Surface Managero Composes 2D and 3D windows, widgets, apps, toolbars
and more using Surface Flingero Uses Binder IPC to get buffers from apps to put into
frames
![Page 26: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/26.jpg)
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
![Page 27: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/27.jpg)
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
![Page 28: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/28.jpg)
Reboot Bug (2008)
Android allowed a remote device to be controlled over serial portIf 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.
![Page 29: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/29.jpg)
Programming on Android
Jin Kim
![Page 30: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/30.jpg)
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
![Page 31: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/31.jpg)
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)
![Page 32: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/32.jpg)
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
o 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
![Page 33: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/33.jpg)
Steps for Developing Applications
6. Debug your application with the SDK debugging toolso Involves using a JDWP-compliant debugger along with
the tools provided with Android SDK. 7. Test your application with the Testing and Instrumentation framework
o The Android SDK provides a testing and instrumentation framework to help set up and run tests
![Page 34: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/34.jpg)
Support for Additional Languages
• In 2009, Google announced the Android Native Development Kit (NDK)o Allows developers to build Android software components
with C and C++
o Comes with limitations, however
o 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
![Page 35: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/35.jpg)
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
![Page 36: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/36.jpg)
Application Components
Jason Loewy
![Page 37: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/37.jpg)
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
![Page 38: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/38.jpg)
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.
![Page 39: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/39.jpg)
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)
![Page 40: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/40.jpg)
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
![Page 41: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/41.jpg)
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.
![Page 42: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/42.jpg)
Android's Future
Adam LaFave
![Page 43: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/43.jpg)
Growth
Android predicted to grow in market share:o 38.6% (#2) tablet OSes by 2015o 48.8% (#1) phone OSes by 2015
![Page 44: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/44.jpg)
Reasons for Growth
• Open Sourceo Many handset / tablet makers utilize this free OS (HTC,
Motorola, Samsung) Saturates the market with Android hardware on
multiple carrierso Free to develop on -- no overhead charge for developing
apps (iOS)
• Strong fan base
• Alternative to iOS-based devices
• It's Google
![Page 45: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/45.jpg)
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
![Page 46: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/46.jpg)
Mobile Growth Visualized
![Page 47: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/47.jpg)
Merger With Chrome OS
Eric Schmidt (ex-CEO):o The two efforts [Android and Chrome OS] will ultimately
converge.o "We're working overtime to get these technologies merged in
the right way."
What does this mean for Android?
![Page 48: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/48.jpg)
Merger With Chrome OS
Chrome OS heavily utilizes the cloud.o 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.
o Pictures, songs, videos, etc. may not need to be stored on the devices themselves -- instead pulled from the cloud when requested.
![Page 49: Android OS Google's Mobile Device Operating System.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649c995503460f94956824/html5/thumbnails/49.jpg)
References and Resources
http://elinux.org/Android_Kernel_Featureshttp://cs736-android.pbworks.com/w/page/5834465/ASHMEMhttp://elinux.org/Android_Logging_Systemhttp://developer.android.com/index.htmlhttp://developer.android.com/resources/articles/painless-threading.htmlhttp://android-developers.blogspot.com/2010/04/multitasking-android-way.htmlhttp://www.kroah.com/log/linux/android-kernel-problems.htmlhttp://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=1622614http://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.htmlhttp://arstechnica.com/open-source/news/2009/06/android-goes-beyond-java-gains-native-cc-dev-kit.arshttp://www.informationweek.com/news/internet/google/218700186