Android is an open source, Linux-based operating system. The following diagram shows the major components of the Android platform.
The Linux Kernel:
Linux kernel is the foundation of the Android operating system. Android Runtime (ART) based on Linux kernel for underlying functionalities such as threading and low-level memory management. Using a Linux kernel allows Android to take advantage of key security features and allows manufacturers to develop hardware drivers for the well-known kernel. Security features mean at the operating system level, the Android platform provides the security of the Linux kernel, as well as a secure inter-process communication (IPC) facility to enable secure communication between applications running in different processes. These security features at the OS level ensure that even native code is forced by the Application Sandbox. The Linux kernel has been in widespread use for years and is used in millions of security-sensitive environments. Through its history of constantly being researched, attacked, and fixed by thousands of developers, Linux has become a stable and secure kernel trusted by many corporations and security professionals. As the base for a mobile computing environment, the Linux kernel provides Android with several key security features, including:
- A user-based permissions model
- Process isolation
- Extensible mechanism for secure IPC
- The ability to remove unnecessary and potentially insecure parts of the kernel
Libraries and Android Runtime:
- One GC pause instead of twoParallelized processing during the remaining GC pause.
- A collector with a lower total GC time for the special case of cleaning up recently-allocated, short-lived objects.
- Improved garbage collection ergonomics, making concurrent garbage collections more timely, which makes GC_FOR_ALLOC events extremely rare in typical use cases.
- Compacting GC to reduce background memory usage and fragmentation
- ART supports a number of new debugging options, particularly in monitor- and garbage collection-related functionality.
Sandbox:
The Android uses this UID to set up a kernel-level Application Sandbox. The kernel enforces security between apps and the system at the process level through standard Linux facilities, such as user and group IDs that are assigned to apps. By default, apps can't interact with each other and have limited access to the operating system. For example, if application A tries to do something malicious, such as read application B's data or dial the phone without permission (which is a separate application), then the operating system protects against this behavior because application A does not have the appropriate user privileges. The sandbox is simple, auditable, and based on decades-old UNIX-style user separation of processes and file permissions.
Hardware Abstract Layer:
The Hardware Abstraction Layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware components, such as the camera or Bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component. For more information about HAL please follow given link
On the top of the Linux kernel and HAL, android architecture contains libraries and android runtime. Libraries include WebKit, OpenGL, FreeType, SQLite, and Media, C runtime library (Libc), SSL, and SGL. The WebKit library is responsible for browser support; SQLite is for the database, FreeType for font support, Media for playing and recording audio and video formats.
Android Runtime(ART):
In Android Runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is responsible to run the android application. DVM is like JVM but it is optimized for mobile devices. ART introduces ahead-of-time (AOT) compilation, which can improve app performance. ART also has tighter install-time verification than Dalvik. Android runtime improves garbage collection. Garbage collection can harm performance which resulting in poor app performance and UI.
In Android Runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is responsible to run the android application. DVM is like JVM but it is optimized for mobile devices. ART introduces ahead-of-time (AOT) compilation, which can improve app performance. ART also has tighter install-time verification than Dalvik. Android runtime improves garbage collection. Garbage collection can harm performance which resulting in poor app performance and UI.
ART solve garbage collection issue by following ways.
The Dex compiler converts the java class files into the .dex file that run on the Dalvik VM. Multiple class files are converted into one dex file. AAPT stands for Android Assets Packaging Tool which converts .dex files into .apk (Android Packaging)
Application Framework:
On the top of Native libraries and android runtime, there is the android framework. Android framework includes Android APIs such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers. It provides a lot of classes and interfaces for android application development such as,
System Applications:
All applications such as home, contact, settings, games, browsers are using an android framework that uses android runtime and libraries. The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality you-you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify.
Application Framework:
On the top of Native libraries and android runtime, there is the android framework. Android framework includes Android APIs such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers. It provides a lot of classes and interfaces for android application development such as,
1. A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an embeddable web browser.
2. Content Provider that enables apps to access data from other apps, such as the Contacts app, or to share their own data.
3. Telephony class provides information about the telephony services such as subscriber id, SIM serial number, phone network type etc. Moreover, you can determine the phone state etc.
4. Android provides facility to integrate Google map in our application. Google map displays your current location, navigate location direction, search location etc. We can also customize Google map according to our requirement.
All applications such as home, contact, settings, games, browsers are using an android framework that uses android runtime and libraries. The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality you-you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify.
Thank you so much reading my tutorial, Please comment below down if you like it :-)
No comments:
Post a Comment