On all connected devices, you can run the installation command at the same time .
The key is to run adb in a separate process (&).
I came up with the following script for simultaneous burning on all connected devices and finally launched the installed application on each of them:
#!/bin/sh function install_job { adb -s ${x[0]} install -r PATH_TO_YOUR_APK adb -s ${x[0]} shell am start -n "com.example.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER }
Note 1: STDOUT and STDERR are suppressed. You will not see the result of the "adb install" operation. Perhaps this will improve if you really need to
Note 2:, you can also improve the script by specifying args instead of hard-coded path and activity names.
So you:
- No need to manually install on each device
- No need to wait for one installation to complete to complete another (adb tasks run in parallel)
Drew Feb 04 '15 at 12:51 2015-02-04 12:51
source share