Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: build/android/gyp/apk_install.py

Issue 17335010: Print a nicer error if installing an APK fails when you have not run adb root. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698