Index: build/android/gyp/apk_install.py |
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py |
index 9431b29df0bbad750423bdb89bb0ada6fd3bb07f..ef10c6a3bd695403c8d661460f8e3a38d5ee930e 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) |