From c347861db4cfe5edb4e901f0e348e4a6156f8998 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Mon, 15 Jan 2024 16:38:33 +0000 Subject: [PATCH] android: Ensure we use the detected fastboot Use fastboot as detected by _AndroidEnvironment instead of whatever binary is in PATH. --- devlib/utils/android.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 90424f2..62bd7e3 100755 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -476,7 +476,8 @@ class AdbConnection(ConnectionBase): def fastboot_command(command, timeout=None, device=None): target = '-s {}'.format(quote(device)) if device else '' - full_command = 'fastboot {} {}'.format(target, command) + bin_ = _ANDROID_ENV.get_env('fastboot') + full_command = f'{bin} {target} {command}' logger.debug(full_command) output, _ = check_output(full_command, timeout, shell=True) return output