Application Layer ( APP )
Apply the framework layer ( API framework)
The system runtime layer (including Android Runtime , Libraries )
Linux Kernel layer
Progress management (Process management)
Timers (timer)
Interrupt Management (Interrupt management)
Memory Management (Management)
Module management (Modules management)
Virtual file System interface (VFS layer)
FileSystem (File System)
Device drivers (Devices driver)
interprocess communication (inter-process communication)
Network Management (Management)
Implementation of operating system functions such as System init
1. Linux Kernel
Android based Linux 2.6 provides core system services such as security, memory management, process management, network stacks, and drive models. Linux kernel also acts as an abstraction layer between hardware and software, which hides specific hardware details and provides a unified service for the upper layer. If you learn the computer network know OSI/RM, you will know that the benefits of layering is to use the services provided below to provide a unified service for the upper layer, shielding the differences between the layers and the following layers, when the layer and the following layers have changed will not affect the upper level. That is to say, each layer to do their job, each layer provides fixed sap (Service Access Point), professional points can be said to be high cohesion, low coupling. If you're just doing app development, there's no need to get into the Linux kernel layer.
2. Android Runtime (Runtime)
Android contains a collection of core libraries that provide most of the functionality available in the core class library of the Java programming language. Each Android application is an instance of a Dalvik virtual machine that runs in their own process. Dalvik virtual machines are designed to efficiently run multiple virtual machines on a single device. The Dalvik virtual machine executable file format is. The Dex,dex format is a compression format designed for Dalvik and is suitable for systems with limited memory and processor speed. Most virtual machines, including JVMs, are stack-based, while Dalvik virtual machines are register-based. Both architectures have pros and cons, and generally, stack-based machines require more instructions, and register-based machine instructions are larger. DX is a set of tools that convert Java. class to. dex format. A DEX file typically has more than one. Class. Because Dex sometimes has to be optimized, it increases the file size by 1-4 times, ending with Odex. Dalvik virtual machines rely on the Linux kernel to provide basic functionality, such as threading and underlying memory management.
3, Libraries (library)
Android consists of a C + + library that is used by various components of the Android system. The library provides services to developers through the Android application framework.
Here are some of the main core libraries:
1) System C Library: A standard C system function library (LIBC) inherited from BSD, specifically tailored for embedded Linux-based devices.
2) Media Library: based on PacketVideo Opencore; The library supports playback, and can record many popular audio video formats, as well as static image files including MPEG4, H, MP3, AAC, JPG, PNG.
3) Surface Manager: Manages the display subsystem and provides seamless integration of 3D layers to multiple applications.
4) Libwebcore: An up-to-date web browser engine to support Android browsers and an embeddable Web view.
5) SGL: A built-in 2D graphics engine.
6) 3D libraries: Based on OpenGL ES 1.0 APIs, the library can use hardware 3D acceleration (if available) or use highly optimized 3D soft acceleration.
7) FreeType: Bitmap (bitmap) and vector (vectors) font display.
8) SQLite: A lightweight relational database engine that makes the application available and powerful.
4. Application Framework
Developers have complete access to the API framework used by the core application. The application framework architecture is designed to simplify the reuse of component software, and any application can publish its block of functionality and any other application can use its published block of functionality (though it follows the framework's security restrictions). The application reuse mechanism allows the component to be replaced by the user.
All of the following applications are comprised of a range of services and systems, including:
1) An extensible view (views) can be used to create an application, including a list (lists), a network (grids), a TextBox (text boxes), a button (buttons), or even a Web browser that can be embedded.
2) Content Manager (Providers) enables applications to access data from another application, such as a contact database, or share their own data.
3) A resource Manager (Resource Manager) provides access to non-code resources, such as local strings, graphics, and hierarchical files (layout file).
4) a Notification Manager (Notification Manager) enables applications to display customer notification information in the status bar.
5) An Activity manager is used to manage the application lifecycle and provide common navigation fallback functionality.
5, applications
Applications are programs written in the Java language that run on virtual machines. Google initially bundled some core applications in Android, such as e-mail customer service, SMS messaging programs, calendars, maps, browsers, contact management programs, settings, and more.