Lecture 2 Android OS
Lecture 2 Android OS
Introduction
1
XP
Objectives
• Introduction to Android OS
• History
• Android Versions
• Android OS Architecture
4
Android Versions XP
5
Android Versions XP
6
Activity XP
7
Android OS Architecture XP
8
Linus Kernel and HAL XP
9
Hardware Abstraction Layer (HAL)XP
• How can we write an app that can interface with all the
different types of hardware components?
10
Hardware Abstraction Layer (HAL)XP
11
Bridging the Gap with HAL XP
12
Native C/C++ Libraries XP
• The surface manager library is responsible for rendering windows and drawing
surfaces of various apps on the screen.
• The OpenGL (Open Graphics Library) and SGL (Scalable Graphics Library) are the
graphics libraries for 3D and 2D rendering, respectively.
• The media framework library guides playback and recording of various audio and
video formats.
• The SQLite library provides support for native data storage.
• The FreeType library is used for rendering fonts.
• The WebKit library is used for browser compatibilities and support.
• SSL Secure Sockets Layer library provides security.
13
Android Run Time XP
Core Libraries
Dalvik Virtual Or
Android Run Time (ART)
Machine (DVM)
14
Java vs Android Code Execution XP
Java Virtual
Machine(JVM)
Dalvik Virtual
Machine(DVM)
15
The Dex File Format XP
16
Compilation and Execution Cycle XP
• Compile the Java program into Java bytecode using a Java compiler.
• Translate the Java bytecode into Dex bytecode, a specialized format for
Android applications.
• The Dex bytecode along with necessary resources is packaged into an APK
(Android Package Kit) for distribution to users.
• The Android Runtime (ART) will precompile the Dex bytecode into native
machine code, optimizing it for the specific hardware of the user's phone.
17
JIT Vs AOT XP
18
Application Framework XP
• The Application Framework layer in Android provides a set of essential APIs (Application
Programming Interfaces) that abstract the underlying system operations and facilitate the
development of Android applications
19
Applications Layer XP
• The applications layer is the topmost layer that contains all the apps installed
on the device, including those that come bundled with it.
• This layer uses all the layers below it for proper functioning of these mobile apps.
20
Next class XP
21