4. What’s Android
Android is a software stack for mobile devices that
includes an operating system, middleware and key
applications
5. History
2003, Startup Android Inc.
Aug 2005, Google Buys Android
Nov 2007, Open Handset Alliance
Nov 2007, First SDK
Apr 2008, ADC
Oct 2008, First device: T-Mobile G1
Oct 2008, Open source
15. DNA of Android
Built on the Linux kernel
Uses the Dalvik virtual machine
Core and 3rd party applications have equal access
16. Process
One Linux process per application
Application runs in Dalvik VM
Application head limit: 16MB
Dalvik VM Dalvik VM
Auto GC
Application A Application B
Multi-thread supported
Linux process Linux process
17. Process Lifecycle
Android is a multitasking system
But you can only start an application, can’t stop an
application
System will automatically kill processes to conserve
memory on necessary
Activity can save state on destroy and restore state
on restart to keep seamless user experience
Where is
the close
button?
Last activated applications
Some of them might have been killed
18. Memory
SD card
ext2 / ext3
Swap FAT / FAT32
(app2sd)
GPU Baseband
RAM
Linux memory
used used
Flash Memory
File System Apps OTA upgrade
Recovery
SPL
Image /dev /system /data /cache …
SPL: secondary program loader (boot loader)
19. Custom ROM
JesusFreke’s ROM
Haykuro Rogers ROM (神童)
Chinese: GeesunMod
20. Root
Linux OS root user privilege
Why to root?
Full control over your system
Ability to alter system files.
Run special apps that need more control over the system
App2sd
……
How to root?
24. Android Application Fundamentals
Fundamentals
Activity intent intent
Service
Broadcast receiver
Content provider
Intent
Running in background
Music play service
25. Activities & Tasks
Task: a stack of activities
A task can contain
activities from different
applications
Back button navigates Task Task
backward in the stack
All the activities in a
task move together as a
unit
26. User Interface
View & ViewGroup
XML layout file
Create object in code
27. API
Android Specified
System
UI
SQLite
JDK
HttpClient
JSON
XML
Add-on
Google Map API
34. OMS (OPhone)
Applications
JIL Widget (Gmail, Calendar, Market etc)
Replace UI
Applications
Google Account
Android Applications
(Open Source)
35. GFW
Android mobile is Internet mobile
Google services
Application as front-end, web service back-end
Cloud computing
DNS pollution:
android.clients.google.com
VPN support in Android