Learn the Android platform architecture and source code structure of the embedded Development Board

Source: Internet
Author: User
Tags vector font

This article is forwarded to the Forum information: http://www.topeetboard.com

Recommended Learning embedded Development Board platform: ITOP-4412 Development Board

Here's an image from Google that shows the main components of the Android system.

As can be seen, the Android system architecture consists of 5 parts, namely: Linux Kernel, Android Runtime, Libraries, Application Framework, applications.
In fact, this part of the SDK documentation has done a good job for us, to do is to take doctrine, and then add their own understanding. Next, pick up the scalpel to dissect the sections and bottom up to analyze each layer.
1. Platform Architecture
Linux Kernel
Android provides core system services based on Linux, 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. In other words, each layer provides a fixed sap (Service Access point), which can be said to be high cohesion and low-coupling. If you're just doing app development, there's no need to get into the Linux kernel layer.
Android 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. Since Dex has to be optimized, it will increase 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.
Libraries (local library)
Android consists of a collection of C + + libraries that are used by various components of the Android system. These features are exposed to developers through the Android application framework (application framework), which lists some of the core libraries below.
System C Library-BSD derivative of standard C system library (LIBC), tuned to embedded Linux based devices
Media Library-Opencore based on PacketVideo. These libraries support the playback and recording of many popular audio and video formats, as well as still image files, including MPEG4, H, MP3, AAC, AMR, JPG, PNG
Interface Management-Manage access to display subsystems and seamlessly combine two-and three-dimensional graphics layers across multiple applications
libwebcore-a new web browser engine that drives Android browsers and embedded web views
sgl-Basic 2D Graphics engine
3D Library-based on the implementation of OpenGL ES 1.0 APIs. Library uses hardware 3D acceleration or contains highly optimized 3D software gratings
freetype-bitmap and Vector font rendering
sqlite-powerful and lightweight relational database engine that can be used by all applications
Application Framework
By providing an open development platform, Android enables developers to develop extremely rich and innovative applications. Developers are free to take advantage of device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much more.
Developers can fully use the framework APIs used by the core application. The architecture of an application is designed to simplify the reuse of components, and any application can publish his functionality and any other application can use these features (subject to the security restrictions enforced by the framework). This mechanism allows the user to replace a component.

All applications are actually a set of services and systems, including:
View-a rich, extensible collection of views that can be used to build an application. Includes lists, grids, text boxes, buttons, and even embedded web browser
Content Providers-enables applications to access data from other applications (such as communications) or share their own data
Explorer (Resource Manager)-Provides access to non-code resources such as localized strings, graphics, and layout files
Notification Manager (Notification Manager)-Enables all applications to display custom warnings in the status bar
Activity Manager Manager)-Manages the application lifecycle and provides a common navigation fallback feature
Applications
Android assembles a core collection of applications, including email clients, SMS programs, calendars, maps, browsers, contacts, and other settings. All applications are written in the Java programming language. A richer application awaits us to develop!
2 Source structure
Google provides Android contains the original Android target machine code, host compilation tools, simulation environment, the code package after decompression, the first level of directories and files as follows:
|-- Makefile (Global Makefile)
|--bionic (bionic meaning bionic, which is the source code of some underlying libraries)
|--bootloader (bootloader)
|--Build (The content in the build directory is not the code used by the target, but the scripts and tools needed to compile and configure it)
|--Dalvik (Java Virtual machine)
|--development (templates and tools needed for program development)
|-- External (some libraries used by the target machine)
|--frameworks (application's framework layer)
|--hardware (Hardware-related libraries)
|--Kernel (source code for Linux)
|-- Packages (various Android apps)
|--prebuilt (preset scripts compiled by Android on various platforms)
|--recovery (related to the recovery function of the target)
|-- System (some libraries at the bottom of Android)

Learning the Android platform architecture and source structure of the embedded Development Board

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.