7/29/2019 114399810 Android Report
1/21
Android
Operating System
BY
Nitin Ramchandani
Roll No:09BCE050
DEPARTMENT OF COMPUTER SCIENCE ANDENGINEERING
AHMEDABAD-382481
October 2011
7/29/2019 114399810 Android Report
2/21
Android
Operating System
Seminar
Submitted in partial fulfillment of the requirements
For the degree of
Bachelor of Technology in Computer Engineering
By
Nitin Ramchandani
Roll No: 09BCE050
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
AHMEDABAD-382481
October 2011
7/29/2019 114399810 Android Report
3/21
Certificate
This is to certify that the Seminar entitled "Android
Operating System" submitted by Student Nitin
Ramchandani (09BCE050), towards the partial fulfillmentof the requirements for the degree of Bachelor of
Technology in Computer Engineering of Nirma University
of Science and Technology, Ahmedabad is the record of
work carried out by him under my supervision and
guidance. In my opinion, the submitted work has reached
a level required for being accepted for examination. The
results embodied in this Seminar, to the best of my
knowledge, haven't been submitted to any otheruniversity or institution for award of any degree or
diploma.
Prof. Swati Jain Prof.
D. J. Patel
Assistant Professor
Professor and Head,
Dept. of Computer Science & Engg., Dept.
of Computer Science & Engg.,
Institute of Technology,
Institute of Technology,
Nirma University, Ahmedabad Nirma
University, Ahmedabad
Prof. Ankita Jain
Assistant Professor
Institute of Technology,
7/29/2019 114399810 Android Report
4/21
Nirma University, Ahmedabad
ACKNOWLEDGEMENT
I would like to acknowledge and extend my heartfelt gratitude to following personswho made the completion of this seminar presentation and report possible:
Prof. Vishal Parikh and Prof. Ankita Jain for his invaluable technical support andguidance throughout the completion of this seminar.
Prof. Swati Jain for her constant reminders and much needed motivation.
My batch mates for the help and inspiration they extended.
And, last but not the least to God almighty who made all this possible.
- Nitin Ramchandani
09BCE050
7/29/2019 114399810 Android Report
5/21
Abstract
Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. Android is a software platform and operating system for
mobile devices based on the Linux operating system and developed by Google and the Open
Handset Alliance. It allows developers to write managed code in a Java-like language that
utilizes Google-developed Java libraries, but does not support programs developed in native
code.
The unveiling of the Android platform on 5 November 2007 was announced with the
founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom
companies devoted to advancing open standards for mobile devices. When released in
2008, most of the Android platform will be made available under the Apache free-software
and open-source license.
7/29/2019 114399810 Android Report
6/21
CONTENTS
Certificate
Acknowledgement
Abstract
Table of Contents
Chapter 1 Introduction
1.1 General
1.2 History
1.3 Open Handset Alliance
1.4 Evolution of Android
Chapter 2 Android Architecture
2.1 Linux Kernel2.1.1 General2.1.2 Power management2.1.3 Binder
2.2 Libraries
2.2.1 Varoius Libraries2.2.2 Surface Manger2.2.3 Audio Manager
2.2.4 HAL(Hardware Abstraction Libraries)
2.3 Android RunTime2.3.1 Dalvik Virtual Machine2.3.2 Core Libraries
2.4 Application Framework
2.5 Applications
7/29/2019 114399810 Android Report
7/21
Chapter 3 Application Lifecycle
Chapter 4 Booting of Android
Chapter 5 Activity Cycle
Chapter 6 Difference Between Various Moblie O.S
6.1 Android and Apples iOS
6.2 Android and Nokias Symbian OS
6.3 Android and Windows Mobile OS
6.4 Android and BlackBerrys RIM OS
7/29/2019 114399810 Android Report
8/21
1. Introduction
1.1. What is Android?
A software platform and operating system for mobile devices
Based on the Linux kernel
Developed by Google and later the Open Handset Alliance (OHA)
Allows writing managed code in the Java language
Possibility to write applications in other languages and compiling it to nativecode.
At least 150,000 Application available in Android.
It run on java based and object- Oriented based application
1.2. History
Foundation
Android, Inc. was founded in Palo Alto, California, United States in October, 2003 byAndy
Rubin(co-founder ofDanger), Rich Miner (co-founder of Wildfire Communications, Inc.), Nick
Sears (once VP atT-Mobile), and Chris White (headed design and interface development
at WebTV) to develop, in Rubin's words "...smarter mobile devices that are more aware of its
owner's location and preferences". Despite the obvious past accomplishments of the
founders and early employees, Android Inc. operated secretly, revealing only that it was
working on software for mobile phones.
Google acquired Android Inc. in August 2005, making Android Inc. a wholly owned subsidiary
of Google Inc. Key employees of Android Inc., including Andy Rubin, Rich Miner and Chris
White, stayed at the company after the acquisition.
1.3.Open Handset Alliance
On November 5, 2007, the Open Handset Alliance, a consortium of several companies which
include Broadcom Corporation, Google,HTC,Intel, LG,Marvell Technology
http://en.wikipedia.org/wiki/Palo_Alto,_Californiahttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Danger_(company)http://en.wikipedia.org/wiki/Rich_Minerhttp://en.wikipedia.org/wiki/T-Mobile_USAhttp://en.wikipedia.org/wiki/T-Mobile_USAhttp://en.wikipedia.org/wiki/WebTVhttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Consortiumhttp://en.wikipedia.org/wiki/Broadcom_Corporationhttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/High_Tech_Computer_Corporationhttp://en.wikipedia.org/wiki/High_Tech_Computer_Corporationhttp://en.wikipedia.org/wiki/Intel_Corporationhttp://en.wikipedia.org/wiki/LG_Grouphttp://en.wikipedia.org/wiki/Marvell_Technology_Grouphttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Danger_(company)http://en.wikipedia.org/wiki/Rich_Minerhttp://en.wikipedia.org/wiki/T-Mobile_USAhttp://en.wikipedia.org/wiki/WebTVhttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Consortiumhttp://en.wikipedia.org/wiki/Broadcom_Corporationhttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/High_Tech_Computer_Corporationhttp://en.wikipedia.org/wiki/Intel_Corporationhttp://en.wikipedia.org/wiki/LG_Grouphttp://en.wikipedia.org/wiki/Marvell_Technology_Grouphttp://en.wikipedia.org/wiki/Palo_Alto,_California7/29/2019 114399810 Android Report
9/21
Group, Motorola, Nvidia, Qualcomm, Samsung Electronics,Sprint Nextel,T-Mobile andTexas
Instrumentsunveiled itself. The goal of the Open Handset Alliance is to develop open
standardsfor mobile devices.[12] On the same day, the Open Handset Alliance also unveiled
their first product, Android, a mobile device platformbuilt on the Linux kernel version 2.6.
On December 9, 2008, 14 new members joined, including ARM Holdings, Atheros
Communications, Asustek Computer Inc, Garmin Ltd, Huawei
Technologies, PacketVideo, Softbank, Sony Ericsson,Toshiba Corp, and Vodafone Group Plc.
1.4.Evolution Of Android
Each Android Version is named after a dessert in alphabetical order
Recent releases
2.3 Gingerbread refined the user interface, improved the soft keyboard and
copy/paste features, improved gaming performance, SIP support (VoIP calls), and
added support for Near Field Communication. Android 2.3 Gingerbread is the latest
Android version that is available to phones.
3.0 Honeycomb was a tablet-oriented release which supports larger screen devices
and introduces many new user interface features, and supports multicore processors
and hardware acceleration for graphics. The Honeycomb SDK has been released and
the first device featuring this version, the Motorola Xoom tablet, went on sale in
February 2011.
3.1 Honeycomb was announced at the 2011 Google I/O on 10 May 2011. One feature
focuses on allowing Honeycomb devices to directly transfer content from USB
devices.
3.2 Honeycomb released at July 15 2011, is "an incremental release that adds several
new capabilities for users and developers". Highlights include optimization for a
broader range of screen sizes; new "zoom-to-fill" screen compatibility mode;
http://en.wikipedia.org/wiki/Marvell_Technology_Grouphttp://en.wikipedia.org/wiki/Motorolahttp://en.wikipedia.org/wiki/Nvidiahttp://en.wikipedia.org/wiki/Qualcommhttp://en.wikipedia.org/wiki/Samsung_Electronicshttp://en.wikipedia.org/wiki/Sprint_Nextelhttp://en.wikipedia.org/wiki/Sprint_Nextelhttp://en.wikipedia.org/wiki/T-Mobilehttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Android_(operating_system)#cite_note-AndroidAnnouncement-11http://en.wikipedia.org/wiki/Platform_(computing)http://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/ARM_Holdingshttp://en.wikipedia.org/wiki/Atheros_Communicationshttp://en.wikipedia.org/wiki/Atheros_Communicationshttp://en.wikipedia.org/wiki/Asustekhttp://en.wikipedia.org/wiki/Garminhttp://en.wikipedia.org/wiki/Huawei_Technologieshttp://en.wikipedia.org/wiki/Huawei_Technologieshttp://en.wikipedia.org/wiki/PacketVideohttp://en.wikipedia.org/wiki/Softbankhttp://en.wikipedia.org/wiki/Sony_Ericssonhttp://en.wikipedia.org/wiki/Toshibahttp://en.wikipedia.org/wiki/Vodafonehttp://en.wikipedia.org/wiki/Vodafonehttp://en.wikipedia.org/wiki/SIPhttp://en.wikipedia.org/wiki/VoIPhttp://en.wikipedia.org/wiki/Near_Field_Communicationhttp://en.wikipedia.org/wiki/Motorola_Xoomhttp://en.wikipedia.org/wiki/Google_I/Ohttp://en.wikipedia.org/wiki/Marvell_Technology_Grouphttp://en.wikipedia.org/wiki/Motorolahttp://en.wikipedia.org/wiki/Nvidiahttp://en.wikipedia.org/wiki/Qualcommhttp://en.wikipedia.org/wiki/Samsung_Electronicshttp://en.wikipedia.org/wiki/Sprint_Nextelhttp://en.wikipedia.org/wiki/T-Mobilehttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Android_(operating_system)#cite_note-AndroidAnnouncement-11http://en.wikipedia.org/wiki/Platform_(computing)http://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/ARM_Holdingshttp://en.wikipedia.org/wiki/Atheros_Communicationshttp://en.wikipedia.org/wiki/Atheros_Communicationshttp://en.wikipedia.org/wiki/Asustekhttp://en.wikipedia.org/wiki/Garminhttp://en.wikipedia.org/wiki/Huawei_Technologieshttp://en.wikipedia.org/wiki/Huawei_Technologieshttp://en.wikipedia.org/wiki/PacketVideohttp://en.wikipedia.org/wiki/Softbankhttp://en.wikipedia.org/wiki/Sony_Ericssonhttp://en.wikipedia.org/wiki/Toshibahttp://en.wikipedia.org/wiki/Vodafonehttp://en.wikipedia.org/wiki/SIPhttp://en.wikipedia.org/wiki/VoIPhttp://en.wikipedia.org/wiki/Near_Field_Communicationhttp://en.wikipedia.org/wiki/Motorola_Xoomhttp://en.wikipedia.org/wiki/Google_I/O7/29/2019 114399810 Android Report
10/21
capability to load media files directly from the SD card; and an extended screen
support API, providing developers with more precise control over the UI. Android 3.2
Honeycomb is the latest Android version that is available to tablets.
2. Android Architetecture
2.1. Linux Kernel
2.1.1General
Android is built on LINUX kernel, but it is not the LINUX.
No native windowing system(X window system)
7/29/2019 114399810 Android Report
11/21
No glibc support
Does not support all set of standard GNU libraries
Why Linux Kernel?
Great memory and process management
Great permissions based security model
Proven driver model
Support for shared libraries
Its already open source
2.1.2 Power Management
Based on the standard Linux Power Management, Android has its own component.
Application uses user space library to inform the framework about itsconstrains..
Constraints are implemented using lock mechanism..
PARTIAL_WAKE_LOCK
CPU on, screen off, keyboard off
Cannot power down via power button
SCREEN_DIM_WAKE_LOCK
CPU on, screen dim, keyboard off
SCREEN_BRIGHT_WAKE_LOCK
CPU on, screen bright, keyboard off
FULL_WAKE_LOCK
CPU on, screen on, keyboard bright
2.1.3 Binder
Driver to facilitate inter-process communication between applications and services..
A pool of threads is associated to each application to process incoming IPC
The driver performs mapping off object between two processes
7/29/2019 114399810 Android Report
12/21
Binder uses an object reference as an address in a processs memory space
2.2.Libraries
2.2.1 Various Libraries
All the libraries are written in c/c++.
Media Libraries - based on PacketVideo's OpenCORE; the libraries support playbackand recording of many popular audio and video formats, as well as static image files,
including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
LibWebCore - a modern web browser engine which powers both the Android browserand an embeddable web view
SGL - the underlying 2D graphics engine
3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries useeither hardware 3D acceleration (where available) or the included, highly optimized3D software rasterizer
FreeType - bitmap and vector font rendering
SQLite - a powerful and lightweight relational database engine available to all
applications
2.2.2 Surface manager
Provides a system-wide surface composer to render all the surfaces in a framebuffer
Can combined 2D and 3D surfaces
Can use OpenGL ES and 2D hardware accelerator for its compositions
2.2.3 Audio Manager
Handle several types of devices (headphone, ear piece)
7/29/2019 114399810 Android Report
13/21
Redirects audio stream to the specified output
2.2.4 Hardware Abstraction Libraries
Defines the interface that Android requires hardware drivers to implement.
Set of standardized APIs the developer will have to implement
Available for all the components a manufacturer can integrate on its Android platform
2.3Android Runtime
2.3.1 Dalvik VM
Designed for embedded environment
Supports multiple VM processes
per device.
Highly CPU-optimized byte code
interpreter.
Uses run time memory very efficiently.
Run optimized file format(.dex) Dalvik bytecode.
Java .class/.jar are converted to .dex at build time.
2.3.2 Core Libraries
Android includes a set of core libraries that provides most of the functionalityavailable in the core libraries of the Java programming language
2.4 Application Framework
A Notification Manager that enables all applications to display custom alerts in thestatus bar
7/29/2019 114399810 Android Report
14/21
An Activity Manager that manages the lifecycle of applications and provides acommon navigation backstack
A rich and extensible set ofViews that can be used to build an application, includinglists, grids, text boxes, buttons, and even an embeddable web browser
Content Providers that enable applications to access data from other applications(such as Contacts), or to share their own data
A Resource Manager providing access to non-code resources such as localizedstrings, graphics, and layout files
2.5Applications
Built in and user apps
Can replace built in apps
3. Application Lifecycle
I. In android every application runs in their own process.
II. Processes are started or stopped as needed to run applicationcomponents.
III. A process may be killed to reclaim resources.
Video Demonstrating Application LifeCycle
http://developer.android.com/videos/index.html#v=fL6gSd4ugSI
http://developer.android.com/videos/index.html#v=fL6gSd4ugSIhttp://developer.android.com/videos/index.html#v=fL6gSd4ugSI7/29/2019 114399810 Android Report
15/21
4. Android Booting
Similar to most Linux-based systems at startup, the boot-loader loads theLinux kernel and starts the init process
Init starts Linux daemons, including:
USB Daemon (usbd) to manage USB connections
Android Debug Bridge (adbd) to manage ADB connections
Debugger Daemon (debuggerd) to manage debug processes requests (dumpmemory, etc.)
Radio Interface Layer Daemon (rild) to manage communication with the radio Initusbd
Init process starts the zygote process: A nascent process which initializes a Dalvik VM instance
Loads classes and listens on socket for requests to spawn VMs
Forks on request to create VM instances for managed processes
Copy-on-write to maximize re-use and minimize footprint
Init starts runtime process:
7/29/2019 114399810 Android Report
16/21
Initializes Service Manager the context manager for Binder that handles serviceregistration and lookup
Registers Service Manager as default context manager for Binder services
o Runtime process sends request for Zygote to start System Service
o Runtime process sends request for Zygote to start System Server
o Zygote forks a new VM instance for the System Service process and startsthe service
System Service starts the native system servers, including:
o Surface Flinger
o Audio Flinger
Native system servers register with Service Manager as IPC servicetargets:
System Service starts the Android managed services
Android managed Services register with Service Manager:
After system server loads all services, the system is ready
Each subsequent application is launched in it s own process
5. Activity Cycle
7/29/2019 114399810 Android Report
17/21
onCreate (Bundle):This is called when the activity first starts up.
onStart ( ): This indicates the activity is about to be displayed to the user.
onResume ( ):This is called when your activity can start interacting with the user.This is a good place to start animations and music.
onPause ( ):This runs when the activity is about to go into the background, usuallybecause another activity has been launched in front of it. This is where you shouldsave your programs persistent
state, such as a database record being edited.
onStop( ):This is called when your activity is no longer visible to the user and itwont be needed for a while. If memory is tight, onStop( ) may never be called (thesystem may simply terminate your process).
onRestart( ): If this method is called, it indicates your activity is being redisplayedto the user from a stopped state.
onDestroy( ):This is called right before your activity is destroyed. If memory istight, onDestroy( ) may never be called (the system may simply terminate your
process). onSaveInstanceState(Bundle): Android will call this method to allow the activity
to save per-instance state, such as a cursor position within a text field. Usually youwont need to override it because the default implementation saves the state for allyour user interfacecontrols automatically.
onRestoreInstanceState(Bundle):This is called when the activity is beingreinitialized from a state previously saved by the onSaveInstanceState( ) method.
The default implementation restores the state of your user interface.
Building Blocks Of an App
Activities
Activity is an User Interface Screen.
An application may have two or more activities to handle different phases ofprogram.
For e.g. opening page, menu page, etc
7/29/2019 114399810 Android Report
18/21
Activity is responsible for saving its own state so that it can be restored later as partof the application life cycle.
Intents
Intent is a mechanism for describing a specific action such as pick a photo.
Basically we register a activity to handle a Intent.
Content Provider
A content provideris a set of data wrapped up in a custom API to read and write it.This is the best way to share global data between applications.
Google provide content provider for contacts.
Services
A service is a task that runs in the background without the users direct interaction,
similar to a Unix daemon.
For e.g. we can have Music player program playing in background even if we arebrowsing other programs.
6.Difference between Various Mobile O.S
6.1. Android v/s Apple
The Apple iPhone comes with an expansive set of applications,available for free or for a small fee; the Google Android comes witha smaller package of applications.
The Apple iPhone comes with a feature to alert the user of anymissed instances, though this feature forces the user toprematurely end whatever action he is performing; the GoogleAndroid comes with a drag and drop screen that alerts the user of
any occurrences ,but allows him to continue his actions.
Apple controls all of its hardware, and it is therefore simple toperform the necessary accessory maintenance; Googles Android issimply a platform that functions on different platforms, and doesntallow for easy accessory support.
6.2. Android v/s Symbian
7/29/2019 114399810 Android Report
19/21
Android is fairly new and has a smaller market share than the olderSymbian
Android is designed around touch capable devices while Symbian isdesigned around keypad devices
Symbian is somewhat outdated while Android is constantly updated
Android is used by many phone manufacturers while Symbian is
almost exclusive to Nokia.
6.3. Android v/s Windows Mobile
Windows Mobile is from Microsoft while Android was developed byGoogle.
Windows Mobile is proprietary while Android is open source.
Windows Mobile is relatively old and pretty established while theAndroid is pretty new.
There are a lot of phones that uses Windows Mobile while there areonly a handful running Android.
There are a lot more programs available for Windows Mobilecompared to Android.
6.4. Android v/s BlackBerry
Android smartphones are more apps-centered while BlackBerrysmartphones cater more to business.
BlackBerry has a good security system while the Androids is
questionable.
Android has plenty of apps that appeal to the geekier nature whileBlackBerry was created for the business people in the corporateworld.
BlackBerry was the pioneering smartphone. Android just followedthrough.
BlackBerry was first in email transferring while Android was the firstin customizing.
7/29/2019 114399810 Android Report
20/21
References
http://elinux.org/Android_Portal
http://www.androidenea.com/2009/08/init-process-and-initrc.html
http://developer.android.com/videos/index.html#v=Oq05KqjXTvs
Hello.Android.3rd.Edition.pdf
Android in Action 2nd Edition 2011.pdf
33_Printemps.pdf
The anatomy and philosophy of Android - Google I/O 2009 By J Vishwanath
http://www.thenewboston.com
http://www.mybringback.com
http://elinux.org/Android_Portalhttp://elinux.org/Android_Portalhttp://www.androidenea.com/2009/08/init-process-and-initrc.htmlhttp://www.androidenea.com/2009/08/init-process-and-initrc.htmlhttp://developer.android.com/videos/index.html#v=Oq05KqjXTvshttp://www.thenewboston.com/http://www.mybringback.com/http://elinux.org/Android_Portalhttp://www.androidenea.com/2009/08/init-process-and-initrc.htmlhttp://developer.android.com/videos/index.html#v=Oq05KqjXTvshttp://www.thenewboston.com/http://www.mybringback.com/7/29/2019 114399810 Android Report
21/21