Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions adb_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,44 @@ repository.workspace = true
version.workspace = true

[dependencies]
base64 = { version = "0.22.1" }
getrandom = { version = "*", features = ["js"] }
ring = { version = "*", features = ["wasm32_unknown_unknown_js"] }

bincode = { version = "1.3.3" }
byteorder = { version = "1.5.0" }
base64 = { version = "0.22.1", optional = true }
byteorder = { version = "1.5.0", optional = true }
chrono = { version = "0.4.40", default-features = false, features = ["std"] }
homedir = { version = "0.3.4" }
homedir = { version = "0.3.4", optional = true }
image = { version = "0.25.5", default-features = false }
log = { version = "0.4.26" }
mdns-sd = { version = "0.13.9", default-features = false, features = [
"logging",
] }
num-bigint = { version = "0.8.4", package = "num-bigint-dig" }
num-traits = { version = "0.2.19" }
quick-protobuf = { version = "0.8.1" }
rand = { version = "0.9.0" }
], optional = true }
num-bigint = { version = "0.8.4", package = "num-bigint-dig", optional = true }
num-traits = { version = "0.2.19", optional = true }
quick-protobuf = { version = "0.8.1", optional = true }
rand = { version = "0.8.5", optional = true }
rcgen = { version = "0.13.1", default-features = false, features = [
"aws_lc_rs",
"pem",
] }
regex = { version = "1.11.1", features = ["perf", "std", "unicode"] }
rsa = { version = "0.9.7" }
rusb = { version = "0.9.4", features = ["vendored"] }
rustls = { version = "0.23.27" }
rustls-pki-types = { version = "1.11.0" }
], optional = true }
regex = { version = "1.11.1", features = [
"perf",
"std",
"unicode",
], optional = true }
rsa = { version = "0.9.7", optional = true }
rusb = { version = "0.9.4", features = ["vendored"], optional = true }
rustls = { version = "0.23.27", optional = true }
rustls-pki-types = { version = "1.11.0", optional = true }
serde = { version = "1.0.216", features = ["derive"] }
serde_repr = { version = "0.1.19" }
sha1 = { version = "0.10.6", features = ["oid"] }
serde_repr = { version = "0.1.19", optional = true }
sha1 = { version = "0.10.6", features = ["oid"], optional = true }
thiserror = { version = "2.0.7" }

[dev-dependencies]
anyhow = { version = "1.0.93" }
criterion = { version = "0.5.1" } # Used for benchmarks
criterion = { version = "0.6.0" } # Used for benchmarks

[[bench]]
harness = false
Expand Down
28 changes: 22 additions & 6 deletions adb_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,37 @@
mod adb_device_ext;
mod constants;
mod device;
mod emulator_device;
mod error;
mod mdns;
mod models;
mod transports;

#[cfg(not(target_arch = "wasm32"))]
mod emulator_device;
#[cfg(not(target_arch = "wasm32"))]
mod mdns;

#[cfg(not(target_arch = "wasm32"))]
mod server;
#[cfg(not(target_arch = "wasm32"))]
mod server_device;
mod transports;
#[cfg(not(target_arch = "wasm32"))]
mod utils;

pub use adb_device_ext::ADBDeviceExt;
pub use device::{ADBTcpDevice, ADBUSBDevice};
pub use emulator_device::ADBEmulatorDevice;
pub use device::ADBUSBDevice;
pub use error::{Result, RustADBError};
pub use mdns::*;
pub use models::{AdbStatResponse, RebootType};
pub use transports::{ADBMessageTransport, ADBTransport};

#[cfg(not(target_arch = "wasm32"))]
pub use device::ADBTcpDevice;
#[cfg(not(target_arch = "wasm32"))]
pub use emulator_device::ADBEmulatorDevice;
#[cfg(not(target_arch = "wasm32"))]
pub use mdns::*;
#[cfg(not(target_arch = "wasm32"))]
pub use server::*;
#[cfg(not(target_arch = "wasm32"))]
pub use server_device::ADBServerDevice;
#[cfg(not(target_arch = "wasm32"))]
pub use transports::*;
2 changes: 1 addition & 1 deletion pyadb_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ name = "stub_gen"
[dependencies]
adb_client = { path = "../adb_client" }
anyhow = { version = "1.0.95" }
pyo3 = { version = "0.24.1", features = ["abi3-py37", "anyhow"] }
pyo3 = { version = "0.25.0", features = ["abi3-py37", "anyhow"] }
pyo3-stub-gen = "0.7.0"
pyo3-stub-gen-derive = "0.7.0"
1 change: 0 additions & 1 deletion pyadb_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ usb_device.push("file.txt", "/data/local/tmp/file.txt")

```bash
# Create Python virtual environment
cd pyadb_client
python3 -m venv .venv
source .venv/bin/activate

Expand Down
Loading