Stop and start netd explicitly for "adb shell stop/start".

netd is supposed to be restarted when the zygote is restarted (see the
"onrestart" section for "service zygote" in init.zygote*.rc). But this
only works if you send a restart command (say via "ctl.restart").

"stop && start" != "restart". It seems ingrained in developers to do
"stop && start", so we don't have much hope of convincing everyone to
switch to "adb shell restart", even if we did add such a toolbox command.

Bug: 15855807
Change-Id: I387fe86600f4a2862abc3a05a2ef9a1e7374e21d
This commit is contained in:
Sreeram Ramachandran 2014-07-19 00:47:59 -07:00
parent d8b00c89bf
commit 018c6a57f3
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ int start_main(int argc, char *argv[])
property_set("ctl.start", argv[1]);
} else {
/* defaults to starting the common services stopped by stop.c */
property_set("ctl.start", "netd");
property_set("ctl.start", "surfaceflinger");
property_set("ctl.start", "zygote");
property_set("ctl.start", "zygote_secondary");

View File

@ -12,6 +12,7 @@ int stop_main(int argc, char *argv[])
property_set("ctl.stop", "zygote_secondary");
property_set("ctl.stop", "zygote");
property_set("ctl.stop", "surfaceflinger");
property_set("ctl.stop", "netd");
}
return 0;