I'm compiling and installing Android apps using command line and this is what happens when I'm trying to install it on a device:
$> adb devices
List of devices attached
8c092420 device
$> adb install TestApp.apk
error: device not found
- waiting for device -
There is no problem when I use adb -s 8c092420 install TestApp.apk
.
I would like to make some aliases for Linux bash (when I have to do something with a device without copying the device ID as I use several of them), could you please give me an advice how to make this working? Or what may be wrong?
Problem solved. It was because of the environmental variable ANDROID_SERIAL was set to an old device. Use the next command if that happens to you too on linux/unix.
unset ANDROID_SERIAL