ADB commands are not always intuitive. They are also not easy to remember. There is also a lot of bad advice out there. ADBX hopes to solve that.
-
Tab completion
-
Command discovery:
-
Package validation
-
Combine common operations into single commands
-
Detecting rooted device. Some operations can't be performed on non-rooted devices. We'll detect that before running commands
-
Encapsulating best practices. There are lots of hacky, half-correct suggestions floating around the internet.
feature | complete |
---|---|
tab completion | X |
command discovery | X |
package validation | X |
detect rooted devices |
Setup wifi connection. This downloads, installs, and runs adb-join-wifi
Sets airplane mode to on or off. Non-rooted devices will require a reboot.
Sets window animation scale, transition animation scale, and animator duration scale.
Clear all app data, including cache and accepted permissions
Disable device's audio, per stream. Supports all AudioManager.STREAM_*
:
- accessibility
- alarm
- dtmf
- music
- notification
- ring
- system
- voice_call
Print device's display size and density
Set display scale. Mimics small, default, large, larger, largest options as if set from system Settings app.
Set accessibility font scale. Mimics small, default, large, largest options as if set from system Settings app.
Launch an app by package name
Show or hide layout bounds
List all installed packages (system and non-system)
Set screen to maximum brightness
Set device night mode (aka dark mode) on, off, or auto. auto will "automatically switches [night mode] based on the device current location and certain other sensors"
List entire dumpsys
for a package, with highlighting for granted and not granted permissions:
Print information on device's processor(s)
Pull all apks from device to local machine, for a given package. Optionally set location on local machine
Reboot device
Capture a device screenshot, saving to optional destination, or current directory with timestamp filename.
Launch system Settings app
List all shared preferences files within a package
Print the content of a single shared preferences file within a single package
Remove a single value from a shared preferences file
Set Talkback on or off
Uninstalls package by name
Print package's version name
These scripts run as ruby commands. Install latest ruby 2.7.1 +
ADBX relies on Bash Completion 2. Read more about why here
- update to latest Bash (4+): directions here
- install
bash-complete@2
read more
$ brew install bash-completion@2
- update
~/.bashrc
by adding
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
- source both
ax
command and completion script. Add to~/.bashrc
:
export PATH=$PATH:path/to/ADBX
source path/to/ADBX/ax_completion.bash
- open new terminal window
$ ax [TAB]
- see list of completable actions