Android is a Linux-based open source software stack created for a wide range of devices and models. Shown are the main components of the Android platform.
Android Software Stack Linux kernel
The Android platform is based on the Linux kernel. For example, the Android Runtime (ART) relies on the Linux kernel to perform underlying functions, such as threading and low-level memory management.
Using the Linux kernel allows Android to take advantage of key security features and allow device manufacturers to develop hardware drivers for well-known kernels.
Hardware abstraction Layer (HAL)
The hardware abstraction Layer (HAL) provides a standard interface for displaying device hardware capabilities to a higher-level Java API framework. The HAL contains several library modules, each of which implements an interface for a specific type of hardware component, such as a camera or a Bluetooth module. When the framework API requires access to device hardware, the Android system loads the library module for that hardware component.
Android Runtime
For Devices running Android 5.0 (API level 21) or later, each app runs in its own process and has its own instance of Android Runtime (ART). ART is written to run multiple virtual machines on a low-memory device by executing a DEX file, which is a bytecode format designed specifically for Android and is optimized to use little memory. The compilation tool chain, such as Jack, compiles the Java source code into DEX bytecode so that it can run on the Android platform.
Some of the main features of ART include:
Pre (AOT) and Instant (JIT) compilation
Optimized garbage collection (GC)
Better debugging support, including dedicated sample analyzer, detailed diagnostic exceptions and crash reports, and the ability to set up monitoring points to monitor specific fields
Before Android version 5.0 (API level 21), Dalvik was Android Runtime. If your app works well on ART, it should also run on Dalvik, but not necessarily in the reverse.
Android also includes a set of core runtime libraries that provide most of the Java programming language functionality used by the Java API Framework, including some Java 8 language features.
Native/C + + libraries
Many core Android system components and services, such as ART and HAL, are built from native code and require native libraries written in C and C + +. The Android platform provides the Java framework API to display some of the native library functionality to the app. For example, you can access OpenGL ES through the Java OpenGL API of the Android framework to support the drawing and manipulation of 3D graphics in your app.
If you are developing an app that requires C or C + + code, you can access some native platform libraries directly from native code using the Android NDK.
Java API Framework
You can use the entire feature set of the Android OS through an API written in the Java language. These APIs form the building blocks needed to create Android apps that simplify the reuse of core modular system components and services, including the following components and services:
Rich, extensible View System that allows you to build your app's UI, including lists, grids, text boxes, buttons and even embeddable web browsers
Resource Manager, for accessing non-code resources such as localized strings, graphics, and layout files
Notification Manager, which allows all apps to display custom reminders in the status bar
Activity Manager, which manages the lifecycle of an application and provides a common navigational return stack
Content Providers, which allows apps to access data in other apps, such as the Contacts app, or share their own data
Developers have full access to the framework API used by Android apps.
System Application
Android comes with a set of core apps for email, SMS, calendars, Internet browsing, and contacts. The app that comes with the platform is the same as the app that the user can choose to install, with no special status. So third-party apps can be the user's default Web browser, SMS Messenger, or even the default keyboard (with some exceptions, such as the system's "Settings" app).
System applications can be used as users ' applications and provide key features that developers can access from their own applications. For example, if your app is texting and you don't need to build it yourself, you can instead call the installed SMS app to send messages to the recipients you specify.
My QR code is as follows, welcome to exchange discussion
You are welcome to pay attention to the "It question summary" subscription number. Daily push Classics and interview tips the QR code of the subscription number is as follows:
Android 5-tier platform architecture