Monday, February 02, 2009
Running multiple Android emulators
A little script to fire up multiple Google Android emulators that have their own image, i.e. can save their data separately.
It then kills any adb server that may be running, starts a new one, and lists the running emulators.
-skin HVGA-L : 480x320, landscape, puts the emulator of the screen sideways
There are other options for skin:
-data droids/droid-01.img : a different number for each running emulator ensures they save their data to their own area.
-verbose : lots of logging information. Can slow the emulator down to the point where they give error messages because they run things too slow...
-logcat : the first rule of logcat is: no one talks about logcat.
It then kills any adb server that may be running, starts a new one, and lists the running emulators.
#! /bin/bash
xterm -geometry 132x100+100+100 -sb -e bash -c '/Library/android-sdk-mac_x86-1.0_r2/tools/emulator -skin HVGA-L -data droids/droid-01.img -verbose -logcat "out"' &
xterm -geometry 132x100+200+200 -sb -e bash -c '/Library/android-sdk-mac_x86-1.0_r2/tools/emulator -skin HVGA-L -data droids/droid-02.img -verbose -logcat "out"' &
xterm -geometry 132x100+300+300 -sb -e bash -c '/Library/android-sdk-mac_x86-1.0_r2/tools/emulator -skin HVGA-L -data droids/droid-03.img -verbose -logcat "out"' &
sleep 30s
/Library/android-sdk-mac_x86-1.0_r2/tools/adb kill-server
/Library/android-sdk-mac_x86-1.0_r2/tools/adb start-server
/Library/android-sdk-mac_x86-1.0_r2/tools/adb devices
-skin HVGA-L : 480x320, landscape, puts the emulator of the screen sideways
There are other options for skin:
HVGA-P
is default. QVGA-L
gives a 320x240, landscape and QVGA-P
is 240x320, portrait-data droids/droid-01.img : a different number for each running emulator ensures they save their data to their own area.
-verbose : lots of logging information. Can slow the emulator down to the point where they give error messages because they run things too slow...
-logcat : the first rule of logcat is: no one talks about logcat.
Labels: google android
Comments:
<< Home
Thx for this example, How much ram does each emulator take up, how many could i run on a dual cpu with 4Gigs of ram.. just curious :)
Post a Comment
Subscribe to Post Comments [Atom]
<< Home
Subscribe to Posts [Atom]