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

Unified Diff: build/android/pylib/device/commands/install_commands.py

Issue 655723003: [Android] Don't use zip pushing if not built or on user builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « build/all.gyp ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/commands/install_commands.py
diff --git a/build/android/pylib/device/commands/install_commands.py b/build/android/pylib/device/commands/install_commands.py
index 268052fbebfdd09fbafd70ca9f7dcab68fb925b7..35b11e3311db43b10afc3c01c5160cb8ad3a059e 100644
--- a/build/android/pylib/device/commands/install_commands.py
+++ b/build/android/pylib/device/commands/install_commands.py
@@ -22,10 +22,20 @@ exec app_process $base/bin %s $@
def Installed(device):
- return all(device.FileExists('%s/%s' % (BIN_DIR, c)) for c in _COMMANDS)
-
+ return (all(device.FileExists('%s/%s' % (BIN_DIR, c)) for c in _COMMANDS)
+ and device.FileExists('%s/chromium_commands.jar' % _FRAMEWORK_DIR))
def InstallCommands(device):
+ if device.IsUserBuild():
+ raise Exception('chromium_commands currently requires a userdebug build.')
+
+ chromium_commands_jar_path = os.path.join(
+ constants.GetOutDirectory(), constants.SDK_BUILD_JAVALIB_DIR,
+ 'chromium_commands.dex.jar')
+ if not os.path.exists(chromium_commands_jar_path):
+ raise Exception('%s not found. Please build chromium_commands.'
+ % chromium_commands_jar_path)
+
device.RunShellCommand(['mkdir', BIN_DIR, _FRAMEWORK_DIR])
for command, main_class in _COMMANDS.iteritems():
shell_command = _SHELL_COMMAND_FORMAT % (
@@ -36,8 +46,6 @@ def InstallCommands(device):
['chmod', '755', shell_file], check_return=True)
device.adb.Push(
- os.path.join(constants.GetOutDirectory(),
- constants.SDK_BUILD_JAVALIB_DIR,
- 'chromium_commands.dex.jar'),
+ chromium_commands_jar_path,
'%s/chromium_commands.jar' % _FRAMEWORK_DIR)
« no previous file with comments | « build/all.gyp ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698