Detailed explanation of init.rc parameters in the android startup phase

2.1 Action
Action: The timing of executing the corresponding service is determined by the trigger, that is, the statement beginning with on. The specific timing is as follows
:
on early-init; triggered in the early stage of initialization;
on init; triggered in the initialization stage;
on late-init; Triggered in the late stage of initialization;
on boot/charger: Triggered when the system starts/charges, including other situations, which are not listed here;
on property:=: Triggered when the property value meets the condition
2.2 Service
service Service, starting with service, is started by the init process, and generally runs in a sub-process of init, so it is
necessary to determine whether the corresponding executable file exists before starting the service.
The child process generated by init is defined in the rc file, and each service will generate a child process by fork when it starts .
For example: service servicemanager /system/bin/servicemanager means that the service name is
servicemanager, and the service execution path is /system/bin/servicemanager.

2.3 Command
Commonly used commands are listed below
class_start <service_class_name>: Start all services belonging to the same class;
start <service_name>: Start the specified service, if it is already started, skip it;
stop <service_name>: Stop the running service
setprop: Set the attribute value
mkdir: create the specified directory
Tencent Xiangxue Classroom Android

Guess you like

Origin blog.csdn.net/baiyifei2016/article/details/129717855