Android系统服务正在启动? [英] Where are the Android system services started?

查看:348
本文介绍了Android系统服务正在启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在书中嵌入式Android的,它说:


  

在init.rc,仅一个动作导致命令的执行。服务声明仅用于描述服务,他们没有真正开始什么...(246页)。


所以,哪里都是Android系统服务(例如,的ServiceManager中,vold)开始了吗?我以为他们是通过以下行init.rc启动。但根据这本书,我错了。

 服务的ServiceManager \\ /系统/斌/的ServiceManager服务的vold /系统/斌/的vold


解决方案

我找到了答案。

语句服务的声明仅用于描述服务,他们没有真正开始什么是正确的。本机守护进程实际上是在init.rc通过以下行开始:
(行371-372中的https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc)


  • class_start核心

  • class_start主

其中属于类所有的守护程序的核心的和阶级的主要的分别启动。

In the book Embedded Android, it says

In init.rc, only an action results in the execution of commands. Service declarations only serve to describe services, they do not actually start anything... (page 246).

So, where are the Android system services (e.g., servicemanager, vold) started? I thought they were started in init.rc by the following lines. But according to the book, I was wrong.

service servicemanager \/system/bin/servicemanager

service vold /system/bin/vold

解决方案

I found the answer.

The statement "Service declarations only serve to describe services, they do not actually start anything" is correct. The native daemons are actually started in init.rc by following lines: (lines 371-372 in https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc)

  • class_start core
  • class_start main

where all daemons that belong to class core and class main are started respectively.

这篇关于Android系统服务正在启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆