#android #adb #usb #tcp #debugging

app adb_cli

Rust ADB (Android Debug Bridge) CLI

11 stable releases

new 2.0.6 Dec 1, 2024
2.0.5 Nov 18, 2024
2.0.1 Oct 31, 2024
1.0.7 Sep 28, 2024
1.0.4 Aug 9, 2024

#409 in Hardware support

Download history 6/week @ 2024-08-17 119/week @ 2024-08-31 119/week @ 2024-09-07 54/week @ 2024-09-14 13/week @ 2024-09-21 186/week @ 2024-09-28 7/week @ 2024-10-05 8/week @ 2024-10-12 67/week @ 2024-10-19 144/week @ 2024-10-26 156/week @ 2024-11-02 106/week @ 2024-11-09 293/week @ 2024-11-16 39/week @ 2024-11-23 126/week @ 2024-11-30

578 downloads per month

MIT license

200KB
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 --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

~23–51MB
~1M SLoC