CommandUtil

public final class CommandUtil
extends Object

java.lang.Objeto
com.android.sts.common.CommandUtil


Colección de utilidades para ayudar a ejecutar comandos en el dispositivo a través de adb

Resumen

Métodos públicos

static CommandResult runAndCheck (ITestDevice device, String cmd, int retries)

Ejecute el comando de shell en el dispositivo, lanza AssumptionError si el comando no devuelve 0.

static CommandResult runAndCheck (ITestDevice device, String cmd)

Ejecute el comando de shell en el dispositivo, lanza AssumptionError si el comando no devuelve 0.

Métodos públicos

ejecutar y comprobar

public static CommandResult runAndCheck (ITestDevice device, 
                String cmd, 
                int retries)

Ejecute el comando de shell en el dispositivo, lanza AssumptionError si el comando no devuelve 0.

Parámetros
device ITestDevice : el dispositivo a utilizar

cmd String : el comando para ejecutar

retries int : el número de reintentos para intentar

Devoluciones
CommandResult el resultado de device.executeShellV2Command

Lanza
DeviceNotAvailableException

ejecutar y comprobar

public static CommandResult runAndCheck (ITestDevice device, 
                String cmd)

Ejecute el comando de shell en el dispositivo, lanza AssumptionError si el comando no devuelve 0.

Parámetros
device ITestDevice : el dispositivo a utilizar

cmd String : el comando para ejecutar

Devoluciones
CommandResult el resultado de device.executeShellV2Command

Lanza
DeviceNotAvailableException