2. Agenda
Introduction
Overview
Background
What is Android?
Features
Architecture
Technical Detail
Android SDK
Android Under the Hood
Developing Application
Porting Android to Real Target
Future of Android
3. A conceptual model for mobile software
Software Stack
Kernel
the core of the SW (HW drivers, memory,
filesystem, and process management)
Middleware
The set of peripheral software libraries
(messaging and communication engines,
WAP renders, codecs, etc)
Application Execution Environment
An application manager and set APIs
UI framework
A set of graphic components and an
interaction framework
Application Suite
The set of core handset application ( IDLE
screen, dialer, menu screen, contacts,
calendar, etc)
4. Mobile Platforms
Feature Phone
Vendor Platform : Mocha, PDK, WAVE, WISE, KX,
etc......
Carrier Platform : SKTelecom TPAK, NTT i-Mode
(WAP), Java, WIPI, BREW, etc……
3rd Party Solution : TAT Cascade, Qualcomm uiOne
Smart Phone
MicroSoft Windows Mobile
Nokia : Symbian, Series 60
Apple, iPhone – OSX 10.5 Leopard
Linux
6. Smartphone OS Market Share by Region
Smartphone OS market share by region, 2006
Source : Canalys
7. Current Linux Mobile Platforms
LiMo Foundation
https://www.limofoundation.org/sf/sfmain/do/home
TrollTech - Qtopia GreenPhone
OpenMoko : GNU/Linux based software development platform
http://www.openmoko.org , http://www.openmoko.com
Linux Kernel, GUI using X. Org Server, GTK+,Matchbox window manager
First Supported phone, Neo1973 (also support Qtopia)
ALP (Access Linux Platform)
http://alp.access-company.com/
Nokia N810 – Maemo
http://maemo.org/
Exploring the technical details of N810
http://arstechnica.com/journals/linux.ars/2007/10/22/looking-at-the-technical-
details-of-nokias-n810-internet-tablet-operating-system
MontaVista - Mobilinux
Google - OHA, Android OS
http://www.openhandsetalliance.com/
Android : A complete set of SW for mobile devices
Operation System, Middleware, and Key mobile applications
8. Access Linux Platform
Acquire PalmSource
Provide a complete SW
stack, encompassing
kernel, middleware,
Palm- Linux- based
application execution
environment
IBM-Licensed JVM and
Access’ Sun-licensed
JVM
MAX – from
PalmSource’s Rome
technology, optimised
version of GTK+
Question – what is the
end-game for DoCoMo?
(already uses the MOAP
layer)
9. MontaVista Mobilinux
Having been widely
used by Motorola,
NEC and Panasonic
Based on a 2.6
kernel with around
500 patches
Power Management
Reduced footprint
Faster system boot
Hard real-time cap.
Does not include
Radio stacks
Integrate with third
party SW,
Openwave’s Browser,
Trolltech Qtopia
Core, GTK+, Red
Bend
10. OpenMoko
Provide Real
Device
Neo 1973
2.8” VGA TFT
color display
Touchscreen
266MHz
Samsung SOC
2.5G GSM – tri
band
Bluetooth/Mic
ro SD/HQ
Free Open Source Software audio codec
Linux Kernel, GNU C, X, GTK+
It runs a full X server, X applications
11. Linux for mobile handsets
Benefits
Linux is designed to avoid single-vendor domination
The Linux kernel has been ported to more than a dozen
chipsets
Linux is cheap and open to innovation
Technically competent and cost-effective for converged
devices
Several governments (most notably China) support Linux
Challenges
The Linux kernel is optimised for desktop and embedded
Distribution lack the feature set requested by network
operators (except Vodafone?)
No consensus on Linux’s APIs
Mitigating legal challenges
12. What is Android?
is……
Android is
a software stack
for mobile devices
that includes an
operating system,
middleware
and key applications.
....
developing applications ...
using the Java programming language.
History
2001 search service for wireless device
2005
Acquire Android (Andy Rubin : Danger CEO, Development Sidekick)
Acquire Skia (2D Graphics for mobile device)
Acquire RegWireless (Browser and Email for mobile device)
Move Engineers from PalmSource (Dianne Hackborn, etc…)
2007.11 Android SDK Release, OHA
2008. 1H Android Developer Challenge
2008. 2H Android Phone
13. Features
Application Framework
Dalvik Virtual Machine
Integrated Browser
Optimized Graphics
SQLite
Media Support
GSM Telephony
Bluetooth, EDGE, 3G, and WiFi
Camera, GPS, compass, and accelerometer
Rich Development Environment
15. Linux Kernel
Linux version 2.6 for core system services
Security, Memory Management, Process Management,
network stack, driver model
Kernel : Abstraction Layer between the HW and the
rest of the SW stack
Android uses only “Kernel” portion in Linux
16. Android Runtime
Core Libraries
Provides the functionality of the Java Programming Language
Android Application runs in its own process, with its own
instance of the Dalvik virtual machine
Dalvik VM : Java based license free VM
Register based VM, optimization for low memory requirements
Executes files in the Dalvik Executable (.dex) format
DX tool converts classes to .dex format
Why Dalvik, Why Java?
Separate HW layer/ SW layer
Kernel is responsible for Security
Allow Multiple VM instance
To insure compatibility
Support different HWs (LCD, Keypad, …etc)
Avoid License Issues
17. Libraries
System C Library
BSD-derived implementation of the standard C system library (libc)
Media Libraries
PacketVideo’s OpenCORE : MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
Surface Manager
Manages access to the display subsystem
LibWebCore
WebKit : Web browser engine (Safari!)
SGL
2D Graphic Engine
3D libraries
OpenGL ES (cross-platform API for full-function 2D and 3D graphics on em
bedded systems)
FreeType
Bitmap and vector font (TTF,Type1,CIFF,PCF,BDF,....)
SQLite
Powerful, Lightweight R-DB (embedded/in-process SQL DB engine)
18. Application Framework
Developer have full access to the same
framework APIs used by the core applications
A set of services and systems
Views
Content Providers
Resource Manager
Notification Manager
Activity Manager
19. Applications
A set of core applications
Email, SMS, Calendar, Maps, Browser, Contacts, etc…
All Applications : Written using JAVA
Application Life Cycle : Only 4 processes – no task bar
Applications run in their own processes
Processes are started and stopped as needed to run an
application’s components
It is important that App. Developers understand how
different app. Components (Activity, Service,
IntentReceiver) impact the lifetime of the app. process
Android have “Importance Hierarchy”
Foreground, Visible, Service,Background,Empty Process
20. Architecture in detail
The Design goal of Android – Openness
Be as flexible as possible
How it handles access to data (Mashups on the internet and everything else)
Rapid development (XML, Java)
IPC/Data Sharing Method
AIDL (Android Interface Definition Language)
COM/CORBA like IDL ← Binder
SQLite
Content Provider
FileSystem
Dev Language?
App : Java
Framework : Java
Libraries : C/C++
OS & Driver : C
Creating Native C Applications
Possible, but not supported
22. Application Building Blocks
AndroidManifest.xml
XML file – Declare the components and what their
capabilities and requirements
There are four building blocks
Activity
UI component typically corresponding to one screen
Intent Receiver
Responds to notifications or status changes.
Can wake up your process
Service
Faceless task that run int the background
Content Provider
Enable applications to share data
23. Replacing & Reusing Components
Client Component makes a request for a
specific action (Ex. “Pick Photo” in Email)
System picks best component for that action
(Ex. Photo Gallery)
Components can be replaced any time (Ex.
Photo Gallery Picasa)
24. APIs
Location Manager
Application can register for notifications of current location
Can register for application specific Intents to be fired based on
proximity
XMPP Service
Allows any app to send device-to-device data messages to other
android users
Data Messages are Intents with name/value pairs
Works with any gmail account
Can also build servers to deliver server-to-device messages
Notification Manager
Applications can add notifications to status bar
Notification can have an associated action (Intent)
Views
Screen – responsible for drawing and event handling
Ex: Map, List, Web, …etc
26. Android SDK
Tools
Emulator : QEMU 0.8.2 + libSDL 1.2.12
Provide emulator console, telephony emulation, skins
DDMS (Dalvik Debug Monitor Service)
Thread/Heap/Process/Log Monitor
File Explorer
ADB Shell
Logcat, Android Log, Traceview
Samples/Docs
System and Software Requirements
Supported Operating Systems
Windows XP/Vista
Mac OS X 10.4.8 or later (x86 only)
Linux(tested on Linux Ubuntu Dapper Drake)
Supported Development Environments
Eclipse IDE
Eclipse 3.2,3.3 (Europa)
Eclipse JDT Plugin
JDK 5 or JDK 6
ADT (Android Development Tools plugin), optional
Other IDEs
JDK 5 or JDK 6
Apache Ant
GCJ(Gnu compiler for Java) not compatible
27. Android – Under the hood
Executables
Limited POSIX command – ls, ps, cat, echo
#echo $PATH
Filesystem
#mount, 64MB
Root file system
Rootfs : initial-ramfs, ramdisk.img
System file system
Yaffs2 : First nand chip for system image, 64MB
Data file system
Yaffs2 : Second and chip for new user application, 64MB
Processes
#ps
Zygote – the launcher for the Java runtime
Startup
User-land starts with the init program
/etc/init.rc
28. Developing Android Application
Design Philosophy
Fast
Write efficient android code
Responsive
Build responsive application
Seamless
Integrate with system
Building Custom Android Components
Combine layouts and controls
Fully customized components
29. Special APIs
Optional APIs
Why “optional”?
You don’t need to use this
A given handset may not support them
Location-Based Services
Media APIs
3D Graphics with OpenGL
Low-level Hardware Access
Google APIs and Services in Android
MapView
P2P Services Using XMPP
30. Building Android Application
Hello Android
Adding TextView
Using XML based coding
Res.layout.main.xml
Simple Map View
Using MapActivity
Using XML
Simple Web View
Using WebKit class
31. Porting Android to Real Target
Board Spec.
Acumen Evaluation Board
CPU: PXA270 (ARMv5 based)
RAM: 128MB
NAND: 32MB
Porting Procedure
Make file system image
Ramfs (rootfs), yaffs2 system, data image
Linux 2.6.23.8 porting (make android patch)
EABI(Embedded Application Binary Interface) Support
OpenBinder (google added)
Device Driver Setting
FrameBuffer
Keyboard
TouchScreen
Network
Tune scripts and settings
Porting Tools
strace, busybox, log, network, /init
32. Future of Android
Business model
Organize the world’s information and make it universally accessible and relevant
No direct-advertising component in the platform
Will NOT make A gPhone
Google 700Mhz bid?
A broad developer community
ASL (Apache Software License)
Linux Kernel is licensed under (GPLv2)
Developer Challenge
$10 million in awards
Challenge I : Emulator Version ( Jan 2. 2008~)
Challenge II : Handset Version (The second half of 2008)
Opened Project (~12/12)
Social Network (with 2d&3d animation)
FPS : Wi-Fi Army
Location Search : with google map
Drive By Ad. : Location base Ad.
Car Navigation
Mobile Shopping
Ebook with full text index : google phone search?
Location Base!
Almost Location Base Service except ebook, Social Network (over 80%)
Small group is discussing game/PDA apps
33. Mash Up
Mash-up Android
New service with existing H/W Support
information
Not supported directly yet GPS Location
Compass Direction Sensor
Source Accelerometer
Google : www.google.com Camera(Still/Video)
ride finder Network Support
maps : street view GPRS
search by location 700MHz W-MAN
video & youtube
mash-up editor Wi-Fi
gtalk Intent
GoogleMobile : Access Service via URL
www.google.com/m
XMPP
gmail
calendar Google Instant Message
notebook
docs
reader
picasaweb
3rd Party?