Crates.io | forensic-adb |
lib.rs | forensic-adb |
version | |
source | src |
created_at | 2023-03-26 18:41:56.324319+00 |
updated_at | 2025-03-28 16:34:56.488894+00 |
description | Tokio based client library for the Android Debug Bridge (adb) based on mozdevice |
homepage | |
repository | https://github.com/kpcyrd/forensic-adb |
max_upload_size | |
id | 821479 |
Cargo.toml error: | TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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(())
}
Mozilla Public License (MPL-2.0)