In Eclipse, can I run an application in multiple emulators at the same time?

When testing Android layouts, I constantly create three different emulators from Eclipse (with ADT), so I have to run it three times, and then select each one. Is there any configuration or plugin that allows me to click "Run" once, and the application is running in all three?

+2
source share
2 answers

I finally did it. I am in a Mac environment, so I used Applescript to simplify setting some variables, but this can be done directly from the terminal.

set apkref to "install -r /path/to/your/app.apk"
set appref to "shell am start -a android.intent.action.MAIN -n
com.example.app/com.example.app.MainActivity"
set sourceref to "/path/to/android/tools/"

set devices to do shell script sourceref & "adb devices |  grep \"[device]$\" | 
sed  's/.device/\\ /' | sed  's/^/\\adb -s /' | sed  's@$@\\" & apkref &
" \\&" & "@' | sed  's@^@\\" & sourceref & "@' 
| sed -E -e :a -e '$!N; s/\\n/ /g; ta'"
do shell script devices

set devices to do shell script sourceref & "adb devices |  grep \"[device]$\" | 
sed  's/.device/\\ /' | sed  's/^/\\adb -s /' | sed  's@$@\\" & appref & 
" \\&" & "@' | sed  's@^@\\" & sourceref & "@' 
| sed -E -e :a -e '$!N; s/\\n/ /g; ta'" 
do shell script devices

, . sed , .

script apk , adb. , adb - -r. , , . & &, , .

script .

, - sed, .

, Automator logcat adb (, ctrl + c logcat, ).

, Automator, Eclipse Mac OS X . , .

Growl Automator, , adb .

+2

, , 3 !:)

, Android ... , , script. "adb devices" , , :

adb -s < serial-number > install app.apk

adb -s < serial-number > shell am start -a android.intent.action.MAIN -n org.example.app/org.example.app.MainActivity

+2

Source: https://habr.com/ru/post/1781459/


All Articles