Quicktip: Send ADB command to all connected devices

When a bug in your Android app is hard to reproduce, it can make sense to install a debuggable version of your app on more than one device. Some helpful folks shared an easy way to adb install to all connected devices with just one command on stackoverflow.
Based on that I created the following alias:

alias adb+=adb devices | tail -n +2 | cut -sf 1 | xargs -IX adb -s X

This performs an adb devices, starts to read from the output’s 2nd line, gets the serial number in each line and for each line builds the command adb -s *serial number*.
For a full explanation you can check out that command on a web site I find quite useful: explainshell
With that alias in place you can now install your app to all connected devices that show up in adb devices with nothing more than this:

adb+ install *your_debuggable.apk*

Quick and easy, isn’t it? 🙂

Quick ADB setup for any Android device

Use Google USB drivers on Windows regardless of the device vendor

Lately I found my self wanting to debug an Android app I’m trying to take care of. When attempting to just activate USB debugging on some test devices and connecting them to my laptop I was reminded that on Windows 7 sadly things are not all that easy.
But there is actually a way around searching the internet for vendor specific device drivers and using just Google’s USB drivers instead. So if you regularly find yourself in the situation of adding new Android test devices to your pool and deploying your apps through ADB from Windows, this might help you speed up your initial setup process. Continue reading “Quick ADB setup for any Android device”