ADB Pro: Install and run an Android app on every connected device (2026 Update)
adb commands to install or run an Android app on a specific connected device — or every device at once — using device IDs, serial numbers, and helper scripts.
I usually have only one device connected when I develop non-UI related parts of the app, but when it comes to UI, I tend to try out the app on as many devices as possible.
There was a time when I actually had physical devices connected all the time (https://ivanmorgillo.com/2016/01/05/first-hardware-project-of-2016-device-holder/), but lately I have been using emulators.
Last week I realized that something changed in my workflow about how I was running the app on multiple devices. Android Studio/IntelliJ has a drop down menu where you select the option:

Once you select “Run on Multiple Devices”, you get a second menu where you select the devices:

You click Run and everything gets built and deployed on every device.
Problem is… it doesn’t remember the selection. There is no way to keep running on multiple devices. You need to open the menu again and go through the two dialogs. That’s too much clicking for me.
OK, I’m Cmd + Shift + A the hell out of it!
Well, not really 😞 The worst part is that you can’t reach the action from the menu:

Deep down I remembered that we had such feature on AS, but why I can’t find it? I looked it up and it turns out, the feature was removed 🤦🏻♂️ Anyway, I got it. Update 2026: While Wireless Debugging is now a thing, the CLI still wins for speed and parallel execution.
Command line solution
Run on multiple devices is basically replicating two commands on every connected device:
- Install the app
- Launch the LAUNCHER Activity
1. Wireless Debugging (The 2026 Way)
Before running commands everywhere, you need to connect your devices. If you are on Android 11+, stop looking for cables. Use Wireless Debugging:
adb pair ipaddr:port
Enter the pairing code shown on your device, then connect with adb connect ipaddr:port. Now your device is part of the “everywhere” fleet.
2. Installing on every device (Parallelized)
From a terminal we can install on every device. But why wait for one by one? Let’s use xargs parallelism:
adb devices | tail -n +2 | cut -sf 1 | xargs -I {} -P 4 adb -s {} install -r path/to/your/app.apk
The -P 4 flag tells xargs to run up to 4 installations simultaneously. If you have a cluster of test devices, this is a lifesaver.
3. Launching the app everywhere
To launch the app on every connected device using adb:
adb devices | tail -n +2 | cut -sf 1 | xargs -I {} -P 4 adb -s {} shell am start -n you.package.name/.YourLauncherActivity
The Pro Script: runEverywhere.sh
Don’t remember these commands. Script them. Here is my updated 2026 version of the runEverywhere script:
#!/bin/bash
# Usage: ./runEverywhere.sh com.package.name/.MainActivity
echo "🚀 Building and installing on all devices..."
./gradlew installDebug
echo "⚡ Launching activity in parallel..."
adb devices | tail -n +2 | cut -sf 1 | xargs -I {} -P 8 adb -s {} shell am start -n $1
Make it executable with chmod +x runEverywhere.sh and you are officially a Senior Dev who doesn’t click menus.
FAQ: ADB Multiple Devices
How to install an APK on a specific device with ADB?
Use adb -s <device_id> install <path_to_apk>. To find the ID, run adb devices.
How to run ADB commands on all connected devices?
Pipe the output of adb devices to xargs as shown in the parallelized examples above.
Does ADB Wireless work with multiple devices?
Yes, once paired and connected via IP, they appear in the adb devices list just like USB-connected hardware.
Conclusions
UIs are cool, but when they fall short, the console is your best friend. In 2026, with wireless debugging and parallel xargs, there is no excuse for wasting time clicking through Android Studio menus. 💪🏻
Happy coding, my friend 😉