Android的引导 - 在这里是init%的硬件在%.RC INIT.C阅读?服务正在启动? [英] android boot - where is the init.%hardware%.rc read in init.c ? where are services started?

查看:326
本文介绍了Android的引导 - 在这里是init%的硬件在%.RC INIT.C阅读?服务正在启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过code在 <$ C展望$ C> INIT.C 并试图弄清楚两件事情:

Going through the code in init.c and trying to figure out 2 things:


  • 在哪里硬件初始化特定%硬件.RC%读?

  • Where is the hardware specific init.%hardware%.rc read ?

在哪里服务启动 - 这意味着合子,
/系统/斌/的ServiceManager等

Where are the services started - meaning zygote, /system/bin/servicemanager etc

一个init%硬件的.rc%的一个例子是AP preciated。

An example of an init.%hardware%.rc would be appreciated.

推荐答案

确定了它 - 这两个问题在init.rc回答

Ok got it - both questions are answered in init.rc.

import /init.${ro.hardware}.rc

现在, ro.hardware 从命令行读出(的,的 process_kernel_cmdline 终于 export_kernel_boot_props )。哪里是命令行,嗯......

Now, ro.hardware is read from the command line (main, process_kernel_cmdline and finally export_kernel_boot_props). Where is the command line, well...

服务启动:在主引导动作的引发,其中包含

Services started: in main the boot action is triggered, which contains the lines

class_start core
class_start main

这是启动所有的核心和主要的服务。得到的信息<一个href=\"http://stackoverflow.com/questions/20041794/where-are-the-android-system-services-started/20060853#20060853\">Where在Android系统服务启动?

that start all the core and main services. Got the info from Where are the Android system services started?

注:我指的是奇巧 - 因人而异

NB: I refer to KitKat - YMMV

这篇关于Android的引导 - 在这里是init%的硬件在%.RC INIT.C阅读?服务正在启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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