Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the Android system services started?

In the book Embedded Android, it says

In init.rc, only an action results in the execution of commands. Service declarations only serve to describe services, they do not actually start anything... (page 246).

So, where are the Android system services (e.g., servicemanager, vold) started? I thought they were started in init.rc by the following lines. But according to the book, I was wrong.

service servicemanager \/system/bin/servicemanager

service vold /system/bin/vold
like image 431
Da Ha Song Avatar asked Oct 28 '25 10:10

Da Ha Song


1 Answers

I found the answer.

The statement "Service declarations only serve to describe services, they do not actually start anything" is correct. The native daemons are actually started in init.rc by following lines: (lines 371-372 in https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc)

  • class_start core
  • class_start main

where all daemons that belong to class core and class main are started respectively.

like image 198
Da Ha Song Avatar answered Oct 31 '25 00:10

Da Ha Song