12 stable releases

2.1.0 Dec 18, 2024
2.0.6 Dec 1, 2024
2.0.5 Nov 18, 2024
2.0.1 Oct 31, 2024
1.0.4 Aug 9, 2024

#210 in Hardware support

Download history 179/week @ 2024-09-25 18/week @ 2024-10-02 6/week @ 2024-10-09 6/week @ 2024-10-16 107/week @ 2024-10-23 196/week @ 2024-10-30 74/week @ 2024-11-06 324/week @ 2024-11-13 95/week @ 2024-11-20 117/week @ 2024-11-27 29/week @ 2024-12-04 5/week @ 2024-12-11 131/week @ 2024-12-18 5/week @ 2025-01-08

137 downloads per month

MIT license

195KB
4.5K SLoC

adb_cli

MIT licensed Crates.io Total Downloads

Rust binary providing an improved version of adb CLI.

Rust binary

This crate provides a lightweight binary based on the adb_client crate. You can install it by running the following command :

cargo install adb_cli 

Usage is quite simple, and tends to look like adb:

  • To use ADB server as a proxy:
user@laptop ~/adb_client (main)> adb_cli local --help
Device related commands using server

Usage: adb_cli local [OPTIONS] <COMMAND>

Commands:
  shell          Spawn an interactive shell or run a list of commands on the device
  pull           Pull a file from device
  push           Push a file on device
  stat           Stat a file on device
  run            Run an activity on device specified by the intent
  reboot         Reboot the device
  install        Install an APK on device
  framebuffer    Dump framebuffer of device
  host-features  List available server features
  list           List a directory on device
  logcat         Get logs of device
  help           Print this message or the help of the given subcommand(s)

Options:
  -a, --address <ADDRESS>  [default: 127.0.0.1:5037]
  -s, --serial <SERIAL>    Serial id of a specific device. Every request will be sent to this device
  -h, --help               Print help
  • To interact directly with end devices
user@laptop ~/adb_client (main)> adb_cli usb --help
Device commands via USB, no server needed

Usage: adb_cli usb [OPTIONS] --vendor-id <VID> --product-id <PID> <COMMAND>

Commands:
  shell   Spawn an interactive shell or run a list of commands on the device
  pull    Pull a file from device
  push    Push a file on device
  stat    Stat a file on device
  reboot  Reboot the device
  help    Print this message or the help of the given subcommand(s)

Options:
  -v, --vendor-id <VID>                    Hexadecimal vendor id of this USB device
  -p, --product-id <PID>                   Hexadecimal product id of this USB device
  -k, --private-key <PATH_TO_PRIVATE_KEY>  Path to a custom private key to use for authentication
  -h, --help                               Print help

Dependencies

~23–51MB
~1M SLoC