Crate adb_client

Crate adb_client 

Source
Expand description

§adb_client

MIT licensed Documentation Crates.io Total Downloads MSRV

Rust library implementing ADB protocol.

§Installation

Add adb_client crate as a dependency by simply adding it to your Cargo.toml:

[dependencies]
adb_client = "*"

§Crate features

FeatureDescriptionDefault?
mdnsEnables mDNS device discovery on local network.No
usbEnables interactions with USB devices.No

To deactivate some default features you can use the default-features = false option in your Cargo.toml file and manually specify the features you want to activate:

[dependencies]
adb_client = { version = "*", default-features = false, features = ["mdns", "usb"] }

§Examples

Usage examples can be found in the examples/ directory of this repository.

Some example are also provided in the various README.md files of modules.

§Benchmarks

Benchmarks run on v2.0.6, on a Samsung S10 SM-G973F device and an Intel i7-1265U CPU laptop

§ADBServerDevice push vs adb push

ADBServerDevice performs all operations by using adb server as a bridge.

File sizeSample sizeADBServerDeviceadbDifference
10 MB100350,79 ms356,30 ms
-1,57 %
500 MB5015,60 s15,64 s
-0,25 %
1 GB2031,09 s31,12 s
-0,10 %

Modules§

emulator
Emulator-related definitions
mdnsmdns
MDNS-related definitions
server
Server-related definitions
server_device
Device reachable by the server related definitions
tcp
Device reachable over TCP related definition
usbusb
USB-related definitions

Structs§

ADBListItem
An item list entry on the device.
AdbStatResponse
Represents a stat response

Enums§

ADBListItemType
The different types of item that the ADBListItem can represent.
HostFeatures
Available host features.
RebootType
Type of reboot needed.
RustADBError
Represents all error types that can be thrown by the crate.

Traits§

ADBDeviceExt
Trait representing all features available on ADB devices.

Type Aliases§

Result
Custom Result type thrown by this crate.