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

Android启动脚本init.rc

 2010-09-14 23:58:00 来源:WEB开发网   
核心提示:(4) Properties(属性)是系统中使用的一些值,可以进行设置和读取,Android启动脚本init.rc(2),setprop ro.FOREGROUND_APP_MEM 1536setprop ro.VISIBLE_APP_MEM 2048on property:ro.kernel.qemu=1start

(4) Properties(属性)是系统中使用的一些值,可以进行设置和读取。

setprop ro.FOREGROUND_APP_MEM 1536

setprop ro.VISIBLE_APP_MEM 2048

on property:ro.kernel.qemu=1

start adbd

setprop 用于设置属性,on property可以用于判断属性,这里的属性在整个Android系统运行中都是一致的。

init脚本的关键字可以参考init进程的system/core/init/keyword.h文件。

init.rc的使用方法,可以参考说明文件system/core/init/readme.txt

如果想要修改启动过程只需要修改init.c(system/core/init)或者init.rc里的内容即可.

附录:system/core/init/readme.txt

Android Init Language

---------------------

The Android Init Language consists of four broad classes of statements,

which are Actions, Commands, Services, and Options.

All of these are line-oriented, consisting of tokens separated by

whitespace. The c-style backslash escapes may be used to insert

whitespace into a token. Double quotes may also be used to prevent

whitespace from breaking text into multiple tokens. The backslash,

when it is the last character on a line, may be used for line-folding.

Lines which start with a # (leading whitespace allowed) are comments.

Actions and Services implicitly declare a new section. All commands

or options belong to the section most recently declared. Commands

or options before the first section are ignored.

Actions and Services have unique names. If a second Action or Service

is declared with the same name as an existing one, it is ignored as

an error. (??? should we override instead)

Actions

-------

Actions are named sequences of commands. Actions have a trigger which

is used to determine when the action should occur. When an event

occurs which matches an action's trigger, that action is added to

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

Tags:Android 启动 脚本

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