FastbootHelper
public
class
FastbootHelper
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.FastbootHelper |
A helper class for fastboot operations.
Summary
Public constructors | |
|---|---|
FastbootHelper(IRunUtil runUtil, String fastbootPath)
Constructor. |
|
Public methods | |
|---|---|
String
|
executeCommand(String serial, String command)
Executes a fastboot command on a device and return the output. |
|
getBootloaderAndFastbootdDevices()
Returns a map of device serials and whether they are in fastbootd mode or not. |
|
getBootloaderAndFastbootdTcpDevices(
Returns a map of device serials and whether they are in fastbootd mode or not. |
|
getDevices()
Returns a set of device serials in fastboot mode or an empty set if no fastboot devices. |
boolean
|
isFastbootAvailable()
Determine if fastboot is available for use. |
boolean
|
isFastbootd(String serial)
Returns whether or not a device is in Fastbootd instead of Bootloader. |
Public constructors
FastbootHelper
public FastbootHelper (IRunUtil runUtil, String fastbootPath)
Constructor.
| Parameters | |
|---|---|
runUtil |
IRunUtil: a IRunUtil. |
fastbootPath |
String |
Public methods
executeCommand
public String executeCommand (String serial,
String command)Executes a fastboot command on a device and return the output.
| Parameters | |
|---|---|
serial |
String: a device serial. |
command |
String: a fastboot command to run. |
| Returns | |
|---|---|
String |
the output of the fastboot command. null if the command failed. |
getBootloaderAndFastbootdDevices
publicgetBootloaderAndFastbootdDevices ()
Returns a map of device serials and whether they are in fastbootd mode or not.
| Returns | |
|---|---|
|
a Map of serial in bootloader or fastbootd, the boolean is true if in fastbootd |
getBootloaderAndFastbootdTcpDevices
publicgetBootloaderAndFastbootdTcpDevices ( serials)
Returns a map of device serials and whether they are in fastbootd mode or not.
| Parameters | |
|---|---|
serials |
: a map of devices serial number and fastboot mode serial number. |
| Returns | |
|---|---|
|
a Map of serial in bootloader or fastbootd, the boolean is true if in fastbootd |
getDevices
publicgetDevices ()
Returns a set of device serials in fastboot mode or an empty set if no fastboot devices.
| Returns | |
|---|---|
|
a set of device serials. |
isFastbootAvailable
public boolean isFastbootAvailable ()
Determine if fastboot is available for use.
| Returns | |
|---|---|
boolean |
|
isFastbootd
public boolean isFastbootd (String serial)
Returns whether or not a device is in Fastbootd instead of Bootloader.
| Parameters | |
|---|---|
serial |
String |
| Returns | |
|---|---|
boolean |
|