/
View dependency graph
Depends on
- dh-cargo (dh-sequence-cargo)
- rust-bstr (librust-bstr-1+default-dev)
- rust-log (librust-log-0.4+default-dev, librust-log-0.4+std-dev)
- rust-once-cell (librust-once-cell-1+default-dev)
- cargo, debhelper-compat, librust-regex-1+perf-dev, librust-regex-1+std-dev, librust-tempfile-3+default-dev, librust-thiserror-2+default-dev, librust-tokio-1+default-dev, librust-tokio-1+fs-dev, librust-tokio-1+io-util-dev, librust-tokio-1+net-dev, librust-uuid-1+default-dev, librust-uuid-1+serde-dev, librust-uuid-1+v4-dev, librust-walkdir-2+default-dev, libstd-rust-dev, rustc
README (full)
forensic-adb
Tokio based client library for the Android Debug Bridge (adb) based on mozdevice for Rust.
This code has been extracted from mozilla-central/testing/mozbase/rust/mozdevice and ported to async Rust. It also removes root detection so no commands are executed on the remote device by default.
use forensic_adb::{AndroidStorageInput, DeviceError, Host};
#[tokio::main]
async fn main() -> Result<(), DeviceError> {
let host = Host::default();
let devices = host.devices::<Vec<_>>().await?;
println!("Found devices: {:?}", devices);
let device = host
.device_or_default(Option::<&String>::None, AndroidStorageInput::default())
.await?;
println!("Selected device: {:?}", device);
let output = device.execute_host_shell_command("id").await?;
println!("Received response: {:?}", output);
Ok(())
}
License
Mozilla Public License (MPL-2.0)
| dir | .github/ |
| dir | debian/ |
| dir | examples/ |
| dir | src/ |
| file | .cargo_vcs_info.json |
| file | .gitignore |
| file | Cargo.lock |
| file | Cargo.toml |
| file | Cargo.toml.orig |
| file | LICENSE |
| file | README.md |