【Android System Development】Android Framework and Source Code Structure
【Android System Development】Android Framework and Source Code Structure
code structure
Posted On 2023-03-27 10:23:47 439 0 report
1. Android Framework
Android framework hierarchy: Android is divided into 4 layers from bottom to top;
-- Application layer;
Android's Linux kernel layer consists of the Linux kernel and drivers;
Driver :
-- Binder IPC Driver: Android-specific driver with a separate device node that provides the ability for process
communication;
Parsing Driver:
-- Frame buffer: The video output device contains a video buffer with complete frame data, and the buffer is used
to drive the video display device;
-- ALSA (Advanced Linux Sound Architecture) : Advanced Linux Sound Architecture Driver, this component
provides a sound card driver;
This layer is divided into two parts: the Android runtime and various libraries;
Introduction to various libraries: These libraries are provided in the form of system middleware , which is
closely related to the application of mobile device platforms;
-- C Standard Library: The lowest-level library of the Android system, which calls the system calls of the kernel
to implement the required functions;
-- Media Framework: Android Multimedia Core, is an OpenCore framework based on PacketVideo, with
function 1 audio and video playback, function 2 audio and video recording;
-- SGL : 2D engine;
-- SSL (Secure Socket Layer): It mainly provides security support for data communication between TCP/IP
protocol and application layer protocol.
-- Surface Management (interface management tool) : Manage the functionality of the display subsystem;
-- Execution file: JVM executes .class standard bytecode file, Dalvik virtual machine executes .dex file;
-- The biggest difference: JVM is a stack-based virtual machine, and Dalvik virtual machine is a register-based
virtual machine, which can be better optimized according to the hardware;
Application framework layer: This layer provides the APIs used by the application, including various UI
components and other components, including the following components;
-- Service : service;
4. Application layer
-- Core section : This part is the foundation on which the Android system is built, which is saved in the file of the
root directory;
1. Root (/)
bionic : source code of the base library, C runtime support library libc, libm, libdl, dynamic linker;
bootable/bootloader/legacy: kernel bootloader, the program that runs before loading the kernel;
dalvik : Java Virtual Machine in Android, which provides the basis for running Android applications;
development: templates and tools required for program development, at a high level;
Makefile: The Makefile compiled from the entire Android source code;
samples : sample programs, simple Android programs, which can be used as templates;
openssl: Secure Socket Layer, is a network protocol that provides secure support for data communication;
4. frameworks
-- docs : documentation;
-- libs : library;
-- v** :
-- wifi :
wallpapers : wallpaper;