Preface I have learned about Android for a while before and after. I started to learn about Android in 13 years. However, due to job hunting, internships, and other reasons, there was a long period of vacuum time That I didn't study Android any more. In addition, I am not engaged in Android work for the moment, and my study has fallen. However, as an Android enthusiast, I am still using my spare time to learn more. In the past, I learned to stick to beautiful interfaces and have little knowledge about some theoretical aspects of the system architecture. I will also pay attention to this in my future studies. Since I plan to pay attention to learning in a new way, let's first take a look at the entire Android system architecture. What is Android's so-called What is explanation is benevolent, wise, wise. From the perspective of an ordinary user, he can unilaterally think that it is a "Mobile Phone". If he goes deeper, he will know that Android is the "Operating System" on the mobile phone. From the merchant's perspective, he may not simply think that Android is a mobile phone or operating system. He may see the impact of Android on the entire mobile internet and business opportunities. From the developer's perspective, he will know that Android is an open and complete mobile software based on the Linux platform, which consists of the operating system, middleware, user interface, and application software, by integrating some columns and reusable components provided by the system, you can implement various interesting and practical apps. But what is? This is an open question. If a definition is required, I have to cite Dan Morrill, the Android director, to explain: "Android is not a standard or distribution version of the traditional Linux style, it is not a reusable component integration. Android is a software block used to connect devices. "What is AndroidThe detailed explanation of the Android architecture shows the components of the Android system architecture and the simple operation mode from the figure above. The detailed architecture diagram of the Android System Architecture (from the Network) is shown below ):
Functions available in the core library of the programming language. Every Android app is the strength of the Dalvik Virtual Machine and runs in their own processes. One device can efficiently run multiple virtual machines. The Dalvik Virtual Machine executable file format is. dex (a compression format designed for Dalvik, suitable for systems with limited memory and processor speed ). Unlike most virtual machines (JVMs), Dalvik is based on registers rather than stacks. This allows Dalvik to support more machine commands (more commands are required based on stacks ). Dx is a set of tools that can convert. class files to. dex, usually multi-to-one relationships. As dex is optimized, the file size is increased by 1-4 times, ending with ODEX. It is suggested that the Dalvik virtual machine depends on the basic functions provided by the Linux kernel (thread and underlying memory management ).
The Android system of Libraries (Runtime Library) will use some C/C ++ Libraries to support various components we use and make them better serve us. These functions are exposed to developers through the Android Application Framework. Bionic system C Library: C language standard library, the underlying library of the system, C library is called by the Linux system. MediaFramework: Android multi-media library, based on PackerVideo OpenCORE, supports recording and playing of various audio and video formats, including static image files. LibVebCore: A web browser engine that drives Android browsers and embedded web views. SGL: Basic 2D graphics engine 3D: Based on OpenGL ES. SQLite: A Powerful and lightweight relational database engine used by applications. Application Framework may be the most widely used part by most developers, because Android Application Development is implemented through interaction between the Framework and the Android underlying layer. The application development layer is a framework development platform provided by Android to developers. developers can expand the framework to develop a variety of apps based on the framework principles. The application architecture simplifies Component Reuse, making developer development more flexible.
- View: a rich and extensible View set that can be used to build an application. Including list, grid, text box, button, and even embedded web browser.
- Content Providers-enable applications to access data from other applications (such as Address Book) or share their own data.
- Resource Manager-provides access to non-code resources, such as localized strings, images, and layout files.
- Notification Manager-enables all applications to display custom warnings on the status bar.
- Activity Manager (Activity Manager): manages the application lifecycle and provides a universal pilot rollback function.
- Applications is a collection of core apps assembled by Google iAndroid, including email clients, SMS, date, map, and browsers. Android is open-source, and the power of open-source makes apps that can run on Android endless.
Summary Android adopts a layered architecture with clear division of labor at each layer. It is a Software stack (Software stack: Software stack architecture), which is divided into three layers: operating systems, middleware, and applications.