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
//! Pure-Rust Android Debug Bridge (ADB) client.
//!
//! `rsadb` speaks the ADB transport protocol directly to `adbd` over USB
//! (via [`nusb`]) or TCP, with no `adb` binary, no libusb and no C code.
//! It can also talk to a running Google adb server when something else
//! (Android Studio, say) already holds the USB interface.
//!
//! ```no_run
//! use rsadb::{Device, Session, auth, transport};
//! use std::time::Duration;
//!
//! # async fn demo() -> rsadb::Result<()> {
//! let key = auth::load_or_generate(&auth::default_key_paths()?, "me@laptop")?;
//! let usb = transport::usb::find(None).await?;
//! let session = Session::connect(transport::usb::open(&usb).await?, &key, Duration::from_secs(60)).await?;
//! let device = Device::new(session);
//! println!("{}", device.getprop("ro.product.model").await?);
//! # Ok(()) }
//! ```
//!
//! # Feature flags
//!
//! * `usb` (default) — direct USB transport through `nusb`.
//! * `tcp` (default) — direct TCP transport (`adb connect` targets, emulators).
//! * `host-client` (default) — client for a running Google adb server.
//! * `cli` (default) — the `rsadb` command-line binary (pulls in `clap`).
//! * `hardware` — enables ignored integration tests that need a real device.
pub use HostKey;
pub use ;
pub use Device;
pub use ;
pub use ;
pub use Transport;
/// Compiles the code blocks in README.md as doctests.