Android System Architecture Analysis (I): android System Architecture Analysis
For analysis, the term may be too big. Let's talk about the Android system in my personal understanding.
Someone once asked me what Android is? At that time, I was really blind to this question. I simply replied: Android is an operating system based on mobile devices. So far, I have answered this question too lightly. I think this question can be answered only after development.
So what is Android? I think Android is an interface between users and devices. From the Android architecture, Android is divided into four layers. Therefore, Android is a software block connecting devices, but it is not a set of column components.
Android is a mobile development platform. Its software hierarchy includes the operating system, middleware, and applications. The entire architecture is divided into four layers:
- Linux Kernel Layer
- Various class libraries and Runtime
- Application Framework Layer
- Application Layer
The Linux kernel layer includes the Linux kernel and some driver modules, such as usb driver, Bluetooth driver, and camera driver.
The libraries layer includes a variety of dynamic libraries (2D, 3D image engines, embedded databases, Network Browser cores, etc.), Android runtime libraries, and dalvik virtual machines (dalvik virtual machines used before Android4.4, (art is used after 4.4). From the programming language perspective, this layer is mainly written in c/c ++, so it can be said that this layer is the native layer.
The application framework layer is an application framework written in java and the cornerstone of the java language on the Android platform, therefore, this layer mainly provides developers at the application layer with APIs for developing columns, such as various ui controls.
The Application Layer mainly refers to the user interface. The Android system itself comes with some applications, such as contacts, text messages, and music players. However, Android Developers can use the APIS at the application framework layer to develop their own personalized applications, I think this is a manifestation of the huge potential of Android open source.
Generally, android development uses the system architecture layer?
Develop a program. The android system framework is layered and cannot be separated.
Application Layer:
This layer mainly refers to programs running on virtual machines written in java, at the beginning, Google bound some core applications in the android system (core applications must be written using the API framework at the application-layer ordering framework layer ), for example, in your android phone, you can use SMS to send short messages, address book, and so on.
Application Framework layer:
It refers to the API framework required for development. Developers call the framework and develop their own programs.
System Runtime Library layer:
It is used to support various components at the application framework layer. That is to say, when developers use the android Application Framework layer, the android system uses some C/C ++ libraries to support various components we use so that they can better serve developers.
Linux core layer:
Android core system services, such as security, memory management, process management, network protocol stack, and driver model, all depend on the Linux kernel. the Linux kernel is also used as the abstraction layer between hardware and software stacks.
Therefore, the program you develop runs at the application layer, and the package for writing code calls in the development is based on the application framework layer, the components in the application framework must be supported by the system Runtime Library. For example, to log on to the SQLite database, you must access the SQLite database. SQLite is located in the system Runtime Library, you need to enter information when logging on, and you must support the keyboard driver, and various drivers depend on the Linux kernel.
How to write this android system architecture?
First, consider what data needs to be stored on the server, including user data, growth data of vegetables, and chat records.
Second, consider what content is to be displayed in the client app and what content is to be sent.
After sorting out these categories, it is best to organize a document that can be viewed by the leaders and used as development guidance, and then consider the actual development work.
Then, communicate with colleagues in the company and ask them which technologies they can provide you with guidance. Then you can start to buy (borrow) read some introductory books (if not available in the company). (It is best to get started in a few days, A proper method is to write and execute the code according to the example in the book at the same time.) After getting started, go to the company database or the Internet, discover available modules or functions (ask a colleague ). (The above activities should be completed within 10 to 5 minutes of the required time.) Then you can try development.
In just a few short words, no one can complete a system architecture for you. I spoke well upstairs and worked hard. Now there are many tutorials on the internet, whether it is document or video, you can spend more time at home. The company does not want to drive you away from work, but hopes to bring benefits to the company, so don't be upset (or useless, doesn't it ?), Just do it.