summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authortedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:37:03 +0000
committertedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:37:03 +0000
commit44c4b354a12e74b4af35be64853745ec9afe0d33 (patch)
treeb506f8925ec372a168bbcab684bd49c9724063d8 /build
parent1b97bcce88e16eeb7590be24713f8c5ee772b659 (diff)
downloadchromium_src-44c4b354a12e74b4af35be64853745ec9afe0d33.zip
chromium_src-44c4b354a12e74b4af35be64853745ec9afe0d33.tar.gz
chromium_src-44c4b354a12e74b4af35be64853745ec9afe0d33.tar.bz2
Print a nicer error if installing an APK fails when you have not run adb root.
BUG= Review URL: https://chromiumcodereview.appspot.com/17335010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/android/gyp/apk_install.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py
index 9431b29..ef10c6a 100755
--- a/build/android/gyp/apk_install.py
+++ b/build/android/gyp/apk_install.py
@@ -49,7 +49,10 @@ def RecordInstallMetadata(apk_package, metadata_path):
"""Records the metadata from the device for apk_package."""
metadata = GetMetadata(apk_package)
if not metadata:
- raise 'APK install failed unexpectedly.'
+ if not android_commands.AndroidCommands().IsRootEnabled():
+ raise Exception('APK install failed unexpectedly -- root not enabled on '
+ 'the device (run adb root).')
+ raise Exception('APK install failed unexpectedly.')
with open(metadata_path, 'w') as outfile:
outfile.write(metadata)