#android #adb #usb #tcp #debugging

app adb_cli

Rust ADB (Android Debug Bridge) CLI

9 stable releases

new 2.0.4 Nov 17, 2024
2.0.3 Nov 14, 2024
2.0.1 Oct 31, 2024
1.0.7 Sep 28, 2024
1.0.4 Aug 9, 2024

#429 in Hardware support

Download history 84/week @ 2024-08-04 28/week @ 2024-08-11 2/week @ 2024-08-18 132/week @ 2024-09-01 128/week @ 2024-09-08 34/week @ 2024-09-15 115/week @ 2024-09-22 85/week @ 2024-09-29 5/week @ 2024-10-06 8/week @ 2024-10-13 92/week @ 2024-10-20 130/week @ 2024-10-27 148/week @ 2024-11-03 116/week @ 2024-11-10

487 downloads per month

MIT license

150KB
3.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 --help
Rust ADB (Android Debug Bridge) CLI

Usage: adb_cli [OPTIONS] <COMMAND>

Commands:
  host-features  List available server features
  push           Push a file on device
  pull           Pull a file from device
  list           List a directory on device
  stat           Stat a file specified on device
  shell          Spawn an interactive shell or run a list of commands on the device
  reboot         Reboot the device
  framebuffer    Dump framebuffer of device
  logcat         Get logs of device
  version        Print current ADB version
  kill           Ask ADB server to quit immediately
  devices        List connected devices
  track-devices  Track new devices showing up
  pair           Pair device with a given code
  connect        Connect device over WI-FI
  disconnect     Disconnect device over WI-FI
  sms            Send a SMS with given phone number and given content
  rotate         Rotate device screen from 90°
  help           Print this message or the help of the given subcommand(s)

Options:
  -d, --debug              
  -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
  -V, --version            Print version
  • 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

~14–40MB
~644K SLoC