A Android Stack
A Android Stack
Overview
• The Android
operating system
is like a cake
consisting of
various layers.
• On the other hand, Android adds quite a bit to the Linux kernel,
such as
• Secure
• Linux is a highly secure system, having been tried and tested through some very harsh
environments over the decades.
• Android relies heavily on Linux for security, and all Android applications run as separate
Linux processes with permissions set by the Linux system, passing many security
concerns to the underlying Linux system.
• The kernel is the sole enforcer of Android permissions, providing a simple, powerful,
security mechanism. It also allows Android apps access to native code, such as fast C
implementations of various libraries via the Java Native Interface.
• Features
• The Linux kernel comes with a range of features. Android leverages many of them, e.g.
support for memory and power management, networking and radio functionality.
Native Layer
• Webkit: A fast web-rendering engine used by Safari, Chrome, and other browsers.
• SQLite: A full-featured SQL database that the Android app framework exposes to
applications.
• OpenSSL: The secure socket layer, allowing for secure point-to-point connectivity.
Native Daemons
• Native daemons are executable code that usually runs to support some kind of
system service. Prominent examples:
• This is the best-documented and most extensively covered part of the platform
because it is this layer that empowers developers to get applications to the market.
• In the application framework layer, there are numerous Java libraries specifically
built for Android. These purpose-built Android classes live in android.* packages.
• There are also most of the standard Java libraries, such as java.lang.*, java.utils.*,
java.io.*, java.net.*, etc, which behave as documented in the oracle documentation
• You will also find many services (or managers) that provide the ecosystem of
capabilities your application can tap into, such as location, sensors, WiFi,
telephony, etc…
JVM vs Dalvik
• In Java, you write your Java source file, compile it into Java
byte code using the Java compiler, and then run this byte
code on the Java VM.
• In Android you write the Java source file, and you still
compile it to Java byte code using the same Java compiler.
• The big shift that ART brings, is that instead of being a Just-in-Time
(JIT) compiler, it now compiles application code Ahead-of-Time (AOT).
• It is a ZIP file that you can unzip and look inside using any
archiving tool
Components of an APK (1)
• Android Manifest file
• This is the main file that provides the big picture about
your app—all of its components, permissions, version,
and minimum API level needed to run it.
• Dalvik executable
• Resources
Signatures
• Which
part
should we
learn?
Android
Stack
• Learning Resources?
developer.android.com
• Latest version of documentation can be downloaded locally
via the SDK Manager