A deep dive into Android OpenSource Project(AOSP)

SijiSunny 1,947 views 20 slides Jun 22, 2015
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

A deep dive into Android openSource project presented at
International Centre for Free and Open Source Software (ICFOSS), Kerala's OpenSource Mobile Computing Conference


Slide Content

Mobile & Embedded Computing Lab
An deep dive into
Android Open Source Project
Siji Sunny
Director, MELabs
[email protected]
Mobile : +91 9820896398
www.melabs.in

www.melabs.in
History
● October 2003 - Android, Inc founded in California by Andy
Rubin, Rich Miner, Nick Sears and Chris White.
● The company's were to develop an advanced operating
system for digital cameras
● August 17, 2005 - Google acquired Android Inc.

● the team led by Rubin developed a mobile device platform
powered by the Linux kernel.
● October 22, 2008 - First Android device launched in the
market.
Ref: Wikipedia

History
www.melabs.in

● Source code available for download-Contains
- Kernel
- Native Libraries
- Android runtime
- Application Framework
● License -Android Open Source Project is the Apache
Software License, Version 2.0 (For userspace).
● Android originated by a group of companies - Open
Handset Alliance, led by Google.
● Freedom to implement your own device ?
- Google Apps are not open-source
- Vendor depended firmware/drivers
Concept- AOSP
Android Open-Source Project
www.melabs.in

www.melabs.in
Architecture

Applications & Framework
Binder IPC
Linux Kernel
Hardware Abstraction Layer
Media Player
Services
Camera Service
Other Services
Window manager
Activity Manager
Notification
Manager
Other Services
System Server
Media Server
Ref :http://s.android.com/devices/index.html
www.melabs.in

www.melabs.in
Binder-IPC
●Driver to facilitate inter-process communication (IPC)
●Allows high level framework APIs to interact with Android's
system services
●At the application framework level, all of this communication
is hidden from the developer
●High performance through shared memory

www.melabs.in
HAL
●User space C/C++ library layer
●Defines the interface that Android requires hardware
“drivers” to implement
●Separates the Android platform logic from the hardware
interface
Graphics Audio Camera Bluetooth
HARDWARE ABSTRATION LAYER

www.melabs.in
Native Libraries
●Bionic Libc
●Function Libraries (For standard calls)
●Native Servers (for UI/Video/Audios)
●Hardware Abstraction Libraries
WebkitMedia Framework Sqlite Bionic Libc
OpenGL|ES Audio Manager FreeType SSL
LIBRARIES

www.melabs.in
What is Bionic
●Custom libc implementation, optimized for embedded
use.
Why build a custom libc library?
●License: BSD License (Objective was to keep GPL out of
user-space)
●Size: will load in each process, so it needs to be small
●Fast: limited CPU power means we need to be fast
●Small size and fast code paths
●Very fast and small custom pthread implementation

www.melabs.in
Bionic -Disadvantage
●Doesn't support certain POSIX features
●Not compatible with Gnu Libc (glibc)
●All native code must be compiled against bionic

www.melabs.in
Dalvik Vm
● The software that runs the apps on Android devices
● It's fast, even on weak CPUs
● it will run on systems with little memory
● it will run in an energy-efficient way
● Provides application portability and runtime consistency
● Runs optimized file format (.dex) and Dalvik bytecode
● Java .class / .jar files converted to .dex at build time

Compiling & packaging
.java files
source code
.class file .dex file .apk file
Java compiler
javac
Dex compiler
(dx)
Packaging
(aapt)
www.melabs.in

www.melabs.in
Android Runtime
● Bootloader
● Kernel
● Init
● Android runtime Dalvik/Zygote
● System Server
● Activity Manager
● Launcher (Home)

www.me-labs.com
Zygote Service
(Started at boot)
Zygote Dalvik VM
Process 1
Shared Memory
VM 1
Application 1
Process 2
VM 2
Application 2
Process 3
VM 3
Application 3

www.melabs.in
Application Framework

www.melabs.in
Core Platform Services
● Services that are essential to the Android platform
● Behind the scenes - applications typically donʼt
access them directly

www.melabs.in
Core Platform Services
●Activity Manager
●Package Manager
●Window Manager
●Resource Manager
●Content Providers
●View System

www.melabs.in
Hardware Services
●Telephony Service
●Location Service
●Bluetooth Service
●WiFi Service
●USB Service
●Sensor Service

Twitter : siji_sunny
Gtalk : sijisunny
[email protected]
[email protected]
Thank You
www.melabs.in