Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1766)

Side by Side Diff: build/android/pylib/utils/emulator.py

Issue 17094019: Create sdcard image for emulator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use --sdkcard option to android create. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Provides an interface to start and stop Android emulator. 7 """Provides an interface to start and stop Android emulator.
8 8
9 Assumes system environment ANDROID_NDK_ROOT has been set. 9 Assumes system environment ANDROID_NDK_ROOT has been set.
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 else: 195 else:
196 abi_option = 'x86' 196 abi_option = 'x86'
197 197
198 avd_command = [ 198 avd_command = [
199 self.android, 199 self.android,
200 '--silent', 200 '--silent',
201 'create', 'avd', 201 'create', 'avd',
202 '--name', self.avd_name, 202 '--name', self.avd_name,
203 '--abi', abi_option, 203 '--abi', abi_option,
204 '--target', API_TARGET, 204 '--target', API_TARGET,
205 '--sdcard', '512M',
gkanwar 2013/06/21 01:20:00 It probably makes sense to make this value a const
navabi 2013/06/21 01:30:08 Done.
205 '--force', 206 '--force',
206 ] 207 ]
207 avd_cmd_str = ' '.join(avd_command) 208 avd_cmd_str = ' '.join(avd_command)
208 logging.info('Create AVD command: %s', avd_cmd_str) 209 logging.info('Create AVD command: %s', avd_cmd_str)
209 avd_process = pexpect.spawn(avd_cmd_str) 210 avd_process = pexpect.spawn(avd_cmd_str)
210 211
211 # Instead of creating a custom profile, we overwrite config files. 212 # Instead of creating a custom profile, we overwrite config files.
212 avd_process.expect('Do you wish to create a custom hardware profile') 213 avd_process.expect('Do you wish to create a custom hardware profile')
213 avd_process.sendline('no\n') 214 avd_process.sendline('no\n')
214 avd_process.expect('Created AVD \'%s\'' % self.avd_name) 215 avd_process.expect('Created AVD \'%s\'' % self.avd_name)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 logging.critical('emulator _ShutdownOnSignal') 360 logging.critical('emulator _ShutdownOnSignal')
360 for sig in self._SIGNALS: 361 for sig in self._SIGNALS:
361 signal.signal(sig, signal.SIG_DFL) 362 signal.signal(sig, signal.SIG_DFL)
362 self.Shutdown() 363 self.Shutdown()
363 raise KeyboardInterrupt # print a stack 364 raise KeyboardInterrupt # print a stack
364 365
365 def _InstallKillHandler(self): 366 def _InstallKillHandler(self):
366 """Install a handler to kill the emulator when we exit unexpectedly.""" 367 """Install a handler to kill the emulator when we exit unexpectedly."""
367 for sig in self._SIGNALS: 368 for sig in self._SIGNALS:
368 signal.signal(sig, self._ShutdownOnSignal) 369 signal.signal(sig, self._ShutdownOnSignal)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698