4. Android S/W Stack - Linux Kernel
īŦ Android Runs on Linux
âĸAndroid is based on the Linux kernel
âĸ Android is not Linux
âĸ No native windowing system
âĸ No glibc
âĸ Does not include full set of standard linux utilities
âĸ Kernel source at http://git.android.com
īŦ Providing an abstraction layer between the H/W and the rest of the S/W stack
īŦ Relying on Linux Kernel 2.6 for core system services and uses only "Kernel" portion in Linux
īŧ Memory and Process Management
īŧ Network Stack
īŧ Driver Model
īŧ Security
âĸ The supplied device drivers include Display, Camera, Keypad, WiFi, Flash Memory, Audio, and IPC
(inter-process communication).
âĸ Adb command opens linux shell
5. Why Linux kernel for Android ?
âĸGreat memory and process management
âĸGreat permissions based security model
âĸ Proven driver model
âĸSupport for shared libraries
âĸ Itâs already open source
6. Android S/W Stack - Linux Kernel (Cont)
Typical Directory Tree of Android
8. Android S/W Stack - Runtime
ī§ Core Libraries
īŧ Providing most of the functionality available in the core libraries of the
Java language APIs -
īData Structures
īUtilities
īFile Access
īNetwork Access
īGraphics
īEtc
9. Android S/W Stack - Runtime
ī§ Dalvik Virtual Machine
īŧ Providing environment on which every Android application runs
ī Each Android application runs in its own process, with its own instance of the Dalvik
VM.
ī Dalvik has been written so that a device can run multiple VMs efficiently.
īŧ Register-based virtual machine
īŧ Executing the Dalvik Executable (.dex) format
ī .dex format is optimized for minimal memory footprint.
ī Compilation
īŧ Relying on the Linux Kernel for:
ī Threading
ī Low-level memory management
ī§ executes dex code, which is translated
ī§ from Java byte code
ī§ 16bit, register based
ī§ cf. Java bytecode is 8bit, stack based
10. Android S/W Stack - Libraries
ī§ Including a set of C/C++ libraries used by components of the Android system
ī§ Exposed to developers through the Android application framework
ī§ Libc: Stucture c standard lib.
ī§ SSL: Secure Socket Layer
ī§ SGL: Underling 2D grapics engine
ī§ OpenGL|ES: 3D image engine
ī§ Media Framework: Core part of
Android multi-media â
MPEG4,H.264,MP3,AAC,AMR,JPG,P
NG
ī§ SQLite: Light wait relational Embedded
database
ī§ WebKit: Kernel of web browser
ī§ FreeType: Bitmap and Vector font
renderer
ī§ SufraceManager: Manage difference
windows for different applications
11. Android S/W Stack - Libraries
âĸ The media libraries are based on PacketVideoâs
(http://www.packetvideo.com/) OpenCORE. These libraries are
responsible for recording and playback of audio and video
formats.
âĸ A library called Surface Manager controls access to the display
system and supports 2D and 3D.
âĸ The WebKit library is responsible for browser support; it is the
same library that supports Google Chrome and Apple Inc.âs
Safari.
âĸ The FreeType library is responsible for font support.
âĸ SQLite (http://www.sqlite.org/) is a relational database that is
available on the device itself. SQLite is also an independent open
source effort for relational databases and not directly tied to
Android. You can acquire and use tools meant for SQLite for
Android databases as well.
12. Android S/W Stack - App Framework
ī§ Most of the application framework accesses these core libraries through the Dalvik VM, the
gateway to the Android Platform
ī§ An application can broadcast its capabilities so that other applications can reuse these
functionalities
View System Used to build an application, including lists, grids, text boxes, buttons, and embedded
web browser
Content Provider Enabling applications to access data from other
applications or to share their own data
Resource Manager Providing access to non-code resources (localized string, graphics, and layout files)
Notification Manager Enabling all applications to display customer alerts in the status bar
Activity Manager Managing the lifecycle of applications and providing
a common navigation backstack
18. Android S/W Stack - Application
ī§ Android provides a set of predefined core applications, which handles the phone basic features
ī§ These are replaceable applications
ī§ Examples :
īŧ Email Client
īŧ SMS Program
īŧ Calendar
īŧ Maps
īŧ Browser
īŧ Contacts
īŧ Etc
ī§ All applications are written using the Java language.
21. Software development
âĸDevelopment requirements
âĸ Java
âĸ Android SDK
âĸIDE and Tools
âĸAndroid SDK
īŧ Class Library
īŧ Developer Tools
īŧ Emulator and System Images
īŧ Documentation and Sample Code
âĸEclipse IDE + ADT (Android Development Tools)
īŧ Reduces Development and Testing Time
īŧ Makes User Interface-Creation easier
īŧ Makes Application Description Easier
22. Android SDK
īļandroid.jar Java archive file containing all of the Android SDK classes necessary to build
your application.
īļdocumention.html and docs directory The SDK documentation is provided locally and
on the Web. It's largely in the form of JavaDocs, making it easy to navigate the many
packages in the SDK. The documentation also includes a high-level Development Guide and
links to the broader Android community.
īļSamples directory The samples subdirectory contains full source code for a variety of
applications, including ApiDemo, which exercises many APIs. The sample application is a
great place to explore when starting Android application development.
īļTools directory Contains all of the command-line tools to build Android applications. The
most commonly employed and useful tool is the adbutility (Android Debug Bridge).
īļUsb_driverDirectory containing the necessary drivers to connect the development
environment to an Android-enabled device, such as the G1 or the Android Dev 1 unlocked
development phone. These files are only required for developers using the Windows
platform.
23. Android Tools
īļEmulator
īļAndroid applications may be run
on a real device or on the Android
Emulator, which ships with the
Android SDK.
īļâĸADB (Android Debug Bridge)
īļThe ADB utility lets you connect
to the phone itself and issue
rudimentary shell commands,
such as copying files to and from
the device
24. Advantages
īļBenefits
īŧOpen Platform/License Free
īŧRobust OS Kernel, Innovative Library Packages
īŧEase App. Development
īŧRapid Improvement
īļChallenges
īŧPerformance Consideration
īŧHard to Integrate for Vendors
īŧToo Much Google Dependent
īļKey Factor: Market Response