This question already has an answer here:
I know how to install the apk file in to the emulator by command prompt and all that. But i want to know is it possible to install same apk file in to multiple emulator by giving any specific name ? Actually i have to test one apk file in to many device. and for that i have started many device. I know how to install it. if the all device are open then it will not get install. So is there any alternate to install that apk file by giving any specific device Emulator id or any name ??? Please help me if there is any idea for it. . . Thanks.
Use the following scripts to install apk on multiple devices/emulators.
Remove -r if you are not reinstalling the apk. Also you can replace "install -r /path/to/product.apk" to other adb commands like working on one single device.
It works for me on real devices but I believe it should also works for emulators.
Yes, you can install an apk on a particular device.
In command, type:
Then type:
yes you can install your apk file in multiple emulator for that you have to give the name in command prompt here is the link for guidance
http://developer.android.com/guide/developing/tools/emulator.html
step 1: Get the device Ids all device connected to device
adb devices
step 2: Install to particular device ypu want to install
adb -s deviceId install path+apk
Example:
step 1:
C:\Android\android-sdks\platform-tools>adb devices List of devices attached emulator-5554 device 014FD87107021017 device
step 2:
C:\Android\android-sdks\platform-tools>adb -s 014FD87107021017 install C:\Users\ user\Documents\appname.apk
It is possible to issue install command simultaneously on all connected devices.
The key is to launch
adb
in a separate process (&).I came up with the following script to simultaneously fire-off installation on all of the connected devices of mine and finally launch installed application on each of them:
Note 1: the STDOUT and STDERR are suppressed. You won't see any "adb install" operation result. This may be improved, I guess, if you really have to
Note 2: you could also improve script by providing args instead of hardcoded path and activity names.
That way you:
You can install on multiple devices at a time using USB debugging.
In Eclipse Run--> Run Configurations --> choose your project (on left) -->Target --> Launch on All compatible devices.
The selected project will be installed on all the connected devices