Android Interfaces
来源:互联网 发布:淘宝恶意骚扰怎么判定 编辑:程序博客网 时间:2024/05/18 23:28
Android Interfaces
IN THIS DOCUMENT
Android Low-Level System Architecture
Android provides you with the freedom to implement your own device specifications and the drivers to support them. The hardware abstraction layer (HAL) gives you a standard way to create software hooks in between the Android platform stack and your hardware. In addition, the Android operating system is open-sourced to help you through your device’s bringup.
To ensure that your devices maintain a high level of quality and offers a consistent experience for your users, they must must also pass the tests in the compatibility test suite (CTS). CTS ensures that anyone building a device meets a quality standard that ensures apps run reliably well and gives users a good experience. For more information, see the Compatibility section.
Android Low-Level System Architecture
Before you begin porting Android to your hardware, it is important to have an understanding of how Android works at a high level. Because your drivers and HAL code interact with many layers of Android code, this understanding can help you find your way through the many layers of code that are available to you through the AOSP (Android Open Source Project) source tree. The following diagram shows a system level view of how Android works:
Figure 1. Android System Architecture
Application framework
This is the level that most application developers concern themselves with. You should be aware of the APIs available to developers as many of them map 1:1 to the underlying HAL interfaces and can provide information as to how to implement your driver.
Binder IPC
The Binder Inter-Process Communication mechanism allows the application framework to cross process boundaries and call into the Android system services code. This basically allows high level framework APIs to interact with Android’s system services. At the application framework level, all of this communication is hidden from the developer and things appear to “just work.”
System services
Most of the functionality exposed through the application framework APIs must communicate with some sort of system service to access the underlying hardware. Services are divided into modular components with focused functionality such as the Window Manager, Search Service, or Notification Manager. System services are grouped into two buckets: system and media. The system services include things such as the Window or Notification Manager. The media services include all the services involved in playing and recording media.
Hardware abstraction layer (HAL)
The HAL serves as a standard interface that allows the Android system to call into the device driver layer while being agnostic about the lower-level implementations of your drivers and hardware. You must implement the corresponding HAL (and driver) for the particular piece of hardware that your product provides. Android does not mandate a standard interaction between your HAL implementation and your device drivers, so you have free reign to do what is best for your situation. However, you must abide by the contract defined in each hardware-specific HAL interface for the Android system to be able to correctly interact with your hardware. HAL implementations are typically built into shared library modules (.so files).
Linux Kernel
For the most part, developing your device drivers is the same as developing a typical Linux device driver. Android uses a specialized version of the Linux kernel with a few special additions such as wakelocks, a memory management system that is more agressive in preserving memory, the Binder IPC driver, and other features that are important for a mobile embedded platform like Android. These additions have less to do with driver development than with the system’s functionality. You can use any version of the kernel that you want as long as it supports the required features, such as the binder driver. However, we recommend using the latest version of the Android kernel. For the latest Android kernel, see Building Kernels.
- Android Interfaces
- Interfaces
- Interfaces
- interfaces
- Android 开发指南 翻译 User Interfaces -- Action Bar
- Android Interfaces and Architecture 安卓接口和架构
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHIC BUFFER HANDLING INTERFACES
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – THE GRAPHIC SURFACE SERVICE INTERFACES
- 8.9 Interfaces
- 20. Interfaces
- IObjectSafety (Interfaces)
- Designing Interfaces
- IObjectSafety (Interfaces)
- 《Designing Interfaces》
- ubuntu interfaces
- Device Interfaces
- Lesson: Interfaces
- GPIO Interfaces
- Android关联源码support-v4的问题解决
- JDPM4使用解析
- AVSpeechSynthesizer文字转语音播放(需真机)详解
- java多线程不单单只是提高程序的执行效率
- 引用、指针、union
- Android Interfaces
- MySQL连接校对:utf8_general_ci与utf8_unicode_ci有什么区别
- 关于ayoutInflater类中inflate用法viewgroup参数的理解
- 移位操作的优先级
- [LeetCode] 022. Generate Parentheses (Medium) (C++/Java/Python)
- QWidget、QMainWindow、QDialog和QFrame的区别
- mysql存储过程详解
- SELinux基本使用
- 跨域访问cookie之CORS的完美解决方案