Crates.io | adb-utils |
lib.rs | adb-utils |
version | 0.6.0 |
source | src |
created_at | 2023-08-16 22:04:41.376506 |
updated_at | 2023-12-08 20:37:27.248544 |
description | Rust implementation of commonly used ADB commands |
homepage | |
repository | https://github.com/radu781/adb-utils-rs |
max_upload_size | |
id | 946463 |
size | 42,106 |
Rust implementation of commonly used ADB commands
Get all the photos taken on a certain day
use adb_utils::{manager::ADBManager, shell::ADBList};
fn main() {
let mut manager = ADBManager::new();
manager.cwd("/storage/emulated/0/DCIM/Camera");
if let Err(err) = manager.connect("192.168.1.133", 36415) {
println!("Could not connect: {err}");
return;
}
let mut list = ADBList::default();
let files = manager.execute_path_based(&mut list).unwrap().to_vec();
files
.iter()
.filter(|file| file.starts_with("20230827"))
.for_each(|file| println!("{file}"));
// 20230827_132733.jpg
// 20230827_141248.jpg
}
More usage examples here.
The list of commands is from running adb help