May 2017
Beginner to intermediate
470 pages
10h 49m
English
The implementation of the init process can be found in the $AOSP/system/core/init directory. If we look at the main function in init.cpp, it includes the code for ueventd and watchdogd, as shown in the following code snippet:
int main(int argc, char** argv) { if (!strcmp(basename(argv[0]), "ueventd")) { return ueventd_main(argc, argv); } if (!strcmp(basename(argv[0]), "watchdogd")) { return watchdogd_main(argc, argv); } ...
We won't discuss ueventd and watchdogd, since they are not related to our topics. We will focus on the mainline code of init.cpp. The mainline code of init implements the following logic:
Read now
Unlock full access