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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Transport-agnostic ADB protocol core.
//!
//! Runs the CNXN/AUTH handshake, multiplexes logical channels over a
//! single byte stream, and parses CNXN banner metadata. Contains no
//! runtime I/O — any type implementing `embedded_io_async::{Read, Write}`
//! can drive it. The service modules (`shell::v1`, `shell::v2`, `exec`,
//! `cmd`, `abb`, `logcat`, `sync`, `reverse`, `track_app`) live at the
//! crate root and build on top of these primitives, as does the crate's
//! [`Error`](crate::Error).
//!
//! # Submodules
//!
//! * [`connection`] — [`Connection`](connection::Connection): the main
//! entry point; handshake, `open` / `open_channel`, feature
//! negotiation, `split` for full-duplex use.
//! * [`channel`] — [`Channel`](channel::Channel) handle,
//! [`ChannelId`](channel::ChannelId), [`SelectResult`](channel::SelectResult)
//! for multi-channel APIs.
//! * [`session`] — [`Session`](session::Session), what the service
//! modules open their channels on: a `Connection` or a split `Writer`;
//! and [`ServiceChannel`](session::ServiceChannel), its open, read and
//! close, which the split `Reader` offers too.
//! * [`auth`] — [`Authenticator`](auth::Authenticator) trait plugged
//! into the AUTH exchange (typically an RSA signer over
//! `~/.android/adbkey`).
//! * [`device_banner`] — parsed `device::…` CNXN banner (properties and
//! advertised features).
//! * [`error`] — [`Error`](crate::Error) and its `Protocol` / `Auth` /
//! `Sync` / `Reverse` / `Decode` / `Logcat` sub-variants. The module
//! lives at the crate root now and is re-exported here.
//! * [`protocol`] — wire-level constants, [`Command`](protocol::Command),
//! [`Feature`](protocol::features::Feature), packet and message
//! framing.
//!
//! The rest is private to the crate:
//!
//! * `channel_table` — every channel's slot, and where a packet from the
//! device lands among them;
//! * `slot` — one channel's entry in it: its state, what it has buffered,
//! and the flow control both ways;
//! * `send_queue` — the order concurrent writers on one channel take its
//! credit in;
//! * `ids` — the ids a channel goes by on the wire, one per end;
//! * `incoming` — channels the device opened, waiting for a verdict;
//! * `negotiated` — what the handshake settled for the life of a
//! connection;
//! * `wire` — sending and receiving whole packets over the transport,
//! and the flag a half-written one leaves set;
//! * `destination` — building the NUL-terminated service strings an
//! OPEN carries;
//! * `recv_buf` — the receive buffer `sync` and `track_app` parse their
//! replies from;
//! * `protobuf` — the protobuf reading `track-app` needs;
//! * `decimal` — a `u32` in ASCII decimal without `core::fmt`, for the
//! numbers `sync` and `shell::v2` send as text.
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub use crateerror;