mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00: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:
		@@ -237,9 +237,10 @@ class AdbConnection(object):
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def fastboot_command(command, timeout=None):
 | 
			
		||||
def fastboot_command(command, timeout=None, device=None):
 | 
			
		||||
    _check_env()
 | 
			
		||||
    full_command = "fastboot {}".format(command)
 | 
			
		||||
    target = '-s {}'.format(device) if device else ''
 | 
			
		||||
    full_command = 'fastboot {} {}'.format(target, command)
 | 
			
		||||
    logger.debug(full_command)
 | 
			
		||||
    output, _ = check_output(full_command, timeout, shell=True)
 | 
			
		||||
    return output
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user