Protip: Bash Autocomplete for Android ADB

Jesse Chen • February 17, 2012 2 min read

android

Introduction#

This is a super quick tip that will only take 1 minute to make your android development so much easier.  Android Debug Bridge (adb) is a command-line tool that lets you interface with an emulator or an android device.  Its great and previously I wrote about how you can debug your Android app wirelessly on your device.  What sucks though is that you can't tab autocomplete commands (e.g. type adb d then tab and bash will autocomplete and fill out adb devices), which means having to look up adb commands to figure out what you want and/or wasting time by typing the whole command (every ms counts!).

This protip will get you setup with bash autocomplete for ADB in less than 1 minute.  Ready?  Here we go.

Instructions#

if \[ -e /bin/adb.txt \] ; then source /bin/adb.txt fi

And that's it!  I've been looking for something like this for a long time.  Hope it helps you as much as it did for me. :)

© 2021, Jesse Chen • 95e966e