Crates.io | adb_client |
lib.rs | adb_client |
version | 1.0.2 |
source | src |
created_at | 2022-01-05 10:08:23.355008 |
updated_at | 2024-07-13 17:04:51.596564 |
description | Rust ADB (Android Debug Bridge) client library |
homepage | |
repository | https://github.com/cocool97/adb_client |
max_upload_size | |
id | 508307 |
size | 63,996 |
Android Debug Bridge (ADB) client implementation in pure Rust !
Main features :
First declare adb_client
as a dependency by simply adding this to your Cargo.toml
:
[dependencies]
adb_client = "*"
use adb_client::AdbTcpConnection;
use std::net::Ipv4Addr;
let mut connection = AdbTcpConnection::new(Ipv4Addr::from([127,0,0,1]), 5037).unwrap();
connection.shell_command(None, ["df", "-h"]);
use adb_client::AdbTcpConnection;
use std::net::Ipv4Addr;
let mut connection = AdbTcpConnection::new(Ipv4Addr::from([127,0,0,1]), 5037).unwrap();
connection.devices();
use adb_client::AdbTcpConnection;
use std::net::Ipv4Addr;
use std::fs::File;
use std::path::Path;
let mut connection = AdbTcpConnection::new(Ipv4Addr::from([127,0,0,1]), 5037).unwrap();
let mut input = File::open(Path::new("/tmp")).unwrap();
connection.send::<&str,&str>(None, &mut input, "/data/local/tmp");
This crate also provides a lightweight binary based on the adb_client
crate. You can install it by running the following command :
cargo install adb_client --example adb_cli
All pull requests are welcome !