From a631cb6b475b18e77bd6ca9db7ffe2cd94c3bde7 Mon Sep 17 00:00:00 2001 From: Andrew Shu Date: Sat, 24 Mar 2018 15:44:57 -0700 Subject: mach: android install/run: infer adb path from SDK dir --- python/servo/package_commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python/servo/package_commands.py') diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 8fb97e9eb70..b78fa1808e0 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -391,6 +391,7 @@ class PackageCommands(CommandBase): default=None, help='Install the given target platform') def install(self, release=False, dev=False, android=False, target=None): + env = self.build_env() if target and android: print("Please specify either --target or --android.") sys.exit(1) @@ -413,7 +414,7 @@ class PackageCommands(CommandBase): if android: pkg_path = binary_path + ".apk" - exec_command = ["adb", "install", "-r", pkg_path] + exec_command = [self.android_adb_path(env), "install", "-r", pkg_path] elif is_windows(): pkg_path = path.join(path.dirname(binary_path), 'msi', 'Servo.msi') exec_command = ["msiexec", "/i", pkg_path] @@ -426,7 +427,7 @@ class PackageCommands(CommandBase): return result print(" ".join(exec_command)) - return subprocess.call(exec_command, env=self.build_env()) + return subprocess.call(exec_command, env=env) @Command('upload-nightly', description='Upload Servo nightly to S3', -- cgit v1.2.3