Date post: | 04-Apr-2018 |
Category: |
Documents |
Upload: | rajesh-gupta |
View: | 216 times |
Download: | 0 times |
of 27
7/30/2019 Android File
1/27
INTRODUCTION
World is contracting with the growth of mobile phone
technology. As the number of users is increasing day by day,facilities are also increasing. Starting with simple regular
handsets which were used just for making phone calls, mobiles
have changed our lives and have become part of it. Now they
are not used just for making calls but they have innumerable
uses and can be used as a Camera , Music player, Tablet PC,
T.V. , Web browser etc . And with the new technologies, new
software and operating systems are required.
Operating Systems have developed a lot in last 15 years.
Starting from black and white phones to recent smart phones
or mini computers, mobile OS has come far away. Especially for
smart phones, Mobile OS has greatly evolved from Palm OS in
1996 to Windows pocket PC in 2000 then to Blackberry OS andAndroid.
7/30/2019 Android File
2/27
Android is a Linux-based operating system designed primarily
for touchscreen mobile devices such as smartphones and tabletcomputers, developed by Google in conjunction with the Open
Handset Alliance. Initially developed by Android Inc, whom
Google financially backed and later purchased in 2005,Android
was unveiled in 2007 along with the founding of the Open
Handset Alliance, a consortium of 86 hardware, software, and
telecommunication companies devoted to advancing open
standards for mobile devices.
Google releases the Android code as open source, under the
Apache License .The Android Open Source Project (AOSP), led
by Google, is tasked with the maintenance and further
development of Android. Additionally, Android has a large
community of developers writing applications ("apps") that
extend the functionality of devices, written primarily in a
customized version of Java.They are available for download
through Google Play or third-party sites. In September 2012,
there were more than 675,000 apps available for Android, and
the estimated number of applications downloaded from Google
Play was 25 billion.
The first Android-powered phone was sold in October 2008 ,
and by the end of 2010 Android had become the world'sleading smartphone platform, overtaking Symbian which held
its record for years .It had a worldwide smartphone market
share of 68% at the second quarter of 2012,and as of Q3 2012,
7/30/2019 Android File
3/27
there were 500 million devices activated and 1.3 million
activations per day.
HISTORY
Android Inc. was founded in Palo Alto, California in October
2003 by Andy Rubin (co-founder of Danger), Rich Miner (co-
founder of Wildfire Communications, Inc.),Nick Sears (once VP
at T-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."
Google acquired Android Inc. on August 17, 2005, making it a
wholly owned subsidiary of Google. Key employees of Android
Inc., including Rubin, Miner and White, stayed at the company
after the acquisition .Not much was known about Android Inc.
at the time, but many assumed that Google was planning to
enter the mobile phone market with this move .At Google, theteam led by Rubin developed a mobile device platform
powered by the Linux kernel. Google marketed the platform to
handset makers and carriers on the promise 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 Journalnoted
7/30/2019 Android File
4/27
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 asGoogle was defining technical specifications, it was showing
prototypes to cell phone manufacturers and network
operators. In September 2007, InformationWeekcovered an
Evalueserve study reporting that Google had filed several
patent applications in the area of mobile telephony.
On November 5, 2007, the Open Handset Alliance, a
consortium of technology companies including Google, device
manufacturers such as HTC and Samsung, wireless carriers such
as Sprint Nextel and T-Mobile, and chipset makers such as
Qualcomm and Texas Instruments, unveiled itself, with a goal
to develop open standards for mobile devices. That day,
Android was unveiled as its first product, a mobile device
platform built on the Linux kernel version 2.6.The first
commercially available phone to run Android was the HTC
Dream, released on October 22, 2008.
In 2010, Google launched its Nexus series of devices - a line
smartphones and tablets running the Android operating
system, and built by a manufacturer partner. HTC collaborated
with Google to release the first Nexus smartphone , the Nexus
One, in early 2010. The series has since been updated with
newer devices, such as the Galaxy Nexus phone and Nexus 7
tablet , made by Samsung and Asus respectively. Google
releases the Nexus phones and tablets to act as their flagship
7/30/2019 Android File
5/27
Android devices, demonstrating Android's latest software and
hardware features.
ARCHITECTURE
Fig.1 : Android OS Architecture
The Android OS can be referred to as a software stack of
different layers, where each layer is a group of several program
components. Together it includes operating system,
middleware and important applications. Each layer in thearchitecture provides different services to the layer just above
it.
Linux Kernel
7/30/2019 Android File
6/27
The basic layer is the Linux kernel. The whole Android OS is
built on top of the Linux 2.6 Kernel with some further
architectural changes made by Google. It is this Linux that
interacts with the hardware and contains all the essentialhardware drivers. Drivers are programs that control and
communicate with the hardware. For example, consider the
Bluetooth function. All devices have a Bluetooth hardware in
them. Therefore the kernel must include a Bluetooth driver to
communicate with the Bluetooth hardware. The Linux kernel
also acts as an abstraction layer between the hardware and
other software layers. Android uses the Linux for all its corefunctionality such as Memory management, process
management, networking, security settings etc. As the Android
is built on a most popular and proven foundation, it made the
porting of Android to variety of hardware, a relatively painless
task.
Libraries
The next layer is the Androids native libraries. It is this layer
that enables the device to handle different types of data. These
libraries are written in c or c++ language and are specific for a
particular hardware.
Some of the important native libraries include the following:
Surface Manager: It is used for compositing window managerwith off-screen buffering. Off-screen buffering means you
cannot directly draw into the screen, but your drawings go to
the off-screen buffer. There it is combined with other drawings
7/30/2019 Android File
7/27
and form the final screen the user will see. This off screen
buffer is the reason behind the transparency of windows.
Media framework: Media framework provides different mediacodecs allowing the recording and playback of different media
formats.
SQLite : SQLite is the database engine used in android for datastorage purposes.
WebKit: It is the browser engine used to display HTML content.
OpenGL: Used to render 2D or 3D graphics content to thescreen.
Android Runtime
Android Runtime consists of Dalvik Virtual machine and Core
Java libraries.
Dalvik Virtual Machine:
It is a type of Java Virtual Machine(JVM) used in android
devices to run apps and is optimized for low processing power
and low memory environments. Unlike the JVM, the Dalvik
Virtual Machine doesnt run .class files, instead it runs .dex files.
.dex files are built from .class file at the time of compilation and
provides higher efficiency in low resource environments. TheDalvik VM allows multiple instance of Virtual machine to be
created simultaneously providing security, isolation, memory
management and threading support. It is developed by Dan
Bornstein of Google.
7/30/2019 Android File
8/27
Core Libraries:Android includes a set of core libraries that provides most of
the functionality.
Application Framework
These are the blocks that our applications directly interact with.
These programs manage the basic functions of phone like
resource management, voice call management etc.
Important blocks of Application framework are:
Activity Manager: Manages the activity life cycle ofapplications.
Content Providers: Manage the data sharing betweenapplications.
Telephony Manager: Manages all voice calls. We use telephony
manager if we want to access voice calls in our application.
Location Manager: Location management, using GPS or celltower.
Resource Manager: Manage the various types of resources weuse in our Application.
ApplicationsApplications are the top layer in the android architecture and
this is where our applications are going to fit. Several standard
applications come pre-installed with every device, such as:
7/30/2019 Android File
9/27
SMS client app Dialer Web browser Contact manager
As a developer we are able to write an app which replaces any
existing system app. That is, we are not limited in accessing any
particular feature. We are practically limitless and we can do
whatever we want to do with the android. Thus Android is
opening endless opportunities to the developer.
FEATURES
Handset layouts : The platform is adaptable to larger, VGA, 2D
graphics library, 3D graphics library based on OpenGL ES 2.0
specifications, and traditional smartphone layouts.
Storage: SQLite, a lightweight relational database, is used for
data storage purposes.
Connectivity : Android supports connectivity technologies
including GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth,
Wi-Fi, LTE, NFC and WiMAX.
Messaging : SMS and MMS are available forms of messaging,
including threaded text messaging and Android Cloud To DeviceMessaging (C2DM) and now enhanced version of C2DM,
Android Google Cloud Messaging (GCM) is also a part of
Android Push Messaging service.
7/30/2019 Android File
10/27
Multiple language support: Android supports multiple
languages.
Web browser:The web browser available in Android is based on
the open-source WebKit layout engine, coupled with Chrome's
V8 JavaScript engine. The browser scores 100/100 on the Acid3
test on Android 4.0.
Java support:While most Android applications are written in
Java, there is no Java Virtual Machine in the platform and Java
byte code is not executed. Java classes are compiled into Dalvikexecutables and run on Dalvik, a specialized virtual machine
designed specifically for Android and optimized for battery-
powered mobile devices with limited memory and CPU. J2ME
support can be provided via third-party applications.
Media support : Android supports the following
audio/video/still media formats: WebM , H.263, H.264, AAC,
HE-AAC (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB
(in 3GP container), MP3, MIDI, Ogg Vorbis, FLAC, WAV, JPEG,
PNG, GIF, BMP, WebP.
Additional hardware support: Android can use video/still
cameras, touchscreens, GPS, accelerometers, gyroscopes,barometers, magnetometers, dedicated gaming controls,
proximity and pressure sensors, thermometers, accelerated 2D
bit blits (with hardware orientation, scaling, pixel format
conversion) and accelerated 3D graphics.
7/30/2019 Android File
11/27
Multi-touch:Android has native support for multi-touch which
was initially made available in handsets such as the HTC Hero.
The feature was originally disabled at the kernel level . Google
has since released an update for the Nexus One and the
Motorola Droid which enables multi-touch natively.[9]
Bluetooth: Supports A2DP, AVRCP, sending files (OPP),
accessing the phone book (PBAP), voice dialing and sending
contacts between phones. Keyboard, mouse and joystick (HID)
support is available in Android 3.1+, and in earlier versions
through manufacturer customizations and third-party
applications.
Video calling:Android does not support native video calling, but
some handsets have a customized version of the operating
system that supports it, either via the UMTS network (like the
Samsung Galaxy S) or over IP. Video calling through Google Talkis available in Android 2.3.4 and later. Gingerbread allows
Nexus S to place Internet calls with a SIP account. This allows
for enhanced VoIP dialing to other SIP accounts and even
phone numbers. Skype 2.1 offers video calling in Android 2.3,
including front camera support. Users with the Google+
android app can video chat with other google+ users throughhangouts.
Multitasking:Multitasking of applications, with unique handling
of memory allocation, is available.
http://en.wikipedia.org/wiki/List_of_features_in_Android#cite_note-8http://en.wikipedia.org/wiki/List_of_features_in_Android#cite_note-8http://en.wikipedia.org/wiki/List_of_features_in_Android#cite_note-8http://en.wikipedia.org/wiki/List_of_features_in_Android#cite_note-87/30/2019 Android File
12/27
Accessibility:Built in text to speech is provided by Talk back for
people with low or no vision. Enhancements for people with
hearing disabilities is available as is other aids.
Voice based features:Google search through voice has been
available since initial release.Voice actions for calling, texting,
navigation, etc. are supported on Android 2.2 onwards.As of
Android 4.1, Google has expanded Voice Actions with the ability
to talk back and read answers from Google's Knowledge Graph
when queried with specific commands.The ability to control
hardware has not yet been implemented.
Tethering:Android supports tethering, which allows a phone to
be used as a wireless/wired Wi-Fi hotspot. Before Android 2.2
this was supported by third-party applications or manufacturer
customizations.
Screen capture:Android supports capturing a screenshot by
pressing the power and volume-down buttons at the same
time.Prior to Android 4.0, the only methods of capturing a
screenshot were through manufacturer and third-party
customizations or otherwise by using a PC connection (DDMS
developer's tool). These alternative methods are still available
with the latest Android.
External storage:Most Android devices include microSD slot
and can read microSD cards formatted with FAT32, Ext3 or Ext4
file system. To allow use of high-capacity storage media such as
7/30/2019 Android File
13/27
USB flash drives and USB HDDs, many Android tablets also
include USB 'A' receptacle. Storage formatted with FAT32 is
handled by Linux Kernel VFAT driver, while 3rd party solutions
are required to handle other popular file systems such as NTFS,
HFS Plus and exFAT.
Android Versions
History
Android versions history involves the versions updates from 1.0
till date. Here is the list of different Android version with their
releasing date:-
1. Android 1.0 -Release Date: September 23, 2008
2. Android 1.1 -Release Date: February 9, 2009
3. Android 1.5 CupcakeRelease Date: April 30, 2009
4. Android 1.6 Donut -Release Date: September 15, 2009
5. Android 2.0/2.1 clairRelease Date: October 26, 2009
6. Android 2.2 FroyoRelease Date: May 20, 2010
7. Android 2.3 Gingerbread -Release Date: December 6, 2010
8. Android 3.0 Honeycomb -Release Date: February 22, 2011
9. Android 4.0 Ice Cream Sandwich-Release Date: October 19,2011
7/30/2019 Android File
14/27
10. Android 4.1 Jelly Bean -Release Date: July 9, 2012.
The pre-release versions of Android were dubbed Astro and
Bender, but these names could not ultimately be used fortrademark reasons. The most recent update to the Android OS
was Jelly Bean v4.1, which was announced in June 2012, and
was released into the Android Open Source Project on July 9,
2012.
Android 1.5 Cupcake
Cupcake was the first major overhaul of the Android OS .
Major Features:
Uploading videos to YouTube and pictures to Picasadirectly from the phone.
New widgets and folders that canpopulate the Home screens.
Bluetooth A2DP support. Ability to record and watch videos
through camcorder mode.
A new soft-keyboard with text-prediction.
Animated screen transitions.Android 1.6-Donut
Major Features:
7/30/2019 Android File
15/27
An integrated camera, camcorder, and gallery interface. Gallery now enables users to select
multiple photos for deletion.
Updated Voice Search, with fasterresponse and deeper integration with
native applications, including the
ability to dial contacts.
Updated search experience to allowsearching bookmarks, history,
contacts, and the web from the home screen.
Updated technology support for CDMA/EVDO, 802.1x,VPNs, and a text-to-speech engine.
Support for WVGA screen resolutions. Speed improvements in searching and camera
applications. Gesture framework and GestureBuilder development tool. Google free turn-by-turn navigation.
Android 2.0/1-Eclair
Major Features:
Optimized hardware speed Support for more screen sizes and resolutions New Browser UI and HTML5 support New Contacts List Microsoft Exchange support
7/30/2019 Android File
16/27
MotionEvent class enhanced to track multi-touch events Bluetooth 2.1 Improved Google Maps 3.1.2 Built in flash support for Camera Digital Zoom Live Wallpapers
Android 2.2-Froyo
Major Features:
Android OS speed, memory, and performanceoptimizations
Application speed improvements courtesy of JITimplementation
Integration of Chrome's V8 JavaScript engine into theBrowser application
Increased Microsoft Exchange support (security policies,auto-discovery, GAL look-up, calendar synchronization,
remote wipe) Improved application launcher with shortcuts to Phone
and Browser applications.
USB tethering and Wi-Fi hotspotfunctionality
Updated Market application withbatch and automatic update
features
Quick switching betweenmultiple keyboard languages and their dictionaries.
7/30/2019 Android File
17/27
Voice dialling and contact sharing over Bluetooth Browser can now display animated GIFs Support for installing applications to the expandable
memory Adobe Flash 10.1 supportAndroid 2.3-Gingerbread
Major Features:
Support for WebM video playback. Support for Near Field Communication
(NFC).
Multi touch software keyboard. Support for Extra Large screen sizes and
resolution.
Android 3.0-Honeycomb
Major Features:
Optimized tablet support with anew user interface.
3D desktop. Video chat and Gtalk support.
7/30/2019 Android File
18/27
Android 4.0-Ice Cream Sandwich
Major Features:
Refined, evolved UI. Home screen folders and favorites tray. Resizable widgets.
New lock screen actions. Quick responses for incoming calls. Swipe to dismiss notifications,tasks,and browser tabs.
Improved text-input and spell checking.
Powerful voice input engine. Live Effects for transforming video. Rich and versatile camera capabilities.
Android 4.1-Jelly Bean
Major Features:
Faster,smoother,more responsive. Enhanced accessibility. Resizable app widgets. Simplified task navigation.
7/30/2019 Android File
19/27
More support for different languages.
Improvements in text input. Transitions to Lights Out and Full Screen Modes. New types of remoteable views. Live wallpaper preview. Higher-resolution contact photos.
Android Application Life CycleIn Android, the applications are run as a separate
Linux process. So the application lifecycle is closely
related to the process lifecycle. The application
process lifecycle is handled by the system depending
on the current system memory state.
In case of low memory, the Android system kills some
less important process. The process importance is
decided depending on the state of the process
components.
7/30/2019 Android File
20/27
The process types depending on the importance areas follows :-
1. Foreground process:- A foreground process is theapplication process with which the user is currently
interacting. The process is considered to be
foreground if its Activity is at the top of the Activity
stack or its Service is executing callback functions like
onCreate(), onStart() or onDestroy() methods.
2. Visible Process:- A visible process is the processwhich has an Activity visible to the user (
3. Service Process:- Service process contains a Servicefor which startService method is called and the
service is running.
4. Background Process:- The background processdoes not have any visible activities to the user.
5. Empty Process:- Empty process is the one thatdoes not have any active application components.
These processes are kept on for caching purpose.
It is important that application developersunderstand lifecycle of the application process. Not
using these correctly can result in the system killing
the applications process while it is doing important
work.
7/30/2019 Android File
21/27
Multithreading in android
A Thread is a concurrentunit of execution .It is a light-weight
process.The "Main" Thread is created when the execution foran application starts. Typically, there are several others for
housekeeping. Multiple threads can exist within the same
process and share memory resources. Execution of thread is
fast as compared to process.
There are basically two main ways of having a Thread execute
application code:
1. Create a new class that extendsThread and overrideits run() method.
2.Create a new Threadinstance passing to it a Runnableobject.
In both cases, the start()method must be called to actuallyexecute the new Thread.
Advantages of Multi-Threading1. Threads sharethe process' resourcesbut are able to executeindependently.
2. Applications responsibilitiescan be separatedmain thread runs UI, and
slow tasks are sent to background threads.3. Threading provides an useful abstraction of concurrent
execution.
7/30/2019 Android File
22/27
4. A multithreaded program operates fasteron computersystems that have multiple CPUs.
Interaction between Android threads is accomplished using(a) a main thread Handler object and
(b) posting Runnableobjects to the main view.Permissions in Android
Android provides many types of permissions. Linux isolates
applications from each other and from the system. Android
gives each package a distinct Linux user ID. The identity remainsconstant for the duration of the package's life on that device.
Each application runs with a distinct system identity.There are
many permissions which are provided by Linux. This includes
reading or writing the user's private data , reading or writing
another application's files, performing network access, keeping
the device awake, etc.
Services Permission: Services includes calling and textingtypes permission. It could cost you money by using minutes or
sending text messages at your going rate. This would mostly be
used by a messaging or social media widget that communicates
on your behalf, like dialing back to someone who just sent you
a text. The widget could send a text message to a number that
would bill you for a text, or subscribe you to some servicewith a continuing monthly fee that is automatically billed to
your credit card. The kernel is solely responsible for sandboxing
applications from each other.
7/30/2019 Android File
23/27
Phone Call Permission :- Phone Call permission provides piracycontrols and authentication to a specific device. Phone call
permission includes the ability of the widget to read phone
state and identity. The widget can detect when you are on thephone, turn on a voice recorder, record your conversation, and
send the recorded data to someone else.
Network and internet Permission : This Network Permissioncreate or change either a Bluetooth or Wi-Fi network
connection. Full internet access will be necessary for anywidget that needs to transfer data onto or off the device, like
file synch and backup widgets. A video application might
connect to Bluetooth headphones. An audible text message
app might auto-connect to a Bluetooth headset.
Hardware Permission:- Hardware permission provides any
types of hardware permission like as camera, take pictures etc.A game or other widget can use phone vibration as feedback.
An email or text message widget can use the vibration for
notification. The risk is really limited.
System Tools Permission This includes a series of more
refined permissions that control some aspect of your phones
basic settings. The risk is that an approved widget could change
these settings without your interaction, and potentially prevent
you from observing a notification.
7/30/2019 Android File
24/27
Security in Android Operating System
Introduction
Android is a modern mobile platform that was designed to be
truly open. Android applications make use of advanced
hardware and software, as well as local and served data,
exposed through the platform to bring innovation and value to
consumers. To protect that value, the platform must offer an
application environment that ensures the security of users,
data, applications, the device, and the network.
Securing an open platform requires a robust security
architecture and rigorous security programs. Android was
designed with multi-layered security that provides the flexibility
required for an open platform, while providing protection for
all users of the platform.
Android was designed with developers in mind. Security
controls were designed to reduce the burden on developers.
Security-savvy developers can easily work with and rely on
flexible security controls. Developers less familiar with security
will be protected by safe defaults.
Android was designed with device users in mind. Users are
provided visibility into how applications work, and control over
those applications. This design includes the expectation that
attackers would attempt to perform common attacks, such as
social engineering attacks to convince device users to install
7/30/2019 Android File
25/27
malware, and attacks on third-party applications on Android.
Android was designed to both reduce the probability of these
attacks and greatly limit the impact of the attack in the event it
was successful.
Android Platform Security Architecture
Android seeks to be the most secure and usable operating
system for mobile platforms by re-purposing traditional
operating system security controls to:
Protect user data Protect system resources (including the network) Provide application isolation
To achieve these objectives, Android provides these key
security features:
Robust security at the OS level through the Linux kernel Mandatory application sandbox for all applications Secure interprocess communication Application signing Application-defined and user-granted permissions.
Advantages of Android Operating System1.Android can Run Multiple Apps at the Same Time.
2. Android keeps information visible on your homescreen.Android has is a customizable home screen
which keeps active widgets right at your fingertips,
always accessible and always visible without having
7/30/2019 Android File
26/27
to launch an application first.
3. Android has a better application market compare
to Apples App because Apples App store has over180,000 applications, while the Android Marketplace
has only just broken the 50,000 mark
4.Android gives you better notifications comparee toiPhone beacuse iPhone has some trouble with
notifications. Because its restricted to pop-up
notifications, it can only handle one at a time
6. Android is Hardware independent.
7. Android lets you install custom ROMs.
8. You can change your settings faster in Android.iPhone users are stuck digging around in the system
settings every time they want to use the internet or a
Bluetooth device. Android lets you use widgets to
manage your settings directly from your home
screen.
9. Android does Google and Social Integration but TheiPhone can do this only through use of third party
apps, and is nowhere near as seamless to use as the
Android alternative.
10. Android gives you more options to fit your
7/30/2019 Android File
27/27
budget. Of course these are lower end Android
devices, but they are still comparable in performance
to the iPhone 3GS.
11. Innovative products like the location-awareservices, location of a nearby convenience store etc.,
are some of the additive facilities in Android.