Page 1
Overview of Android (Part 2):
Middleware Infrastructure Layers
Douglas C. Schmidt
[email protected]
www.dre.vanderbilt.edu/~schmidt
Professor of Computer Science
Institute for Software
Integrated Systems
Vanderbilt University
Nashville, Tennessee, USA
Page 2
2
Learning Objectives in this Part of the Lesson1. Understand key elements
in Android’s middleware infrastructure
• e.g., hardware abstractionlayer, Android runtime, &native libraries
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
Hardware components
Middleware infrastructure resides atop the OS & below the apps et al
Page 3
5
Overview of Android’s Middleware
Infrastructure
Page 4
6
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
Page 5
7
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
See source.android.com/devices/#Hardware Abstraction Layer
Page 6
8
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Shields Android stack from low-level hardware details
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
Hardware components
Page 7
9
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Shields Android stack from low-level hardware details
• Shields OEMs from GNUPublic License “virality”
ART|Dalvik Virtual Machine
C+
+/C
C
Hardware components
Java
/JN
I
See en.wikipedia.org/wiki/Linux_kernel#Licensing_terms
Page 8
10
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
ART|Dalvik Virtual Machine
C+
+/C
C
Hardware components
Java
/JN
I
This layer is composed of several middleware elements
Page 9
11
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
This element is composed of two parts
Page 10
12
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
A managed execution environment that efficiently
runs Java-based apps & some Android system services
See source.android.com/devices/tech/dalvik
Page 11
13
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
See sites.google.com/site/io/dalvik-vm-internals
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
CThis managed execution
environment is optimized for mobile device constraints
Page 12
14
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
A copy of core Java class libraries & core Android class libraries
See en.wikipedia.org/wiki/Comparison_of_Java_and_Android_API
Page 13
15
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
We’ll discuss Java threading shortly
Page 14
16
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android’s core libraries provide key components that we’ll also cover shortly
Content
Provider
ServiceActivity
Broadcast
Receiver
Page 15
17
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android’s core libraries provide many other UI & persistence components
Page 16
18
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
See www.coursera.org/specializations/android-app-development
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
CWe cover Android’s core libraries in the Android App Development Specialization
Page 17
19
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android—like Java—balances run-time performance & developer productivity
Productivity Performance
Page 18
20
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
See www.dre.vanderbilt.edu/~schmidt/PDF/wrapper-facade.pdf
Android’s core libraries are often implemented
as wrapper facades
Page 19
21
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
• Native C/C++ libraries ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
See developer.android.com/tools/sdk/ndk
These Java wrapper façade are implemented via native C/C++ code
Page 20
48
End of Overview of Android (Part 2): Middleware
Infrastructure