Chromium Code Reviews| Index: build/android/avd.py |
| diff --git a/build/android/avd.py b/build/android/avd.py |
| index 50720ed4016a3c91254854b7ed32183815907d89..9904e5d1622df307403e1303c356dfacb07b98fd 100755 |
| --- a/build/android/avd.py |
| +++ b/build/android/avd.py |
| @@ -20,11 +20,10 @@ from devil.utils import cmd_helper |
| from pylib import constants |
| from pylib.utils import emulator |
| - |
| def main(argv): |
| # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch |
| # the emulator to find the system images upon launch. |
| - emulator_sdk = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk') |
| + emulator_sdk = constants.ANDROID_SDK_ROOT |
|
mikecase (-- gone --)
2015/09/12 00:10:16
You will have to rebase this change against https:
jbudorick
2015/09/12 00:14:08
note that
1) my CL will take a few days, so if an
Yoland Yan(Google)
2015/09/12 01:42:38
Done
|
| os.environ['ANDROID_SDK_ROOT'] = emulator_sdk |
| opt_parser = optparse.OptionParser(description='AVD script.') |
| @@ -45,6 +44,12 @@ def main(argv): |
| format='# %(asctime)-15s: %(message)s') |
| logging.root.setLevel(logging.INFO) |
| + # Check if SDK exist in ANDROID_SDK_ROOT |
| + if not install_emulator_deps.CheckSDK(): |
| + logging.critical('ERROR: Emulator SDK not installed in %s' |
| + % constants.ANDROID_SDK_ROOT) |
| + return 1 |
| + |
| # Check if KVM is enabled for x86 AVD's and check for x86 system images. |
| # TODO(andrewhayden) Since we can fix all of these with install_emulator_deps |
| # why don't we just run it? |
| @@ -58,16 +63,11 @@ def main(argv): |
| 'install_emulator_deps.py') |
| return 1 |
| - if not install_emulator_deps.CheckSDK(): |
| - logging.critical('ERROR: Emulator SDK not installed. Run ' |
| - 'install_emulator_deps.py.') |
| - return 1 |
| - |
| # If AVD is specified, check that the SDK has the required target. If not, |
| # check that the SDK has the desired target for the temporary AVD's. |
| api_level = options.api_level |
| if options.name: |
| - android = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk', 'tools', |
| + android = os.path.join(constants.ANDROID_SDK_ROOT, 'tools', |
| 'android') |
| avds_output = cmd_helper.GetCmdOutput([android, 'list', 'avd']) |
| names = re.findall(r'Name: (\w+)', avds_output) |