mirror of
https://github.com/ARM-software/devlib.git
synced 2025-04-18 07:40:04 +01:00
android: allow to specify a target for fastboot commands
ADB commands always expect a device ID as first parameter, here unfortunately we need to pass it as an optional one to avoid breaking existing clients. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
parent
9d5b1062dd
commit
da588ea091
@ -237,9 +237,10 @@ class AdbConnection(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def fastboot_command(command, timeout=None):
|
def fastboot_command(command, timeout=None, device=None):
|
||||||
_check_env()
|
_check_env()
|
||||||
full_command = "fastboot {}".format(command)
|
target = '-s {}'.format(device) if device else ''
|
||||||
|
full_command = 'fastboot {} {}'.format(target, command)
|
||||||
logger.debug(full_command)
|
logger.debug(full_command)
|
||||||
output, _ = check_output(full_command, timeout, shell=True)
|
output, _ = check_output(full_command, timeout, shell=True)
|
||||||
return output
|
return output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user