Open Mobile Platform Android

baroohspottyMobile - Wireless

Jul 19, 2012 (5 years and 5 months ago)

599 views

O
p
en Mobile Platform Android
Ju
l-17-2
009,
Fri
Ju
009,
GeunsikLim
(leemgs@gmail.com)
Open

Mobile

Platform

Android
OpenMobilePlatformAndroid
GeunSikLim(leemgs@gmail.com)
http://blog.naver.com/invain /
http://www.kandroid.org
CONTENTS
(
1
)

Mobile

Platform

History
(
1
)MobilePlatformHistory
(2) Android Architecture
(3) License Issues
(
4
)AndroidOS
(
4
)

Android

OS
(5) System Libraries (System Lib , Function Lib , Core Lib)
(5) Android Runtime
(
6
)AdidFk
(
6
)

A
n
d
ro
id

F
ramewor
k
(7) Android IPC Mechanism (Binder & Dbus)
Open
Platform
Android OS의Open Standards Positioning Map
Android
각기
다른
방식으로
보완적인
접근
방식을
채택하여
Mbil Mkt
접근
3/33
A N D R O I D

각기
다른
방식으로
보완적인
접근
방식을
채택하여
M
o
bil
e
M
ar
k
e
t
접근
Open
Platform
Linux Based Mobile Platform History
Android
4/33
A N D R O I D
First, to be an excellent mobile platform
on its merits, Second, to be open and open
source
Open
Platform
Google‘s Roadmap for Android 1/2
Android
DateDescription
200508
GlidAdidI
2005
.
08
G
oog
l
e acqu
i
re
d
 
A
n
d
ro
id
 
I
nc. 
(Adny Rubin ‐http://carmen.sourceforge.net/
)
2005.11Google Bought Skia 2D Graphic Solution.
GPL
2007.10Google acquired Jaiku Inc.
2007.11Open Handset Alliance (OHA) appointed open standard development 
abou t Mobile Device.
2007.11.12
Android SDK(Software Development Kit) Release 
htt
p
:
//
code.
g
oo
g
le.com
/p/
android
/
downloads
/
list
p//gg/p///
Android Developer Challenge ($10 million )                            Linux 2.6.23 
20080124
UitdStt700MHFCCilt(5Blk)ti
2008
.
01
.
24
U
n
it
e
d
 
St
a
t
es 
700
?
MH

FCC
?w
i
re
l
ess spec
t
rum 
(5Bl
oc
k
s
)
 auc
ti
on
2008.01.28Google extended the deadline for the first round in the Android 
5/33
A N D R O I D
Developer Challenge to April 14 2008
Open
Platform
Google‘s Roadmap for Android 2/2
Android
DateDescription
2008.02.13Android SDK Updated to m5‐rc14
2008.03.05Android SDK Updated to m5‐rc15
2008.04.14Android Developer Challenge I Deadline
2008.05.28Google I/O (A two day developer gathering in San Francisco.)
20081122
AdidBdfitbilPh(G1PhbT
bil)
2008
.
11
.
22
A
n
d
ro
id
  
B
ase
d
 
fi
rs
t
 mo
bil

Ph
one 
(G1
?
Ph
one 
b

T
?rmo
bil

)
?
http://www.android.com/market/
2008.11.23Apache License based Full Open Source  http://source.android.com
Linux 2.6.25
2009. 2Q~3QUnveild 2nd product, Android, an open source mobile device platform 
based on the Linux.
(
Plan
)
   Linux 2.6.27 or Linux 2.6.29
6/33
A N D R O I D
()
Open
Platform
Android SWOT Analysis
Android
Internal Pontential Power
•Killer Applications
•Lack of Vertical Integration
•Google is a content provider
•Partnerships
•Mind‐Share
•Proprietary clones

Advertisingcompetition
•Social networkin
g
 a
pp
lications

Advertising
 
competition
gpp
•Developing markets
External Environments
1Voipsoftware
Google’s 10 Killer Applications
6. A mmorpg (nothing too fancy —think Runescape) 
()
1

Voip
?
software
?
2. A full‐featured media player with an iPod‐like 
UI 
3. A multi‐protocol IM client 
4Ane
bookreader
7. Game emulators 
(
Gameboy, Playstation, ect
)
 
8. Text to speech traffic optimized GPS navigation 
(may be provided with the Google Maps app). 
9. A podcast aggregator 
ld(lkhbk)
7/33
A N D R O I D
4

An
?
e
?r
book
?
reader
?
5. Twitter / Pounce client
10. Image up
l
oa
d
 & sync 
(
F
l
ic
k
r, P
h
oto
b
uc
k
et, etc
)
Open
Platform
Open-access model and Android software
Android
T
-
Mobile
Open

Open

T
-
Mobile
Open

Devices
Open

Networks
Open Access
O
700Mhz
Op
en
Applications
Open
Services
Reseller
8/33
A N D R O I D
Open
Platform
Android’s Architecture
Eii Adid li
Android

E
x
i
st
i
ng
A
n
d
ro
id
so
l
ut
i
ons

are

deployed on dual-core
processors
processors
–Dedicated communications
processor
Heavy
weightARM11application

Heavy
-
weight

ARM11

application

processor just for Android
–Example: HTC Dream (G1) –528
MHARM11192MiBRAM
MH
z
ARM11
,
192

MiBRAM
9/33
A N D R O I D
Open
Platform
Emulator Limitations
Android
In this release, the limitations of the
emulator include:
•No support for placing or receiving actual
phone calls. You can simulate phone calls
(p
laced and received
)
throu
g
h the emulator
(p)g
console, however.
•No support for USB connections

Nosupportforcamera/videocapture(input).
No

support

for

camera/video

capture

(input).

•No support for audio input (capture). Output
(playback) is supported.

Nosupportfordevice
-
attachedheadphones

No

support

for

device
-
attached

headphones

•No support for determining connected state
•No support for determining battery charge level
andACchargingstate
and

AC

charging

state

•No support for determining SD card insert/eject
•No support for Bluetooth
10/33
A N D R O I D
Open
Platform
Component Info per Android Layer
Android
Android Debug Bridge
(ADB)
Applications
Java
X86 Linux Desktop
IM
Photo Album
Calculator
Clock
Media Player
Calendar
(ADB)
Android Development
Tool (ADT)
Home
Contacts
Phone
Browser
Goo
g
leMa
p
Activity
Windows
Content
View
Notification
Applications Framework
. . . .
Java
hˆ“’DhŒ‰œŽDq–•›–™D
wŒ™ŠŒLhhqwMDM
e•‹™–‹eššŒ›DtˆŠ’ˆŽ•ŽD
x––“
eŠ›› 
D
qˆ•ˆŽŒ™
~•‹–žš
D
qˆ•ˆŽŒ™
g–•›Œ•›
D
t™–‹Œ™š
}Œž
w š›Œ”
r–›Šˆ›–•
D
qˆ•ˆŽŒ™
tˆŠ’ˆŽŒD
qˆ•ˆŽŒ™
xŒ“Œ—–• D
qˆ•ˆŽŒ™
vŒš–œ™ŠŒD
qˆ•ˆŽŒ™
p–Šˆ›–•D
qˆ•ˆŽŒ™
qttD
wŒ™ŠŒ
Java
Mkdd
Android Interface
efinition Language(AIDL)
System Libraries
Surface
manager
Media
Framework
SQLite
OpenGL/ES
Core Libraries
C/C
++
Android Runtime
(Functional libraries)
Mk
s
d
car
d
Class File Convertor
manager
Framework
FreeType
Webkit
SGL
SSL
Bionic Libc
(53 pthread)
Dalvik VM
C/C
HAL(HardwareAbstractionLayer)
i”œ“ˆ›–™
LuiqyPDk–“‹jšM
p•œŸhš›™‰œ›–•L_]M
C
Linux (2.6.23-24)
HAL(Hardware

Abstraction

Layer)
Graphics
Audio
Radio(RIL)
G P S
Camera
BlueTooth
WiFi
. . . . .
11/33
A N D R O I D
11/18
Linux

Distribution(X86)
DisplayDriver
BluetoothDriver
Flash Driver
Binder Driver
USB Driver
Keypad Driver
CameraDriver
WiFi Driver
Audio Driver
Power M/M
C
Open
Platform
Android Platform License Issues
Android
12/33
A N D R O I D
Open
Platform
Android Application License Issues
Android
The 18 to 20 devices Google knows about will be made by eight or nine
different manufacturers –by Andy Rubin (2009.05.27 Google i/o)
1.The obligation-free option:
-Manufacturers can download a free version of Android.
Th ft
t ld
l Ggl liti

Th
e

manu
f
ac
t
urers

canno
t
pre
l
oa
d
popu
l
ar
G
oo
gl
e

app
li
ca
ti
ons,

like Gmail or Google calendar.
2 Th ll tig ti
2
.
Th
e

sma
ll
s
t
r
i
n
g
s

op
ti
on:

–manufacturers sign a distribution agreementto include Google
applications on the phone.
12 to 14 subscribe to this option (18 20 devices in 2009 )

12 to 14 subscribe to this option (18
~
20 devices in 2009 )
.
3 The bigger strings option or the no
-
censorship version:
3
.
The bigger strings option or the no
-
censorship version:
–They are physically distinguishable by the “Google” logoon the phone.
–We want to abide by the law, but not rule with an open fist
13/33
A N D R O I D
Open
Platform
Thread functions
Android
Thread API List
•libc.so Shared Object File에Thread API를내장하고있음.
•android's posix thread api는POSIX 1003.1J-2000에서제안하고있는pthread_rwlock_*** ,
threadrwlockattr***pthreadbarrior***pthreadbarriorattr***pthreadspin***
등의
0DNAdg
14/33
A N D R O I D
thread
_
rwlockattr
_
***
,
pthread
_
barrior
_
***
,
pthread
_
barriorattr
_
***
,
pthread
_
spin
_
***

등의
0DNAdg
#
(EeNdNEAO##는제공하고있지않음.
•Thread Debugging은lib_thread_db.so 파일을통해서Android Application 쓰레드디버깅시에사
용.
Open
Platform
Kernel Features for Android 1/2
Android
Kernel Features
Requirement
ARM EABI ( ARM Embedded Application Binary Interface )
O
Frame Buffer (Device Driver) /dev/fb0  or /dev/graphics/fb0
O
Keypad Device drivers /dev/input/event0

Touch‐Screen Device drivers 
/
dev
/
in
p
ut
/
event1

//p/
Emulator
GoldFish (Virtual Machine for QEMU based Emulator )
O
iitf(R/iit
EtblLikiFt)
v
i
n
it
 ram
f
s source 
(
?
R
un 
/i
n
it
 ‐
E
xec
t
ua
bl
e  
Liki
ng 
F
orma
t
 
)
O
15/33
A N D R O I D
Open
Platform
Kernel Features for Android 2/2
Android
Kernel Features
Requirement
LowMemoryKiller(ToKillprocessWhenMemoryislow)
O
☞Surface flin
g
er uses double-bufferin
g
usin
g

p
a
g
e-fli
p
s.
Low
 
Memory
?
Killer
?
(
?
To
?
Kill
?
process
?
When
?
Memory
?
is
?
low)
O
Binder For IPC /dev/binder (251~253 or 10~11)    
O
Kernel Debu
gg
er 
(
?Usin
g
 kdb
g
 structure + s
y
sr
q
 
)

A
N
gg(ggyq)
PMEM ( Process’s Memory Allocator –map,unmap,getsize,gettotalsize,allocate,etc ) ‐
Deprecated
-
AndroidLogDriver(Todisplaylogmessageslikelogcat)
D
R
Android
 
Log
?
Driver
?
(To
?
display
?
log
?
messages
?
like
?
logcat)
/dev/log/{main:log:event}

Android Power Management (for PM of goldfish)/dev/android_power

O
I
Android USB Gadget ( Gadget based Android USB Driver ) /dev/usb

Android Alarm Driver 

D
Android  RAM Buffer Console ( for goldfish's audio )

Product
Android Paranoid Network (Only allow certain groups to create sockets)
-
Ashmem(AndroidSharedMemoryforMemoryManager)
v
16/33
A N D R O I D
(Porting)
Ashmem
 
(Android
?
Shared
?
Memory
?
for
?
Memory
?
Manager)
O
Android timed GPIO driver
-
Open
Platform
Android
Difference amongAndroid Kernel Versions
O
O
O
Bid
2
OOOEABI
1
2.6.29
2.6.25
2.6.23
Feature
No
2.6.27
O
O
OOOAndroid Power Management
4
OOOLow Memory Killer
3
O
O
O
Bi
n
d
er
2
O
O
O
OOOAndroid USB Gad
g
et
7
OOOAlarm Driver
6
OOOLog sub system
5
O
O
O
O
O
X
ASHMEM
10
OOOAndroid Kernel Debugger
9
OOOYaffs2
8
g
O
O
O
OXXBasic X86 Support
12
OXXPMEM
11
O
O
X
ASHMEM
10
O
O
O
O
X
X
/di/
ti
/Adid/
12
X
☞http://Android.googlecode.com/files/linux-2.6.23-Android-m5-rc14.tar.gz
☞http://Android.googlecode.com/files/linux-2.6.25-Android-1.0_r1.tar.gz

桴瑰㨯⽁湤牯楤g楴步牮敬潲术H瀽步牮敬⽣潭浯Ig楴㭡㵳桯牴汯朻栽牥晳⽨敡摳⽁湤牯楤
2627
O
X
X
.
/d
r
i
vers
/
s
t
ag
i
ng
/A
n
d
ro
id/
12
X
17/33
A N D R O I D

http://Android
.
git
.
kernel
.
org/?p=kernel/common
.
git;a=shortlog;h=refs/heads/Android
-
2
.
6
.
27
☞http://Android.git.kernel.org/?p=kernel/common.git;a=shortlog;h=refs/heads/Android-2.6.29
Open
Platform
Linux Mailing List for Android Kernel
Android
Current efforts to merge android kernel features to vanilla kernel
18/33
A N D R O I D
Open
Platform
Vanilla Kernel’s Maintenance for Android
Android
Total Number of Kernel Developers
# Developers
○Linux = Vanilla Kernel = Linus Tovalds’s Tademark
'09.04.09
Android Kernel’s
Release Date
based on Vanilla
'
081201
'
07.11.12
'08.11.23
08
.
12
.
01
07.11.12
Version
19/33
A N D R O I D
•http://gitstat.sf.net : web-based statistics and monitoring system.
Version
Open
Platform
LKML for HTC Dream(Trout) Support
Android
20/33
A N D R O I D
Open
Platform
Linux Kernel for Android
Android
•Android is built on the Linux kernel, but
Android is not Linux.

No native windowing system

No native windowing system
.
•No glibc support.
•Does not include the full set of standard
Linux utilities.
Linux utilities.
•Standard Linux 2.6.XX Kernel.
•Patch of “kernel enhancements” to
su
pp
ort Android.
21/33
A N D R O I D
pp
Open
Platform
Why Linux Kernel?
Android
•Great memory and process management
•Permissions-based security model

Proven
driver model

Proven
driver model
•Support for shared libraries
•It's alreadyopen source!
22/33
A N D R O I D
Open
Platform
Dalvik VM
Dalvik Virtual Machine
Android
•Designed for embedded environment

Supports multiple virtual machine processes per device
Supports multiple virtual machine processes per device
• Highly CPU-optimized bytecode interpreter
•Uses runtime memory very efficiently
Java byte code

剥gister
기반의
䑡汶楫⁢祴攠捯摥

변환
•
䩡癡⁢祴攠捯摥

剥gister
기반의
䑡汶楫⁢祴攠捯摥

변환
.
휴대폰개발자해리고티패티:이로인해Dalvik이Java 플랫폼이아
니라고말할수있는명목이생기는것
•License Issue: Java에는프로그램을Load했을때동작의정당성
등을검증하는'Byte Code Verifier'라는기술이있으며, 이특허를
미Sun Microsystems, Inc.가소유.
23/33
A N D R O I D
Open
Platform
Android RootFS Information
Android
ramfs
Root Folder
proc/ data/dev/ etc/ init sbin/ sys/ system/tmp/ var/
yaffs2
牥慡扬支睲楴慢汥o
晩汥⁳祳瑥c
剁䴠摩獫
牥慤湬礠晩汥⁳祳瑥o
/
Fld
yaffs2
yaffs2
app/bin/build.prop etc/ fonts/ framework/lib/lost+found/ media/ sounds/ usr/
/
system
F
o
ld
er
24/33
A N D R O I D
Toolbox 
(similar to busybox)
Java Applications 
(*.apk )
Java class libraries
(*.jar)
Native shared libraries; 
(*.so )
Open
Platform
Android’s System Libraries
Android
25/33
A N D R O I D
Open
Platform
Runtime Walkthrough 1/2
Android
Android managed Services register with Service Manager:
26/33
A N D R O I D
Open
Platform
Runtime Walkthrough 2/2
Android
Each subsequent application is launched in it’s own process
27/33
A N D R O I D
Open
Platform
Android
Map info of Google Map Process
•What is IPC Mechenism of Android platform for Mobile ? Both Openbinder and D-bus.
Sfdiblii
?LO#EJBKNIdPEKJ#KJ#dJgNKEg#LHdPBKNIA
root 1657 1 100512 24852 ffffffff afe0d204 S /system/bin/runtime
bluetooth 1658 1 1224 776 c00a34e8 afe0d07c S /system/bin/dbus-daemon
<./dbus-daemon/bus/>
activation.c, bus.c, config-loader-expat.c
config-parser.c, connection.c, desktop-file.c,
dithdiilit
D-BUS
Ver0.95

S
ystem
f
or sen
di
ng messages
b
etween app
li
cat
i
ons.
(Systemwide message-bus service
) http://www.freedesktop.org/software/dbus/
For example , Broadcast signal and System/Session Bus
di
spa
t
c
h
.c,
d
r
i
ver.c, exp
i
re
li
s
t
.c,
bus/policy.c, services.c, signals.c
dd
OpenBinder
Ver 0.8
•Don't worry about processes or IPC Because of distributed architecture.
•Provides resource mana
g
ement between
p
rocesses.
http://www.open-binder.org
28/33
A N D R O I D
gp
•Handle on an object in another proces.
•Powerful facilities for doing multithreaded programming with the Binder.
Open
Platform
Android Bluetooth Architecture (1.0)
Android
29/33
A N D R O I D
http://www.bluez.org/
☎Bluez 3.36 (Bluetooth 2.0 + EDR) ☎Bluez 4.xx (Bluetooth 2.1 + Simple Pairing Support)
☎To plumb the DBUS API's to these daemons up into the Android Java framework
Open
Platform
Analysis of Booting Sequence
Android
htt//btht
htt
p:
//
www.
b
oo
t
c
h
ar
t
.org
30/33
A N D R O I D
Open
Platform
Android Emulator (QEMU Base) for App Developers
Android
Emulator
Eclipse’s Debuggin
Emulator
HelloWorld
(Eclipse)
SnakeGame
Elt’
Snake
 
Game
Emulator 
DemoApp
E
mu
l
a
t
or


Network 
Source
31/33
A N D R O I D
31/21
Demo
 
App
Open
Platform
Android Platform on S3C6410
Android
http://www.youtube.com/watch?v=13Gt7t4kRCc
http://www.youtube.com/watch?v=NsBuZT6r9Mo
A1136/1176htt//kAdid/dtl/kAdid
1121
20080530libt
32/33
A N D R O I D

A
rm
1136/1176

htt
p:
//
www.
kA
n
d
ro
id
.org
/d
ev
t
oo
l
s
/kA
n
d
ro
id
-
1
.
1
.
2
.
1
-
20080530
.g
lib
c.
t
gz
•Arm-Xscale http://www.kAndroid.org/devtools/kAndroid-1.1.2.3-20080623.glibc.tgz
Open
Platform
Samsung Android Phones
Android
2nd
Moment1st
Galaxy
3rd
Spica
(=Galaxy Lite)
4th
BeholdII
Samsung
S3C6410 800MHz
(ARM1176JZF-S )
Qualcomm
MSM7200A 528Mhz
(ARM1136ej-S)
Samsung
S3C6410 800MHz
(ARM1176JZF-S )
Qualcomm
MSM7200A 528Mhz
(ARM1136ej-S)
•1st Galaxy(GT-i7500) http://opensource.samsungmobile.com/download/OpenSource/GT-I7500_OpenSource.zip
•2nd Moment(SPH-M900) http://opensource.samsungmobile.com/download/OpenSource/SPH-M900_OpenSource.zip
33/33
A N D R O I D
•3rd Spica(GT-i5700) http://opensource.samsungmobile.com/download/OpenSource/GT-I5700_OpenSource.zip
•4th BeholdII(SGH-T930 http://opensource.samsungmobile.com/download/OpenSource/SGH-T939_OpenSource.zip
Open
Platform
Memorize Android Related Websites !!!Memorize Android Related Websites !!!
Android
34/33
A N D R O I D
Open
Platform
Android
T
HANKS
T
HANKS
35/33
A N D R O I D
O
p
en Mind , Share Mind , This is Our Future!