Android is becoming very popular these and mostly everyone is crazy about it. So today with the help of a simple diagram I am going to explain the architecture of Android. I think that there is no need to tell you all about the "Android" as everyone who knows about it should also know this simple definition of Android:
3. "Android is a software stack
for mobile devices that
includes an operating
system, middleware and
key applications."
OR
"Android is software
platform for mobile devices
based on the Linux
Operating System and
developed by Google and
the open Handset Alliance."
ANDROID……….What?
•Operating System :Operating System :
Linux Kernel 2.6Linux Kernel 2.6
•Emulator :Emulator :
On Mac, Windows, LinuxOn Mac, Windows, Linux
•Hardware Support :Hardware Support :
–GSM TelephonyGSM Telephony
–Bluetooth, Wi-Fi, 3GBluetooth, Wi-Fi, 3G
–Camera, GPS, CompassCamera, GPS, Compass
& Accelerometer& Accelerometer
6. Application Framework……
• All android have to follow this skeleton.
• Manage phone`s basic functions with set of services
& systems.
• Simplify the reuse of the components.
7. Libraries……
• Written in c, cpp & used by various system.
• Tell the device to handle the all kind of data &
exposed to Android Developer.
8. Libraries………
• Android Libc implementation :
Custom implementation, optimized for embedded
use
– BSD license
– Small size and fast code paths
– Very fast custom pthread implementation
– Built-in support for android-specific services
(system properties, log capabilities)
– Doesn't support some POSIIX features
9. Libraries…..
• Storage, Rendering, Multimedia :
– SQLite, a simple relational database management
system (No IIPC, single file)
– WebKit, an application framework that provides
foundation for building a web browser
– Media Framework, based on PacketVideo
openCORE platform (codec)
– Optimized 2D//3D graphic library based on
OpenGL ES
10. Libraries……..
• Surface Manager
Provides a system-wide surface "composer" to render all the
surfaces in a frame buffer.
– Can combined 2D and 3D surfaces
– Can use OpenGL ES and 2D hardware accelerator
for its compositions
11. Libraries……
• Audio Manager
Processes multiple audio streams into PCM audio out paths.
– Handle several types of devices (headphone, ear
piece, etc.)
– Redirects audio stream to the specified output
12. Libraries………
• Hardware abstraction library
Defines the interface that Android requires hardware
"drivers" to implement.
– Set of standardized APIIs the developer will have
to implement
– Available for all the components a manufacturer
can integrate on its Android platform
13. Android Runtime…….
• Set of core java libraries.
• Own instance of DVM for every Android application.
• .Dex executable file for optimized minimum memory.
14. Android Runtime……
• DVM
An interpreter-only virtual
machine (no JIT), register
based.
– Optimized for low memory
requirements
– Designed to allow multiple VM
instances to run at one
– Relying on underlying OS for
process isolation, memory
management and threading
support
– Executes Dalvik Executables (DEX)
files which are zipped into an
Android Package (APK)
15. Linux Kernel……
• Includes memory management programs, security
settings, power management software & several
drivers for hardware, file system access, networking
& inter-process-communication.
• Abstraction layer between hardware & rest of
software stack.
16. Linux Kernel……
• Power Management
– Application uses user space library to inform the
framework about its constraints.
– Constraints are implemented using lock
mechanism.
17. Linux Kernel……
• Blinder
Driver to facilitate inter-process communication between
applications and services.
– A pool of threads is associated to each application
to process incoming IIPC
– The driver performs mapping of object between
two processes
– Binder uses an object reference as an address in a
process's memory space
19. What can I do with Kernel…..?
• Apart from changing it whenever you want, you can overclock
or undervolt your kernel. Not all kernels will allow you to do
this. So be sure to check if it has OC/UV option.
Undervolting is when you tell the kernel to only
provide a tiny amount of power for the phone to
run. It does make your phone lag quite a lot, but
its ability to save battery is incredible. A phone
modified in this way with a custom kernel can
seriously go days without charging.
Alternatively, you can overclock a phone. This is
when the kernel outputs large amounts of power,
amounts higher than the phone usually uses. This
will eat through a battery extremely quickly,
overheating can cause you serious trouble.
20. Platform Initialization & Explanation
The bootloader loads the "kernel" and starts the
"Init" process. Then,
"Daemons" for handling low level hardware
interfaces are started up (USB, ADB,
debugger, radio). After that,
"Zygote", the initial Dalvik VM process is created, and
"Runtime" process initiates the "Service Manager", a
key element for "Binders"
and IPC communication.
"Runtime" process requests "Zygote" to start a new
instance of Dalvik for running the
"System Server"
The two first processes are able to handle graphic
and audio outputs
All the others android components are then started.
21. Android GUI Architecture
Android GUI is single-threaded, event-driven
and built on a library of nestable
components. The Android UI framework is
organized around the common Model-View-
Controller pattern.
The Model: The model represents data or
data container.
The View: The View is the portion of the
application responsible for rendering the
display, sending audio to speakers,
generating tactile feedback, and so on.
The Controller: The Controller is the portion
of an application that responds to external
actions: a keystroke, a screen tap, an
incoming call, etc. It is implemented as an
event queue.