Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
Give newly-created Android emulators their own sdcard TIMOB-4064
Browse files Browse the repository at this point in the history
  • Loading branch information
billdawson authored and donthorp committed Jun 29, 2011
1 parent bd3fe07 commit 36839ec
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions support/android/builder.py
Expand Up @@ -342,12 +342,16 @@ def create_avd(self,avd_id,avd_skin):
name = name.replace(' ', '_')
if not os.path.exists(self.home_dir):
os.makedirs(self.home_dir)
if not os.path.exists(self.sdcard):
info("Creating shared 64M SD card for use in Android emulator(s)")
run.run([self.sdk.get_mksdcard(), '64M', self.sdcard])

avd_path = os.path.join(self.android_home_dir, 'avd')
my_avd = os.path.join(avd_path,"%s.avd" % name)
own_sdcard = os.path.join(self.home_dir, '%s.sdcard' % name)
if not os.path.exists(my_avd) or os.path.exists(own_sdcard):
# starting with 1.7.2, when we create a new avd, give it its own
# SDCard as well.
self.sdcard = own_sdcard
if not os.path.exists(self.sdcard):
info("Creating 64M SD card for use in Android emulator")
run.run([self.sdk.get_mksdcard(), '64M', self.sdcard])
if not os.path.exists(my_avd):
info("Creating new Android Virtual Device (%s %s)" % (avd_id,avd_skin))
inputgen = os.path.join(template_dir,'input.py')
Expand Down

0 comments on commit 36839ec

Please sign in to comment.