简体   繁体   English

创建自定义 Android ROM

[英]Creating a Custom Android ROM

I am preparing to build a custom Android ROM and I have come across some misunderstandings that I need clarified before moving forward.我正准备构建一个定制的 Android ROM,我遇到了一些误解,我需要在继续之前澄清这些误解。 My Android ROM will be rebranded and I would like to customize the OS stack but I am not sure I fully understand the concept of HAL(Hardware abstraction layer).我的 Android ROM 将被重新命名,我想自定义操作系统堆栈,但我不确定我是否完全理解 HAL(硬件抽象层)的概念。 I understand that I can create kernel modules to extend the OS but I am not sure what the HAL purpose is within the stack.我知道我可以创建 kernel 模块来扩展操作系统,但我不确定 HAL 在堆栈中的用途是什么。 How does the HAL and the kernel interact if at all?如果有的话,HAL 和 kernel 是如何交互的?

What is the HAL?什么是 HAL? When is the HAL implemented? HAL 何时实施?

Another layer of the stack I am looking at is the Android System Services layer.我正在查看的堆栈的另一层是 Android 系统服务层。 Would it be possible to add / modify a system service on the stack?是否可以在堆栈上添加/修改系统服务? If so, would I need to create a Binder IPC for the System Service to be called from the application framework?如果是这样,我是否需要为要从应用程序框架调用的系统服务创建一个 Binder IPC?

I have read the documentation from the AOSP website but that is where my misunderstandings is coming from.我已经阅读了 AOSP 网站上的文档,但这就是我的误解的来源。

If anyone can help me overcome these shortcomings I would greatly appreciate it!如果有人能帮助我克服这些缺点,我将不胜感激!

Ok, so I can answer your question about HAL but not so much about messing with Android services.好的,所以我可以回答你关于 HAL 的问题,但不能回答你关于搞乱 Android 服务的问题。

HAL is basically all of the files in the /dev directory on Linux systems. HAL 基本上是 Linux 系统上 /dev 目录中的所有文件。 These files communicate with the kernel module/driver when you write to it.这些文件在您写入时与 kernel 模块/驱动程序通信。 This basically, if the driver of the certain device you want to write to allows it, allows you to communicate with the device from a very high level point.这基本上,如果您要写入的特定设备的驱动程序允许它,则允许您从非常高的级别与设备进行通信。 Take a look into basic tutorials about writing kernel modules and udev.查看有关编写 kernel 模块和 udev 的基本教程。 In the case of building Android though, you probably won't have to mess around with this and know it through and through unless you are making custom kernels and stuff.但是,在构建 Android 的情况下,除非您正在制作自定义内核和其他东西,否则您可能不必搞砸并彻底了解它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM