Index: build/android/install_emulator_deps.py |
diff --git a/build/android/install_emulator_deps.py b/build/android/install_emulator_deps.py |
index 7b122236266a3683319ae1810880431c5e869b7e..724bb7184bcb489b6cf81f93826c7d9b6da0cf8a 100755 |
--- a/build/android/install_emulator_deps.py |
+++ b/build/android/install_emulator_deps.py |
@@ -5,7 +5,7 @@ |
"""Installs deps for using SDK emulator for testing. |
-The script will download the SDK and system images, if they are not present, and |
+The script will download system images, if they are not present, and |
install and enable KVM, if virtualization has been enabled in the BIOS. |
""" |
@@ -19,10 +19,6 @@ from pylib import cmd_helper |
from pylib import constants |
from pylib.utils import run_tests_helper |
-# From the Android Developer's website. |
-SDK_BASE_URL = 'http://dl.google.com/android/adt' |
-SDK_ZIP = 'adt-bundle-linux-x86_64-20130522.zip' |
- |
# Android x86 system image from the Intel website: |
# http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean-bin |
X86_IMG_URL = 'http://download-software.intel.com/sites/landingpage/android/sysimg_x86-17_r01.zip' |
@@ -65,27 +61,6 @@ def CheckKVM(): |
return False |
-def GetSDK(): |
- """Download the SDK and unzip in android_tools directory.""" |
- logging.info('Download Android SDK.') |
- sdk_url = '%s/%s' % (SDK_BASE_URL, SDK_ZIP) |
- try: |
- cmd_helper.RunCmd(['curl', '-o', '/tmp/sdk.zip', sdk_url]) |
- print 'curled unzipping...' |
- rc = cmd_helper.RunCmd(['unzip', '-o', '/tmp/sdk.zip', '-d', '/tmp/']) |
- if rc: |
- logging.critical('ERROR: could not download/unzip Android SDK.') |
- raise |
- # Get the name of the sub-directory that everything will be extracted to. |
- dirname, _ = os.path.splitext(SDK_ZIP) |
- zip_dir = '/tmp/%s' % dirname |
- # Move the extracted directory to EMULATOR_SDK_ROOT |
- dst = os.path.join(constants.EMULATOR_SDK_ROOT, 'android_tools') |
- shutil.move(zip_dir, dst) |
- finally: |
- os.unlink('/tmp/sdk.zip') |
- |
- |
def InstallKVM(): |
"""Installs KVM packages.""" |
rc = cmd_helper.RunCmd(['sudo', 'apt-get', 'install', 'kvm']) |
@@ -127,14 +102,17 @@ def main(argv): |
format='# %(asctime)-15s: %(message)s') |
run_tests_helper.SetLogLevel(verbose_count=1) |
- # Calls below will download emulator SDK and/or system images only if needed. |
- if CheckSDK(): |
- logging.info('android_tools directory already exists (not downloading).') |
- else: |
- GetSDK() |
+ if not CheckSDK(): |
+ logging.critical( |
+ 'ERROR: android_tools does not exist. Make sure your .gclient file ' |
+ 'contains the right \'target_os\' entry. See ' |
+ 'https://code.google.com/p/chromium/wiki/AndroidBuildInstructions for ' |
+ 'more information.') |
+ return 1 |
logging.info('Emulator deps for ARM emulator complete.') |
+ # Download system images only if needed. |
if CheckX86Image(): |
logging.info('system-images directory already exists.') |
else: |