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/command_base.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/servo/command_base.py') diff --git a/python/servo/command_base.py b/python/servo/command_base.py index a200fa05f24..881e454d097 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -626,6 +626,13 @@ class CommandBase(object): def android_aar_dir(self): return path.join(self.context.topdir, "target", "android_aar") + def android_adb_path(self, env): + if "ANDROID_SDK" in env: + sdk_adb = path.join(env["ANDROID_SDK"], "platform-tools", "adb") + if path.exists(sdk_adb): + return sdk_adb + return "adb" + def handle_android_target(self, target): if target == "arm-linux-androideabi": self.config["android"]["platform"] = "android-18" -- cgit v1.2.3