Professional Documents
Culture Documents
Android (Simplified) : Jeff Chase Duke University
Android (Simplified) : Jeff Chase Duke University
Android (Simplified)
Jeff Chase
Duke University
Part 1: Background
From Bloomberg
A spate of crashing new MacBook Air laptops running Google’s Chrome browser had the tech
conspiracists in a tizzy, what with the frenemies relationship between iPhone-maker Apple and
Android-creator Google. But the root cause of the problem turns out to be much more mundane: the
MacBook’s graphic accelerator.
“We have identified a leak of graphic resources in the Chrome browser related to the drawing of
plugins on Mac OS X,” Google told Gizmodo Thursday. The leaky resource is causing a kernel panic
in the new MacBook Air’s Intel HD 4000 graphics chip, which has the Mountain View, Calif. Internet
giant befuddled, terming the problem a potential “bug” by Apple.
While both Google and Apple investigate, the Chrome browser was updated to disable some graphics
acceleration on the MacBook Air. A more permanent fix will be pushed out “in the coming days,”
Google assures concerned MacBook Air owners.
The response to all the fuss seems to have driven Mac fans away from Chrome and more solidly
toward Apple’s Safari browser. “Chrome is great for my Dad’s 2003 vintage PC. But on my Mac it
offers no advantage…it’s just another piece of redundant software to maintain. Safari all the way,”
said a 9to5Mac user named “Tigerlilly.”
Others questioned Google placing blame on Apple for a “bug” in the new MacBook Air. Which gets
us back to the conspiracy theories. Presumably, Apple developers tested the new MacBook Air on a
wide range of software, looking for problems. The trouble with Chrome may have surfaced, but been
overlooked. After all, wouldn’t a problem with Chrome push Apple fans deeper into the arms of
Safari — as is happening now?
data data
...and upcalls
Protected
(e.g., signals)
system calls
X Windows (1985)
http://finntrack.co.uk/, erights.org
http://www.cap-lore.com/CapTheory/ConfusedDeputyM.html
Android protection
• Each application (“app”) runs with its own identity.
– Each app has a private space of files, processes, etc. that
defines a “sandbox”.
– It does not matter that they run on behalf of the same user:
the code matters more than the user. No deputies!
• The system mediates access to the sensors and UI
by applications.
– GPS, camera, microphone, touchpad, etc.
• Each app declares the named permissions it needs.
– subject to user approval
• Each app declares the permissions another app
needs to interact with it.
Part 2, Android technology
• The goal here is to present an overview of the
Android structure, and rationale for that structure.
• We won’t learn how to program Android apps.
Detailed docs are available.
– developer.android.com
• What we offer is the conceptual underpinnings and
connections to other OS concepts.
– We choose Android for its instructive value: open source.
• Some images are borrowed from material on the
web. E.g., Google material:
– Anatomy and Physiology of Android
Virtual
Machine
(JVM)
C/C++
[http://www.android.com]
Dalvik JVM (Interpreter)
Dalvik interprets
Java bytecode. Android apps
compile to bytecode.
JVM+lib JVM+lib
Linux kernel
open
read App files
Linux kernel
Android binder
an add-on kernel driver
for binder RPC Linux kernel
Android services and libraries communicate by sending
messages through shared-memory channels set up by binder.
Android environment server
Activity
Manager JVM+lib
Service
etc.
JVM+lib
X
Service
etc.
JVM+lib