Chapter 1MAD
Chapter 1MAD
Introduction to Android
Operating System
1.1 History of Android
• Android Incorporation (Android, Inc ) is founded
in Polo Alto of California US, in 2003
• Developed by Andy Rubin, Rich Miner, Nick
Sears and Chris White
• It was acquired by Google Incorporation in 2005.
• The beta version of Android OS was released on
November 5, 2007
• The first Android mobile was publicly released
with Android 1.0 of the T-Mobile G1 (aka HTC
Dream) in October 2008.
What is Android?
What is OHA?
Android Ecosystem
• Ecosystem refers to the inter-dependence between
demand and supply.
• In the Android ecosystem this translates to inter-
dependence between users, developers, and
equipment makers.
• One cannot exist without the other.
– Users buy devices and applications
– Equipment makers sell devices, sometimes bundled
with applications
– Developers buy devices, then make and sell applications
1.2 Why Android?/ Need of Android
Features of Android
Sr.No Feature & Description
1 Beautiful UI
Android OS basic screen provides a beautiful and intuitive
user interface.
2 Connectivity
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi,
LTE, NFC and WiMAX.
3 Storage
SQLite, a lightweight relational database, is used for data
storage purposes.
4 Media support
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC
5.1, MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP.
5 Messaging
SMS and MMS
Features of Android
Sr.No Feature & Description
6 Web browser
Based on the open-source WebKit layout engine, coupled
with Chrome's V8 JavaScript engine supporting HTML5 and
CSS3.
7 Multi-touch
Android has native support for multi-touch which was initially
made available in handsets such as the HTC Hero.
8 Multi-tasking
User can jump from one task to another and same time
various application can run simultaneously.
9 Resizable widgets
Widgets are resizable, so users can expand them to show
more content or shrink them to save space.
Features of Android
Sr.No Feature & Description
10 Multi-Language
Supports single direction and bi-directional text.
12 Wi-Fi Direct
A technology that lets apps discover and pair directly, over a
high-bandwidth peer-to-peer connection.
13 Android Beam
A popular NFC-based technology that lets users instantly
share, just by touching two NFC-enabled phones together.
1.3 Tools and software required for developing
an Android Application
• The android developer tools allows us to create interactive and
powerful application for android platform.
• The tools can be generally categorized into two types.
1) SDK tools 2)Platform tools
SDK tools : Android SDK stands for Android Software
Development Kit which is developed by Google for Android
Platform.SDK tools are essential for Developing Android
Applications. It is platform independent i.e. it is compatible with all
operating systems such as Windows, Linux, macOS, etc.
• The list of SDK tools has been given below −
– android
– DDMS
– Emulator
– sqlite3, etc.
• Three important tools are android, DDMS and sqlite3.
1. Android:
– Android is a development tool that lets you perform these tasks:
• Manage Android Virtual Devices (AVD)
• Create and update Android projects
• Update sdk with new platform add-ons and documentation
2. DDMS :
– DDMS stands for Dalvik Debug Monitor Server. Able to monitor
operations in the emulator as well as real devices. Provides many
services on the device. The service could include message
formation, call spoofing, capturing screenshot, exploring internal
threads and file systems etc.
– To run DDMS From Android studio click on
Tools>Android>Android device Monitor.
3. Sqlite3:
– Sqlite3 is a command line program which is used to manage the
SQLite databases created by Android applications.
– The tool also allows us to execute the SQL statements on the fly.
Platform tools :
• It includes tools that interface with the Android platform,
primarily adb and fastboot.
• It will show the error messages while working on project. It is specifically
used for testing.
• It includes:
– Android Debug Bridge (ADB), is a command-line tool that helps to
communicate with the device. It allows us to perform an action such as
Installing App and Debugging App etc.
– Fastboot allows you to flash a device with a new system image.
– Systrace tools help to collect and inspect timing information. It is very
crucial for App Debugging.
• Each update of the platform tools is backward compatible with older
platforms.
• Some of the platform tools are listd below −
– Android Debug bridge (ADB)
– Android Interface definition language (AIDL)
– aapt, dexdump and dex etc.
1.4 Android Architecture
• Android OS is a software stack of different layers, where
every layer is a group of several programs components.
• It includes operating system, middle ware and important
applications.
• Android architecture or Android software stack is
categorized into five parts:
1. Linux kernel
2. Libraries (middleware),
3. Android Runtime
4. Application Framework
5. Applications
Android Architecture
Android Architecture
1) Linux kernel
– The root component of the Android System is the Linux Kernel.
– It enables all of Android's functionality, and the entire android OS
is built on top of Linux Kernel
– Provides a level of abstraction between the device hardware and
upper layers of Android architecture.
– Linux kernel is responsible for device drivers, power management,
memory management, device management and resource access.
– This layer is the foundation of the Android Platform.
– It includes
1. all low level drivers for various hardware components
support.
2. Memory, process management, threading etc.
3. Network stack
4. Driver model
5. Security and more
• This consists of device drivers such as
1. Display driver
2. Camera driver
3. Bluetooth driver
4. Flash memory driver
5. Binder driver(IPC)
6. USB driver
7. Wifi driver
8. Keypad driver
9. Audio driver
10. Power management driver
2) Libraries (Native Libraries)
– This layer consists of a set of Libraries and Android
Runtime
– This layer is communicated through application
framework layer . The communication happens
through Java Native Interface (JNI) package.
– The Android component is built using native
codes and require native libraries, which are
written in C/C++ and most of the libraries are
open source libraries.
– Set of native libraries are WebKit, OpenGL,
FreeType, SQLite, Media, C runtime library (libc)
etc
– SQLite Library used for data storage and light in terms
of mobile memory footprints and task execution.
– WebKit Library mainly provides Web Browsing engine
and a lot more related features.
– The surface manager library is responsible for
rendering windows and drawing surfaces of various
apps on the screen.
– The media framework library provides media codecs
for audio and video.
– The OpenGL (Open Graphics Library) and
SGL(Scalable Graphics Library) are the graphics
libraries for 3D and 2D rendering, respectively.
– The FreeType Library is used for rendering font.
3)Android Runtime
– There are core libraries and DVM (Dalvik Virtual
Machine) responsible to run android application.
– DVM is like JVM but it is optimized for mobile
devices. It consumes less memory and provides
fast performance.
– Dalvik is a JIT (Just in time) compilation based
engine.
– The byte code generated by the Java compiler has
to be converted to .dex file by DVM, as it has its
own byte code. Also, multiple class files are
created as one .dex file
– In Android Java classes converted
into DEX bytecode. The DEX
bytecode format is translated to
native machine code via either ART
or the Dalvik runtimes.
– Here DEX bytecode is independent
of device architecture.
– The Dalvik VM enables every
Android application to run in its own
process, with its own instance of the
Dalvik virtual machine.
4)Application Framework
– The application framework built on top of the native
library layer provides us with Application
programming interface and higher-level services.
– Android framework includes Android API's such as UI
(User Interface), telephony, resources, locations,
Content Providers (data) and package managers.
– It provides a lot of classes and interfaces for android
application development.
– An application framework is a software library that
provides a fundamental structure to support the
development of applications for a specific
environment – gives a skeletal support to build an
application.
Android Architecture
– The Android framework includes the following key
services −
1. Activity Manager − Controls all aspects of the
application lifecycle and activity stack.
2. Content Providers − Allows applications to publish
and share data with other applications.
3. Resource Manager − Provides access to non-code
embedded resources such as strings, color settings
and user interface layouts.
4. Notifications Manager − Allows applications to
display alerts and notifications to the user.
5. View System − An extensible set of views used to
create application user interfaces.
5)Applications
– All applications in the application layer are written using
Java language.
– The various core applications that an android device
provides include
• Email client
• SMS program
• Maps
• Browser
• Calender
• contacts
– All applications are using android framework that uses
android runtime and libraries. Android runtime and native
libraries are using linux kernal.