Skip to content

darren109/sadb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sadb

  • Interactive adb: when connecting multiple devices, select 1, 2 or more devices to execute a command
  • Support for setting alias (e.g. adb alias.topActivity "shell dumpsys activity top | grep ACTIVITY")
  • Support for execute alias (e.g. adb topActivity)

Installation-sadb

sudo su
curl https://raw.githubusercontent.com/darren109/sadb/main/sadb > /usr/bin/sadb && sudo chmod a+x /usr/bin/sadb

or

git clone https://github.com/darren109/sadb.git ~/sadb
sudo mv ~/sadb/sadb /usr/bin/ && sudo chmod a+x /usr/bin/sadb && rm -rf ~/sadb

or

$ su
$ curl https://raw.githubusercontent.com/darren109/sadb/main/install.sh | bash

and then add alias adb="sadb" to ~/.bashrc or ~/.bash_profile

Installation-sadb-completion

bash

# linux
$ sudo cp ./sadb-completion.bash /usr/share/bash-completion/completions/
# mac os
$ sudo cp ./sadb-completion.bash /usr/local/share/bash-completion/completions/

zsh

# linux
$ sudo cp ./sadb-completion.bash /usr/share/bash-completion/completions/
# mac os
$ sudo cp ./sadb-completion.bash /usr/local/share/bash-completion/completions/

# zsh add config
$ cd ~
$ vim .zshrc
# adding the following content to your .zshrc file.
source /usr/share/bash-completion/completions/sadb-completion.bash

Requirements

  • bash version needs to be greater than v3.2
    1. declare -A is not supported before v3.2
    2. bash --version to view bash version

To-do

  • Select a device to execute a command
  • Setting alias (e.g. adb alias.ws "shell wm size")

Demo

Demo of the sadb script

About

adb multi-select mode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 77.9%
  • Python 22.1%