简体   繁体   中英

Stopping a daemon from running in Android's init.rc

Is there a way to send some kind of event to Android init process to stop re-launching a daemon after it dies ?

Before Android 4.3, the file init.rc could be replaced, but now, it's impossible to write over it without flushing the entire filesystem.

You can communicate with init.rc using ctl. system properties. For example:

setprop ctl.stop media

will stop the mediaserver, and it will not restart. Use ctl.start to start it, or ctl.restart to restart it.

(These are parsed by from handle_control_message() in init.c .)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM