pub fn launch_command(
jar: &str,
socket: &str,
idle_exit: Duration,
force: bool,
extra: &[String],
) -> StringExpand description
The shell command that starts the agent from the jar at jar, listening
on socket, and returns at once, leaving it running.
- The token is read from the command’s standard input, so it appears in no command line; the caller writes it followed by a newline.
- The agent is started in the background of a subshell, so it is reparented to init, and dropping the stream that launched it leaves it running: adbd sends SIGHUP to the shell it started, not to the agent, and the agent’s later writes to the closed stdout fail with EPIPE, since ART blocks SIGPIPE. The command ignores both signals as well, in case an adbd signals the whole process group.
- Its standard input is
/dev/null; standard output and error stay on the stream, which carries the ready or conflict line. --idle-exit-msbounds how long it outlives a host that went away,--forcetakes UI automation over from a known automation client, andextraarguments are passed on quoted.