| Index: build/android/install_emulator_deps.py
|
| diff --git a/build/android/install_emulator_deps.py b/build/android/install_emulator_deps.py
|
| index 0f40e9dad553b2f329a44dbd64a51809930fd1c0..f4677e658acc449ceaed7cbe201b7df1d302967a 100755
|
| --- a/build/android/install_emulator_deps.py
|
| +++ b/build/android/install_emulator_deps.py
|
| @@ -34,10 +34,9 @@ def CheckSDK():
|
| """Check if SDK is already installed.
|
|
|
| Returns:
|
| - True if android_tools directory exists in current directory.
|
| + True if the third_party/android_tools/sdk directory exists.
|
| """
|
| - return os.path.exists(os.path.join(constants.EMULATOR_SDK_ROOT,
|
| - 'android_tools'))
|
| + return os.path.exists(constants.ANDROID_SDK_ROOT)
|
|
|
|
|
| def CheckARMv7Image():
|
| @@ -47,20 +46,21 @@ def CheckARMv7Image():
|
| True if the armeabi-v7a directory is present inside the Android SDK
|
| checkout directory.
|
| """
|
| - return os.path.exists(os.path.join(constants.EMULATOR_SDK_ROOT,
|
| - 'android_tools', 'sdk', 'system-images',
|
| - API_TARGET, 'armeabi-v7a'))
|
| + return os.path.exists(os.path.join(constants.ANDROID_SDK_ROOT,
|
| + 'system-images',
|
| + API_TARGET,
|
| + 'armeabi-v7a'))
|
|
|
|
|
| def CheckX86Image():
|
| """Check if Android system images have been installed.
|
|
|
| Returns:
|
| - True if android_tools/sdk/system-images directory exists.
|
| + True if the X86 system images exist in
|
| + android_tools/sdk/system-images/<API TARGET>/x86.
|
| """
|
| - return os.path.exists(os.path.join(constants.EMULATOR_SDK_ROOT,
|
| - 'android_tools', 'sdk', 'system-images',
|
| - API_TARGET, 'x86'))
|
| + return os.path.exists(os.path.join(constants.ANDROID_SDK_ROOT,
|
| + 'system-images', API_TARGET, 'x86'))
|
|
|
|
|
| def CheckKVM():
|
| @@ -104,8 +104,8 @@ def GetARMv7Image():
|
| rc = cmd_helper.RunCmd(['unzip', '-o', '/tmp/armv7_img.zip', '-d', '/tmp/'])
|
| if rc:
|
| raise Exception('ERROR: Could not download/unzip image zip.')
|
| - sys_imgs = os.path.join(constants.EMULATOR_SDK_ROOT, 'android_tools', 'sdk',
|
| - 'system-images', API_TARGET, 'armeabi-v7a')
|
| + sys_imgs = os.path.join(constants.ANDROID_SDK_ROOT, 'system-images',
|
| + API_TARGET, 'armeabi-v7a')
|
| shutil.move('/tmp/armeabi-v7a', sys_imgs)
|
| finally:
|
| os.unlink('/tmp/armv7_img.zip')
|
| @@ -119,8 +119,8 @@ def GetX86Image():
|
| rc = cmd_helper.RunCmd(['unzip', '-o', '/tmp/x86_img.zip', '-d', '/tmp/'])
|
| if rc:
|
| raise Exception('ERROR: Could not download/unzip image zip.')
|
| - sys_imgs = os.path.join(constants.EMULATOR_SDK_ROOT, 'android_tools', 'sdk',
|
| - 'system-images', API_TARGET, 'x86')
|
| + sys_imgs = os.path.join(constants.ANDROID_SDK_ROOT, 'system-images',
|
| + API_TARGET, 'x86')
|
| shutil.move('/tmp/x86', sys_imgs)
|
| finally:
|
| os.unlink('/tmp/x86_img.zip')
|
|
|