May 2017
Beginner to intermediate
470 pages
10h 49m
English
Services are programs that init launches and (optionally) restarts when they exit. Services take the form of:
service <name> <pathname> [ <argument> ]* <option> <option> ...
The service will be known by init as <name>. The actual name of the binary that is pointed to by <pathname> will not be recognized.
Options are modifiers to services. They affect how and when init runs the service. We can use the following goldfish-specific service as an example:
service goldfish-setup /system/etc/init.goldfish.sh user root group root oneshot
The name of the service is goldfish-setup and it runs the init.goldfish.sh script as the root user. The oneshot option means that this service won't restart when it exits.
Read now
Unlock full access