Expand description
Async Rust client for the Android Debug Bridge (adb) server smartsocket protocol. A port of adbutils-python.
let adb = adbutils::AdbClient::default();
for device in adb.device_list().await? {
println!("{}: {}", device.serial().unwrap_or("?"), device.shell("echo hi").await?);
}Re-exports§
pub use client::AdbClient;pub use device::AdbDevice;pub use sync::Sync;pub use errors::AdbError;pub use errors::Result;pub use proto::*;
Modules§
- apk
- Minimal APK inspection. Replacement for the
apkutilsdependency used byinstall.py— just enough to recover thepackagename from a binaryAndroidManifest.xml, which is all the install flow needs (launch usesmonkey, so the main activity is not required). - client
- adb server host commands. Port of
BaseClient(_adb.py) +AdbClient(__init__.py). - conn
- Async smartsocket connection. Port of
AdbConnectioninadbutils/_adb.py. - device
- Device operations. Port of
BaseDevice(_device_base.py). - errors
- Error types. Port of
adbutils/errors.py. - install
- APK install. Port of
adbutils/install.py(InstallExtension). - pidcat
- Compact logcat colorizer. Inspired by
adbutils/pidcat.py(a port of Jake Wharton’s pidcat). This is a focused subset: it streamslogcat -v brief, filters by minimum priority and optional tag substrings, and colorizes the priority column with ANSI codes. - proto
- Wire data types. Port of
adbutils/_proto.py. - screenrecord
- Screen recording. Port of
adbutils/screenrecord.py. - screenshot
- Screen capture. Port of
adbutils/screenshot.py(ScreenshotExtesion). - shell
- High-level shell helpers. Port of
adbutils/shell.py(ShellExtension). - sync
- File sync sub-protocol. Port of
adbutils/sync.py. - utils
- Helpers. Port of
adbutils/_utils.py(subset; extended in later milestones).
Functions§
- adb
- Construct a client pointed at the default adb server (
127.0.0.1:5037, overridable viaANDROID_ADB_SERVER_HOST/ANDROID_ADB_SERVER_PORT). Equivalent to the module-leveladbsingleton in the Python library.