1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! The resident agent from the host side (design D2 and D3): deploying it,
//! reusing or replacing a running one, and the connection a session drives.
//!
//! - [`AgentJar`] is the single-dex jar `agent-android/build.sh` writes and
//! the version its hello must name.
//! - [`Deployer::attach`] reuses a running agent this host started when its
//! protocol and agent versions match, replaces one that does not, and
//! otherwise pushes the jar read-only, starts it detached as the shell user
//! with a per-launch socket name and token, and waits for its ready line.
//! Another holder of UI automation is reported as a [`Conflict`] naming the
//! likely holder, and taken over only with [`DeployOptions::force`].
//! - [`Connection`] drives the protocol crate's `HostSession` over the
//! agent's abstract socket, opened as an adb service stream, on a reader
//! thread that answers pings and delivers responses and events.
//!
//! Nothing is installed on the device: no package, no instrumentation, no
//! forward rule. The pushed jar is deleted once the agent has started, and
//! the agent exits on `shutdown`, on its idle bound without a host, or when a
//! host refuses its protocol version.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;