It's cumbersome to set ANDROID_SERIAL
if you have multiple android devices connected.
You can easily switch ANDROID_SERIAL
with this program.
This program is written in Go. You need to install Go first.
-
install Go
-
$ go build
-
Write following line in your .bashrc.
alias ad='export ANDROID_SERIAL=`adbdevices`'
user@ubuntu:~/project/go/adbdevices$ ad
1) device 0146910xxxxxxxxx
which device?: 1
user@ubuntu:~/project/go/adbdevices$ echo $ANDROID_SERIAL
0146910xxxxxxxxx
user@ubuntu:~/project/go/adbdevices$