WEB开发网
开发学院手机开发Android 开发 Android启动脚本init.rc 阅读

Android启动脚本init.rc

 2010-09-14 23:58:00 来源:WEB开发网   
核心提示:usethis command. You must instead request the capabilities in-process whilestill root, and then drop to your desired uid.group < groupname> [ < groupna
use

this command. You must instead request the capabilities in-process while

still root, and then drop to your desired uid.

group < groupname> [ < groupname> ]*

Change to groupname before exec'ing this service. Additional

groupnames beyond the (required) first one are used to set the

supplemental groups of the process (via setgroups()).

Currently defaults to root. (??? probably should default to nobody)

oneshot

Do not restart the service when it exits.

class < name>

Specify a class name for the service. All services in a

named class may be started or stopped together. A service

is in the class "default" if one is not specified via the

class option.

onrestart

Execute a Command (see below) when service restarts.

Triggers

--------

Triggers are strings which can be used to match certain kinds

of events and used to cause an action to occur.

boot

This is the first trigger that will occur when init starts

(after /init.conf is loaded)

< name>=< value>

Triggers of this form occur when the property < name> is set

to the specific value < value>.

device-added-< path>

device-removed-< path>

Triggers of these forms occur when a device node is added

or removed.

service-exited-< name>

Triggers of this form occur when the specified service exits.

Commands

--------

exec < path> [ < argument> ]*

Fork and execute a program (< path>). This will block until

the program completes execution. It is best to avoid exec

as unlike the builtin commands, it runs the risk of getting

上一页  1 2 3 4 5 6 7  下一页

Tags:Android 启动 脚本

编辑录入:coldstar [复制链接] [打 印]
赞助商链接