Project Report: Android Operating System & Applications
Project Report: Android Operating System & Applications
The satisfaction that accompanies that the successful completion of any task
We are grateful to our project guide Mrs. Rajandeep Kaur for the guidance,
project.
We also thank our colleagues who have helped in successful completion of the
project.
INDEX
INTRODUCTION ....................................................................................................................................... 4
HISTORY .................................................................................................................................................. 5
Open Handset Alliance ....................................................................................................................... 6
Licensing ............................................................................................................................................. 6
Version History ................................................................................................................................... 7
FEATURES .............................................................................................................................................. 12
HARDWARE RUNNING ANDROID .......................................................................................................... 15
SOFTWARE DEVELOPMENT .................................................................................................................. 15
Software Development Kit ............................................................................................................... 15
Android Market ................................................................................................................................. 17
App Inventor for Android ................................................................................................................. 17
Android Developer Challenge .......................................................................................................... 18
Google Applications ......................................................................................................................... 18
Third Party Applications ................................................................................................................... 18
Mobile Gaming ................................................................................................................................. 19
Native Code ...................................................................................................................................... 19
Community-Based Firmware ............................................................................................................ 20
SECURITY ISSUES ................................................................................................................................... 21
MARKETING........................................................................................................................................... 22
Logos ................................................................................................................................................ 22
Typeface............................................................................................................................................ 22
Market Share .................................................................................................................................... 22
DETAILED DESCRIPTION OF THE TOPIC ................................................................................................. 24
Operation .......................................................................................................................................... 24
Architecture ...................................................................................................................................... 25
Developing Applications ................................................................................................................... 28
LINUX COMPATIBILITY .......................................................................................................................... 39
CLAIMED INFRINGEMENT OF COPYRIGHTS AND PATENTS .................................................................. 40
CONCLUSION AND FUTURE SCOPE ....................................................................................................... 41
QUESTIONNAIRE ................................................................................................................................... 42
BIBLIOGRAPHY ...................................................................................................................................... 43
INTRODUCTION
Android is an open-source software stack for mobile devices that includes an operating
system, middleware and key applications. Google Inc. purchased the initial developer of the
software, Android Inc., in 2005. Android's mobile operating system is based upon a modified
version of the Linux kernel. Google and other members of the Open Handset Alliance
collaborated on Android's development and release. The Android Open Source Project
(AOSP) is tasked with the maintenance and further development of Android.
Canalys reported that in Q4 2010 the Android operating system was the world's best-selling
smartphone platform, dethroning Nokia's Symbian from the 10-year top position. Jumping
from 23.5 percent, Android now represents 31.2 percent of the U.S smartphone market.
According to Gartner, Symbian is still slightly ahead on sales if some legacy non-Nokia
Symbian smartphones are included in the Q4 2010 figures.
Android has a large community of developers writing application programs ("apps") that
extend the functionality of the devices. There are currently over 150,000 apps available for
Android. Android Market is the online app store run by Google, though apps can also be
downloaded from third-party sites. Developers write primarily in the Java language,
controlling the device via Google-developed Java libraries.
The unveiling of the Android distribution on 5 November 2007 was announced with the
founding of the Open Handset Alliance, a consortium of 80 hardware, software, and telecom
companies devoted to advancing open standards for mobile devices. Google released most of
the Android code under the Apache License, a free software and open source license.
The Android open-source software stack consists of Java applications running on a Java-
based, object-oriented application framework on top of Java core libraries running on a
Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface
manager, OpenCore media framework, SQLite relational database management system,
OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and
Bionic libc. The Android operating system consists of 12 million lines of code including
3 million lines of XML, 2.8 million lines of C, 2.1 million lines of Java, and 1.75 million
lines of C++.
HISTORY
Android, Inc. was founded in Palo Alto, California, United States in October, 2003 by Andy
Rubin, Rich Miner, et al. to develop, in Rubin's words "...smarter mobile devices that are
more aware of its owner's location and preferences." Key employees involved in the founding
of Android Inc. include Andy Rubin, also the co-founder of Danger Inc., Andy McFadden,
who worked with Rubin at WebTV, and Chris White, who led the design and interface of
WebTV. Other crucial employees includes Richard Miner, a co-founder of Wildfire
Communications, Inc. and former vice-president of Technology and innovation at Orange,
and all those of whom brought considerable wireless industry experience to the company.
Despite the obvious past accomplishments of the founders and early employees, Android Inc.
operated secretively, admitting 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.
Not much was known about Android Inc. at the time of the acquisition so many assumed that
Google was planning to enter the mobile phone market with this move.
Development accelerates
At Google, the team led by Rubin developed a mobile device platform powered by the Linux
kernel. Google marketed the platform to handset makers and carriers on the premise of
providing a flexible, upgradable system. Google had lined up a series of hardware component
and software partners and signaled to carriers that it was open to various degrees of
cooperation on their part.
Speculation about Google's intention to enter the mobile communications market continued
to build through December 2006. Reports from the BBC and The Wall Street Journal noted
that Google wanted its search and applications on mobile phones and it was working hard to
deliver that. Print and online media outlets soon reported rumors that Google was developing
a Google-branded handset. Some speculated that as Google was defining technical
specifications, it was showing prototypes to cell phone manufacturers and network operators.
"Today's announcement is more ambitious than any single 'Google Phone' that the press has
been speculating about over the past few weeks. Our vision is that the powerful platform
we're unveiling will power thousands of different phone models."
On the November 5, 2007 the Open Handset Alliance, a group of several companies which
include Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group,
Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel, T-Mobile and Texas
Instruments unveiled itself. The goal of the Open Handset Alliance is to develop open
standards for mobile devices. On the same day, the Open Handset Alliance also unveiled their
first product, Android, a mobile device platform built on the Linux kernel version 2.6.
Licensing
With the exception of brief update periods, Android has been available under a free
software/open source license since 21 October 2008. Google published the entire source code
(including network and telephony stacks) under an Apache License. Google also keeps the
reviewed issues list publicly open for anyone to see and comment.
Even though the software is open-source, device manufacturers can not use Google's Android
trademark unless Google certifies that the device complies with their Compatibility
Definition Document (CDD). Devices must also meet this definition to be eligible to license
Google's closed-source applications, including Android Market.
In September 2010, Skyhook Wireless filed a lawsuit against Google in which they alleged
that Google had used the compatibility document to block Skyhook's mobile positioning
service (XPS) from Motorola's Android mobile devices. In December 2010 a judge denied
Skyhook's motion for preliminary injunction, saying that Google had not closed off the
possibility of accepting a revised version of Skyhook's XPS service, and that Motorola had
terminated their contract with Skyhook because Skyhook wanted to disable Google's location
data collection functions on Motorola's devices, which would have violated Motorola's
obligations to Google and its carriers.
Version History
Android has seen a number of updates since its original release. These updates to the base
operating system typically focus on fixing bugs as well as adding new features. Generally
each new version of the Android operating system is developed under a code name based on
a dessert item.
The multiple Home screen format was also introduced, which has basically remained in
every version of Android to follow this release. Widgets were also added, which gave
users easy access to information with a single tap of the finger.
This operating system initiated the following versions of Android named after a sweet
confection.
In this release, the camera was introduced with the capability to upload videos to Google
Picasa and video sites, such as YouTube. Additionally, this version of the Android operating
system contained the first copy and paste function in the web browser.
This version of the Android introduced new support for higher resolution screen displays.
The design of the operating system was simplified and included an updated Google search
function. This allowed users to easily search the device for apps, contacts, and Internet data.
It was in the Android 1.6 operating system that the Gesture Builder development application
was also added.
Android 2.0/2.1 (Éclair) – Launched in October of 2009
The release of Android 2.0/2.1 introduced improved typing functionality on the Motorola
Droid with auto-correction. This was accomplished by offering a significant improvement in
the keyboard functionality.
Support for HTML5 was also first introduced in 2.1 along with additional camera functions, a
new interface for the browser, and Bluetooth capability.
Android 2.2 (FroYo) – Launched in May of 2010
The release of this version of the Android marked the inception of the Nexus smartphones,
starting off with HTC Nexus One.
Additional features were added to the camera functionality. Other capabilities included
tethering via USB, new mobile hotspot functionality, support for Adobe Flash, and the ability
to use Android Market, which is now Google Play, to automatically update apps. The User
Interface was also upgraded to increase device performance.
The Android 2.3 operating system was launched on the second Nexus smartphone which was
produced by Samsung, Samsung Nexus S.
It was at this point that a few primary features were introduced such as support for Near Field
Communications (NFC), improvements in the User Interface which enhanced device
performance, Internet calling capability, and an enhanced keyboard for faster typing input.
2.3 also provided for enhanced screen resolution, as well as support for a front facing camera.
This version of the Android operating system marked the first operating system designed for
a tablet. It was this operating system that first introduced on-screen buttons for tap
functionality. The apps were also redesigned for better viewing on a larger screen, along with
the first web browser with multiple tab capability.
Multitasking was also improved, which made it no longer necessary to switch apps. Instead,
users could simply bring apps currently open to the front of the screen with a single tap of a
button.
In the final update of 3.0, support for Google Wallet was added in addition to a multi-core
processor, which increased performance and device efficiency.
Android 4.0 was released with significant improvements in the interface; the main one being
the removal of hardware buttons, replaced with onscreen buttons to continue what Android
3.0 started. The Android music player was also replaced with a new Google Music app.
Other new features introduced in this version of Android included management for apps
running in the background, swipe to dismiss notifications, Android Beam which is a secure
platform for sharing content, the new Roboto typeface, WiFi Direct, and the capability to
rearrange folders.
Android 4.1, 4.2, 4.3 (Jelly Bean) – Launched in June 2012, November 2012, July 2013
This version of the Android operating system offered a brand new interface, which provided
smoother and faster performance. Google Voice search was also improved in this version
with enhanced Accessibility options and support for Braille input.
The Android Beam sharing feature underwent an upgrade to include the option to easily
transfer videos and photos. Additionally, Google Now was introduced along with actionable
notification improvements to the Notification Center. Jelly Bean also offered new security
enhancements such, as Smart App updates and App encryption.
One of the most important updates to Android 4.4 Kit Kat is streamlined performance, named
Project Svelte. Svelte is Google’s attempt to lower the system requirements as opposed to
increasing them. Typically, when users go from an older version of an OS to a newer one, the
system requirements usually increase. Instead, the newest version of Android runs smoother,
faster, more efficient, and more responsively on devices with as little as one half GB of
RAM.
Also, with the new release of 4.4 is the introduction of new APIs, in an effort to help
developers make great apps that will run smoother and more responsively on more devices,
especially on the older devices with lower specs.
There is also a new built-in setting called Process Stats. In past versions of Android, users
could see exactly how much storage each app was using on their device. Process Stats is an
app that functions in a similar fashion by allowing users to see how much RAM the
individual applications are using, which gives users an accurate read on whether or not they
will be needing more RAM.
The upcoming version of Android is:
Android 5.0 "Lollipop" is a version of the Android mobile operating system developed
by Google. Unveiled on June 25, 2014, the operating system will be first made available in
November 2014 for selected devices that run distributions of Android that are serviced by
Google, including Nexus and Google Play edition devices.
FEATURES
1. Application Framework
It is extremely low-memory based virtual machine, which was designed especially for
Android to run on embedded systems and work well in low power situations. It is
also tuned to the CPU attributes. The Dalvik VM creates a special file format
(.DEX) that is created through build time post processing. Conversion between
Java classes and .DEX format is done by included “dx” tool.
3. Integrated Browser
Google made a right choice on choosing WebKit as open source web browser. They
added a two pass layout and frame flattening. Two pass layout loads a page without
waiting for blocking elements, such as external CSS or external JavaScript and
after a while renders again with all resources downloaded to the device. Frame
flattening converts founded frames into single one and loads into the browser.
These features increase speed and usability browsing the internet via mobile phone.
4. Optimized Graphics
5. SQLite
6. Handset Layouts
7. Data Storage
SQLite is used for structured data storage .SQLite is a powerful and lightweight
relational database engine available to all applications.
8. Connectivity
9. Messaging
SMS, MMS, and XMPP are available forms of messaging including threaded text
messaging.
Software written in Java can be compiled into Dalvik bytecodes and executed in the
Dalvik virtual machine, which is a specialized VM implementation designed for
mobile device use, although not technically a standard Java Virtual Machine.
Includes a device emulator, tools for debugging, memory and performance profiling, a
plugin for the Eclipse IDE. There are a number of hardware dependent features,
for instance, a huge media and connections support, GPS, improved support for
Camera and simply GSM telephony. A great work was done for the developers
to start work with Android using device emulator, tools for debugging and
plugin for Eclipse IDE.
HARDWARE RUNNING ANDROID
The Android OS can be used as an operating system for cellphones, netbooks and tablets,
including the Dell Streak, Samsung Galaxy Tab, TV and other devices. The first
commercially available phone to run the Android operating system was the HTC Dream,
released on 22 October 2008. In early 2010 Google collaborated with HTC to launch its
flagship Android device, the Nexus One. This was followed later in 2010 with the Samsung-
made Nexus S.
iOS and Android 2.2.1 Froyo may be setup to dual boot on a jailbroken iPhone or iPod Touch
with the help of iBoot and iDroid.
SOFTWARE DEVELOPMENT
The early feedback on developing applications for the Android platform was mixed. Issues
cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-
tracking system. (Google announced an issue tracker on 18 January 2008.) In December
2007, MergeLab mobile startup founder Adam MacBeth stated, "Functionality is not there, is
poorly documented or just doesn't work... It's clearly not ready for prime time." Despite this,
Android-targeted applications began to appear the week after the platform was announced.
The first publicly available application was the Snake game. The Android Dev Phone is a
SIM-unlocked and hardware-unlocked device that is designed for advanced developers.
While developers can use regular consumer devices purchased at retail to test and use their
applications, some developers may choose not to use a retail device, preferring an unlocked
or no-contract device.
The Android software development kit (SDK) includes a comprehensive set of development
tools. These include a debugger, libraries, a handset emulator (based on QEMU),
documentation, sample code, and tutorials. Currently supported development platforms
include computers running Linux (any modern desktop Linux distribution), Mac OS X 10.4.9
or later, Windows XP or later. The officially supported integrated development environment
(IDE) is Eclipse (currently 3.4, 3.5 or 3.6) using the Android Development Tools (ADT)
Plugin, though developers may use any text editor to edit Java and XML files then use
command line tools (Java Development Kit and Apache Ant are required) to create, build and
debug Android applications as well as control attached Android devices (e.g., triggering a
reboot, installing software package(s) remotely).
A preview release of the Android SDK was released on 12 November 2007. On 15 July 2008,
the Android Developer Challenge Team accidentally sent an email to all entrants in the
Android Developer Challenge announcing that a new release of the SDK was available in a
"private" download area. The email was intended for winners of the first round of the
Android Developer Challenge. The revelation that Google was supplying new SDK releases
to some developers and not others (and keeping this arrangement private) led to widely
reported frustration within the Android developer community at the time.
On 18 August 2008 the Android 0.9 SDK beta was released. This release provided an
updated and extended API, improved development tools and an updated design for the home
screen. Detailed instructions for upgrading are available to those already working with an
earlier release. On 23 September 2008 the Android 1.0 SDK (Release 1) was released.
According to the release notes, it included "mainly bug fixes, although some smaller features
were added." It also included several API changes from the 0.9 version. Multiple versions
have been released since.
Enhancements to Android's SDK go hand in hand with the overall Android platform
development. The SDK also supports older versions of the Android platform in case
developers wish to target their applications at older devices. Development tools are
downloadable components, so after one has downloaded the latest version and platform, older
platforms and tools can also be downloaded for compatibility testing.
Android applications are packaged in .apk format and stored under /data/app folder on the
Android OS (the folder is accessible to root user only for security reasons). APK package
contains .dex files (compiled byte code files called Dalvik executable), resource files, etc.
Android Market
Android Market is the online software store developed by Google for Android devices. An
application program ("app") called "Market" is preinstalled on most Android devices and
allows users to browse and download apps published by third-party developers, hosted on
Android Market. As of December 2010 there were about 200,000 games, applications and
widgets available on the Android Market, with an estimated 2.5 billion total downloads.
Only devices that comply with Google's compatibility requirements are allowed to preinstall
Google's closed-source Android Market app and access the Market. The Market filters the list
of applications presented by the Market app to those that are compatible with the user's
device, and developers may restrict their applications to particular carriers or countries for
business reasons.
Google announced the Android Market on 28 August 2008, and it was available to users on
22 October 2008. Support for paid applications was available from 13 February 2009 for US
and UK developers, with additional support from 29 countries on 30 September 2010. In
February 2011, the Android Market was made fully accessible on the web, allowing users to
browse and pick up applications using their PCs, send them to their mobile phone and make
comments on them. All this functionality was previously accessible only from mobile phone
devices.
Users can install apps directly using APK files, or from alternative app markets. Unlike
Apple, Google allows independent app stores to operate for Android.
On 12 July 2010 Google announced the availability of App Inventor for Android, a Web-
based visual development environment for novice programmers, based on MIT's Open
Blocks Java library and providing access to Android devices' GPS, accelerometer and
orientation data, phone functions, text messaging, speech-to-text conversion, contact data,
persistent storage, and Web services, initially including Amazon and Twitter. "We could only
have done this because Android’s architecture is so open," said the project director, MIT's
Hal Abelson. Under development for over a year, the block-editing tool has been taught to
non-majors in computer science at Harvard, MIT, Wellesley, and the University of San
Francisco, where Professor David Wolber developed an introductory computer science
course and tutorial book for non-computer science students based on App Inventor for
Android.
The Android Developer Challenge was a competition for the most innovative application for
Android. Google offered prizes totaling 10 million US dollars, distributed between ADC I
and ADC II. ADC I accepted submissions from 2 January to 14 April 2008. The 50 most
promising entries, announced on 12 May 2008, each received a $25,000 award to fund further
development. It ended in early September with the announcement of ten teams that received
$275,000 each, and ten teams that received $100,000 each. ADC II was announced on 27
May 2009. The first round of the ADC II closed on 6 October 2009. The first-round winners
of ADC II comprising the top 200 applications were announced on 5 November 2009. Voting
for the second round also opened on the same day and ended on November 25. Google
announced the top winners of ADC II on November 30, with SweetDreams, What the
Doodle!? and WaveSecure being nominated the overall winners of the challenge.
Google Applications
Google has also participated in the Android Market by offering several applications for its
services. These applications include Google Voice for the Google Voice service, Sky Map for
watching stars, Finance for their finance service, Maps Editor for their MyMaps service,
Places Directory for their Local Search, Google Goggles that searches by image, Gesture
Search for using finger-written letters and numbers to search the contents of the phone,
Google Translate, Google Shopper, Listen for podcasts and My Tracks, a jogging application.
In August 2010, Google launched "Voice Actions for Android," which allows users to search,
write messages, and initiate calls by voice.
With the growing number of Android handsets, there has also been an increased interest by
third party developers to port their applications to the Android operating system.
As of December 2010, the Android Marketplace had over 200,000 applications, with over 1
billion downloads. This is up from 70,000 in July 2010.
Obstacles to development include the fact that Android does not use established Java
standards, i.e. Java SE and ME. This prevents compatibility among Java applications written
for those platforms and those for the Android platform. Android only reuses the Java
language syntax, but does not provide the full-class libraries and APIs bundled with Java SE
or ME. However, there are multiple tools in the market from companies such as Myriad
Group and UpOnTek that provide J2ME to Android conversion services.
Mobile Gaming
Android had a huge showing at the 2011 Mobile World Congress in regards to smartphone
gaming, with many well established game developers showcasing Android games. The trend
in mobile gaming on smartphone devices is predicted to shrink the game specialist device
market, affecting devices such as the upcoming Next Generation Portable.
Native Code
Libraries written in C and other languages can be compiled to ARM native code and installed
using the Android Native Development Kit. Native classes can be called from Java code
running under the Dalvik VM using the System.loadLibrary call, which is part of the standard
Android Java classes.
Complete applications can be compiled and installed using traditional development tools. The
ADB debugger gives a root shell under the Android Emulator which allows native ARM code
to be uploaded and executed. ARM code can be compiled using GCC on a standard PC.
Running native code is complicated by the fact that Android uses a non-standard C library
(libc, known as Bionic). The underlying graphics device is available as a framebuffer at
/dev/graphics/fb0. The graphics library that Android uses to arbitrate and control access to
this device is called the Skia Graphics Library (SGL), and it has been released under an open
source license. Skia has backends for both win32 and UNIX, allowing the development of
cross-platform applications, and it is the graphics engine underlying the Google Chrome web
browser.
Community-Based Firmware
On 24 September 2009, Google issued a cease and desist letter to the modder Cyanogen,
citing issues with the re-distribution of Google's closed-source applications within the custom
firmware. Even though most of Android OS is open source, phones come packaged with
closed-source Google applications for functionality such as the application store and GPS
navigation. Google has asserted that these applications can only be provided through
approved distribution channels by licensed distributors. Cyanogen has complied with
Google's wishes and is continuing to distribute this mod without the proprietary software. He
has provided a method to back up licensed Google applications during the mod's install
process and restore them when it is complete.
SECURITY ISSUES
In March 2011, Google pulled 58 malicious apps from the Android Market, but not before the
58 apps were downloaded to around 260,000 devices. These apps were malicious applications
in the Android Market which contained trojans hidden in pirated versions of legitimate apps.
The malware (called DroidDream) exploited a bug which was present in versions of Android
older than 2.2.2. Android device manufacturers and carriers work in tandem to distribute
Android based updates and had not uniformly issued patches to their customers for the
DroidDream exploit, leaving users vulnerable. Google said the exploit allowed the apps to
gather device specific information, as well as personal information. Within days, Google
remotely wiped the apps from infected users and rolled out an update that would negate the
exploits that allowed the apps to view information. They also announced that they would be
resolving the issue to ensure that events like this did not occur again. Security firms such as
AVG and Symantec have released antivirus software for Android devices.
The Android logo was designed with the Droid font family made by Ascender Corporation.
Android Green is the color of the Android Robot that represents the Android operating
system. The print color is PMS 376C and the RGB color value in hexadecimal is #A4C639,
as specified by the Android Brand Guidelines.
Android logo
Typeface
The custom typeface of Android is called Norad, only used in the text logo.
Market Share
Research company Canalys estimated in Q2 2009 that Android had a 2.8% share of
worldwide smartphone shipments. By Q4 2010 this had grown to 33% of the market,
becoming the top-selling smartphone platform. This estimate includes the Tapas and OMS
variants of Android.
In February 2010 ComScore said the Android platform had 9.0% of the U.S. smartphone
market, as measured by current mobile subscribers. This figure was up from an earlier
estimate of 5.2% in November 2009. By the end of Q3 2010 Android's U.S. market share had
grown to 21.4 percent.
In May 2010, Android's first quarter U.S. sales surpassed that of the rival iPhone platform.
According to a report by the NPD group, Android achieved 25% smartphone sales in the US
market, up 8% from the December quarter. In the second quarter, Apple's iOS was up by
11%, indicating that Android is taking market share mainly from RIM, and still has to
compete with heavy consumer demand for new competitor offerings. Furthermore, analysts
pointed to advantages that Android has as a multi-channel, multi-carrier OS, which allowed it
to duplicate the quick success of Microsoft's Windows Mobile.
In early October 2010, Google added 20 countries to its list of approved submitters. By mid-
October, purchasing apps will be available in a total of 32 countries. For a complete list of
countries that are allowed to sell apps and those able to buy them see Android Market.
As of December 2010 Google said over 300,000 Android phones were being activated daily,
up from 100,000 per day in May 2010.
In February 2011, during the 2011 Mobile World Congress, Eric Schmidt announced that
Android has reached 350,000 activations per day.
Usage share
The Dalvik VM executes files in the Dalvik Executable (.dex) format which is
optimized for minimal memory footprint. The VM is register-based, and runs classes
compiled by a Java language compiler that have been transformed into the .dex format
by the included "dx" tool.The Dalvik VM relies on the Linux kernel for underlying
functionality such as threading and low-level memory management.
2. Linux Kernel
Android relies on Linux version 2.6 for core system services such as security, memory
management, process management, network stack, and driver model. The kernel also
acts as an abstraction layer between the hardware and the rest of the software stack.
Developers have full access to the same framework APIs used by the core applications.
The application architecture is designed to simplify the reuse of components; any
application can publish its capabilities and any other application may then make use of
those capabilities (subject to security constraints enforced by the framework). This
same mechanism allows components to be replaced by the user.Underlying all
applications is a set of services and systems.
Architecture
The following diagram shows the major components of the Android operating system.
Each section is described in more detail below.
Architecture Of Android
3. Linux Kernel
4. Libraries
In the next level there are a set of native libraries written in C/C++, which are
responsible for stable performance of various components. For example, Surface
Manager is responsible for composing different drawing surfaces on the mobile
screen. It manages the access for different processes to compose 2D and 3D graphic
layers.OpenGL ES and SGL make a core of graphic libraries and are used accordingly
for 3D and 2D hardware acceleration. Moreover, it is possible to use 2D and 3D
graphics in the same application in Android. The media framework was provided by
PacketVideo, one of the members of OHA. It gives libraries for a playback and
recording support for all the major media and static image files. FreeType libraries are
used to render all the bitmap and vector fonts. For data storage, Android uses SQLite.
As mentioned before, it is extra light rational management system, which locates a
single file for all operations related to database. WebKit, the same browser used by
Apples’ Safari, was modified by Android in order to fit better in a small size screens.
5. Android Runtime
At the same level there is Android Runtime, where the main component Dalvik
Virtual Machine is located. It was designed specifically for Android running in
limited environment, where the limited battery, CPU, memory and data storage are
the main issues. Android gives an integrated tool “dx”, which converts generated byte
code from .jar to .dex file, after this byte code becomes much more efficient to run on
the small processors.
6. Application Framework
The Activity Manager manages the life circle of the applications and provides a
common navigation back stack for applications, which are running in different
processes. The Package Manager keeps track of the applications, which are installed
in the device. The Windows Manager is Java programming language abstraction on
the top of lower level services that are provided by the Surface Manager.
The Telephony Manager contains of a set of API necessary for calling applications.
Content Providers was built for Android to share a data with other applications, for
instance, the contacts of people in the address book can be used in other applications
too. The Resource Manager is used to store localized strings, bitmaps, layout file
descriptions and other external partsof the application. The View System generates a
set of buttons and lists used in UI. Other components like Notification manager is
used to customize display alerts and other functions.
7. Application Layer
At the top of Android Architecture we have all the applications, which are used by the
final user. By installing different applications, the user can turn his mobile phone into
the unique, optimized and smart mobile phone. All applications are written using the
Java programming language.
Developing Applications
1. Activity
User interface component, which corresponds to one screen at time. It means that
for the simple application like Address Book, the developer should have one
activity for displaying contacts, another activity component for displaying more
detailed information of chosen name and etc.
2. Intent Receiver
Wakes up a predefined action through the external event. For example,for the
application like Email Inbox, the developer should have intent receiver and
register his code through XML to wake up an alarm notification, when the user
receives email.
3. Service
A task, which is done in the background. It means that the user can start an
application from the activity window and keep the service work, while browsing
other applications. For instance, he can browse Google Maps application while
holding a call or listening music while browsing other applications.
4. Content Provider
A component, which allows sharing some of the data with other processes and
applications. It is the best way to communicate the applications between each
other.Android will ship with a set of core applications including an email client,
SMS program, calendar, maps, browser, contacts, and others. All applications are
written using the Java programming language.
9. AndroidManifest.xml
The AndroidManifest.xml file is the control file that tells the system what to do with
all the top-level components (specifically activities, services, intent receivers, and
content providers described below) you've created. For instance, this is the "glue" that
actually specifies which Intents your Activities receive.
A developer should predefine and list all components, which he wants to use in the
specific AndroidManifest.xml file. It is a required file for all the applications and is
located in the root folder. It is possible to specify all global values for the package, all
the components and its classes used, intent filters, which describe where and when the
certain activity should start, permissions and instrumentation like security control
and testing.
In Android, every application runs in its own process, which gives better performance
in security, protected memory and other benefits. Therefore, Android is responsible to
run and shut down correctly these processes when it is needed.
It is important that application developers understand how different application
components (in particular Activity, Service, and BroadcastReceiver) impact the
lifetime of the application's process. Not using these components correctly can result
in the system killing the application's process while it is doing important work.
To determine which processes should be killed when low on memory, Android places
each process into an "importance hierarchy" based on the components running in
them and the state of those components. These process types are (in order of
importance).
1. A foreground process is one that is required for what the user is currently doing.
Various application components can cause its containing process to be considered
foreground in different ways. A process is considered to be in the foreground if
any of the following conditions hold:
i. It is running an Activity at the top of the screen that the user is
interacting with (its onResume() method has been called).
ii. It has a BroadcastReceiver that is currently running (its
BroadcastReceiver.onReceive() method is executing).
iii. It has a Service that is currently executing code in one of its
callbacks (Service.onCreate(), Service.onStart(), or
Service.onDestroy()).
There will only ever be a few such processes in the system, and these will only be
killed as a last resort if memory is so low that not even these processes can
continue to run. Generally, at this point, the device has reached a memory paging
state, so this action is required in order to keep the user interface responsive.
2. A visible process is one holding an Activity that is visible to the user on-screen
but not in the foreground (its onPause() method has been called). This may occur,
for example, if the foreground Activity is displayed as a dialog that allows the
previous Activity to be seen behind it. Such a process is considered extremely
important and will not be killed unless doing so is required to keep all foreground
processes running.
3. A service process is one holding a Service that has been started with the
startService() method. Though these processes are not directly visible to the user,
they are generally doing things that the user cares about (such as background mp3
playback or background network data upload or download), so the system will
always keep such processes running unless there is not enough memory to retain
all foreground and visible process.
4. A background process is one holding an Activity that is not currently visible to the
user (its onStop() method has been called). These processes have no direct impact
on the user experience. Provided they implement their Activity life-cycle correctly
(see Activity for more details), the system can kill such processes at any time to
reclaim memory for one of the three previous processes types. Usually there are
many of these processes running, so they are kept in an LRU list to ensure the
process that was most recently seen by the user is the last to be killed when
running low on memory.
5. An empty process is one that doesn't hold any active application components. The
only reason to keep such a process around is as a cache to improve startup time
the next time a component of its application needs to run. As such, the system will
often kill these processes in order to balance overall system resources between
these empty cached processes and the underlying kernel caches.
Flowchart Showing The Lifecycle Of An Activity
In the following example we will display a process flow from the Android
System point of view to get a clear idea how the applications behave. Let assume
t
h
e
Possible scenario: A user talks to his friend via mobile phone and he is asked to
browse the internet (a talk is hold for a moment), find a picture of him in his
Picasa Album, send it via Email back to his friend and resume a talk.
At this point, as a user holds a talk and opens a web browser, the system creates
a new process and new web browser activity is launched in it. Again, the state of
the last activity is saved (W):
After that, the user browses the internet, finds his picture in Picasa album and
saves it to particular folder. He does not close a web browser, instead he opens a
folder to find saved picture. The folder activity is launched in particular process:
At this point, the user finds his saved picture in the folder and he creates a
request to open an Email application. The last state F is saved. Now assume that
the mobile phone is out of the memory and there is no room to create a new
process for Email application. Therefore, Android looks to kill a process. It can
not destroy Folder process, as it was used previously and could be reused again,
so it kills Web Browser process as it is not useful anymore and locates a new
Email process instead:
The user opens Email application and sends a picture to his friend via email. Now he
wants to go back to the Talk application and to resume a talk to his friend. Because of
the previously saved states, this work is done fast and easily. In this example, Email
application is popped out and the user sees a previous Folder application:
Next, the user goes back to Web Browser application. Unfortunately, web browser
process was killed previously so the system has to kill another process (in our case it
is Email application process, which is not used anymore) in order to locate Web
Browser process and manage the stack memory:
and finally:
Now the user comes back to the Talk application and resumes his talk with his
friend.Because of the saved states, going back procedure is fast and useful, because it
remembers previous activities and its views.
This example shows, that it does not matter how many applications and processes are
active or how much available memory is left, Android it manages fast and without a
user interaction.
Developers have full access to the same framework APIs used by the core
applications. The application architecture is designed to simplify the reuse of
components; any application can publish its capabilities and any other application
may then make use of those capabilities (subject to security constraints enforced by
the framework). This same mechanism allows components to be replaced by the user.
1. A rich and extensible set of Views that can be used to build an application,
including lists, grids, text boxes, buttons, and even an embeddable web browser
2. Content Providers that enable applications to access data from other applications
(such as Contacts), or to share their own data
3. A Resource Manager, providing access to non-code resources such as localized
strings, graphics, and layout files
4. A Notification Manager that enables all applications to display custom alerts in
the status bar
5. An Activity Manager that manages the life cycle of applications and provides a
common navigation backstack
12. Library
LINUX COMPATIBILITY
Android's kernel was derived from Linux but has been tweaked by Google outside the main
Linux kernel tree.[145] Android does not have a native X Window System nor does it support
the full set of standard GNU libraries, and this makes it difficult to port existing GNU/Linux
applications or libraries to Android. However, support for the X Window System is possible.
Google no longer maintains the code they previously contributed to the Linux kernel as part
of their Android effort, creating a separate version or fork of Linux. This was due to a
disagreement about new features Google felt were necessary (some related to security of
mobile applications). The code which is no longer maintained was deleted in January 2010
from the Linux codebase.
Google announced in April 2010 that they will hire two employees to work with the Linux
kernel community.
However, as of January 2011, points of contention still exist between Google and the Linux
kernel team: Google tried to push upstream some Android-specific power management code
in 2009, which is still rejected today.
Furthermore, Greg Kroah-Hartman, the current Linux kernel maintainer for the -stable
branch, said in December 2010 that he was concerned that Google was no longer trying to get
their code changes included in mainstream Linux. Some Google Android developers hinted
that "the Android team was getting fed up with the process," because they were a small team
and had more urgent work to do on Android.
CLAIMED INFRINGEMENT OF COPYRIGHTS AND PATENTS
On 12 August 2010, Oracle, owner of Java since it acquired Sun Microsystems in April 2009,
sued Google over claimed infringement of copyrights and patents. The lawsuit claims that,
"In developing Android, Google knowingly, directly and repeatedly infringed Oracle's Java-
related intellectual property."
Specifically the patent infringement claim references seven patents including United States
Patent No. 5,966,702, entitled "Method And Apparatus For Preprocessing And Packaging
Class Files," and United States Patent No. 6,910,205, entitled "Interpreting Functions
Utilizing A Hybrid Of Virtual And Native Machine Instructions." It also references United
States Patent No. RE38,104, ("the '104 patent") entitled “Method And Apparatus For
Resolving Data References In Generated Code” authored by James Gosling, best known as
the father of the Java programming language.
In response Google submitted multiple lines of defense, saying that Android did not infringe
on Oracle's patents or copyright, that Oracle's patents were invalid, and several other
defenses. They said that Android is based on Apache Harmony, a clean room implementation
of the Java class libraries, and an independently developed virtual machine called Dalvik.
The Free Software Foundation has called this suit a "clear attack against someone's freedom
to use, share, modify, and redistribute software." However, the FSF also criticized Google,
saying that Google could have avoided the suit by building Android on top of IcedTea, whose
GPL license provides some protection against patents, instead of implementing it
independently under the Apache License. The FSF wrote "It's sad to see that Google
apparently shunned those protections in order to make proprietary software development
easier on Android." and remarked that Google had not taken any clear position or action
against software patents.
CONCLUSION AND FUTURE SCOPE
Android has been criticized for not being all open-source software despite what was
announced by Google. Parts of the SDK are proprietary and closed source, and some believe
this is so that Google can control the platform. Software installed by end-users must be
written in Java, and will not have access to lower level device APIs. This provides end-users
with less control over their phone's functionality than other free and open source phone
platforms, such as OpenMoko.
With all upcoming applications and mobile services Google Android is stepping into the next
level of Mobile Internet. Android participates in many of the successful open source projects.
That is, architect the solution for participation and the developers will not only come but will
play well together. This is notable contrast with Apple and other companies, where such
architecture of participation is clearly belated.
The first Android based official devices has been launched sometime in the early half of
2009. Obviously, it's an age away when it comes to handset design, and Android may well
find itself competing against the forthcoming Nokia touch screen phones and maybe even the
iPhone handsets.
QUESTIONNAIRE
4 Have you noticed that your Android device has slowed or experienced
an increase in abnormal behavior since the time of purchase?
6 Overall have you enjoyed your experience with your Android device?
7 Do you think KitKat is seeing a higher early adaption rate than Ice
cream, Sandwich and Jelly Bean?
10 Would you continue to use Android devices and its improved features
in coming years?
BIBLIOGRAPHY
http://www.itworld.com/google-android-dr-080213