4个版本
0.7.0 | 2024年3月18日 |
---|---|
0.6.2 | 2023年4月8日 |
0.6.1 | 2023年3月26日 |
0.6.0 | 2023年3月26日 |
#192 in 调试
每月下载量 71次
用于 spytrap-adb
71KB
1.5K SLoC
forensic-adb
基于Rust的,基于mozdevice的Android调试桥接器(adb)的Tokio客户端库。
此代码已从mozilla-central/testing/mozbase/rust/mozdevice 中提取出来,并转换为异步Rust。它还删除了root检测,因此默认情况下不会在远程设备上执行任何命令。
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公共许可证(MPL-2.0)
依赖项
~8–19MB
~263K SLoC