Dispositivo auxiliar
public class StubDevice
extends Object
implements IDevice
java.lang.Objeto | |
↳ | com.android.tradefed.device.StubDevice |
|
|
Implementación de marcador de posición de código auxiliar de un IDevice
.
Resumen
Constructores públicos | |
---|---|
StubDevice (String serial) | |
StubDevice (String serial, boolean isEmulator) |
Métodos públicos | |
---|---|
boolean | arePropertiesSet () |
void | createForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace) |
void | createForward (int localPort, int remotePort) |
void | createReverse (int remotePort, int localPort) |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputResponse, TimeUnit maxTimeUnits) |
void | executeShellCommand (String command, IShellOutputReceiver receiver) |
void | executeShellCommand (String command, IShellOutputReceiver receiver, int maxTimeToOutputResponse) Este método está en desuso. utilice |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits) |
getAbis () | |
String | getAvdName () |
String | getAvdPath () |
getBattery (long freshnessTime, TimeUnit timeUnit) | |
getBattery () | |
Integer | getBatteryLevel (long freshnessMs) Este método está en desuso. utilice |
Integer | getBatteryLevel () Este método está en desuso. utilice |
Client | getClient (String applicationName) |
String | getClientName (int pid) |
Client[] | getClients () |
int | getDensity () |
FileListingService | getFileListingService () |
String | getLanguage () |
String | getMountPoint (String name) |
String | getName () |
getProperties () Este método está en desuso. utilice | |
String | getProperty (String name) |
String | getPropertyCacheOrSync (String name) Este método está en desuso. utilice |
int | getPropertyCount () Este método está en desuso. obsoleto en ddmlib con "detalles de implementación" como motivo. |
String | getPropertySync (String name) Este método está en desuso. utilice |
String | getRegion () |
RawImage | getScreenshot () |
RawImage | getScreenshot (long timeout, TimeUnit unit) |
String | getSerialNumber () |
IDevice.DeviceState | getState () |
SyncService | getSyncService () |
ListenableFuture<String> | getSystemProperty (String name) |
AndroidVersion | getVersion () |
boolean | hasClients () |
void | installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs) |
void | installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs) |
void | installPackage (String packageFilePath, boolean reinstall, String... extraArgs) |
void | installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit) installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit) installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit) |
void | installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs) |
void | installRemotePackage (String remoteFilePath, boolean reinstall, String... extraArgs) |
void | installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs) |
boolean | isBootLoader () |
boolean | isEmulator () |
boolean | isOffline () |
boolean | isOnline () |
boolean | isRoot () |
void | pullFile (String remote, String local) |
void | pushFile (String local, String remote) |
void | reboot (String into) |
void | removeForward (int localPort) |
void | removeForward (int localPort, int remotePort) |
void | removeForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace) |
void | removeRemotePackage (String remoteFilePath) |
void | removeReverse (int remotePort) |
boolean | root () |
void | runEventLogService (LogReceiver receiver) |
void | runLogService (String logname, LogReceiver receiver) |
void | setSerial (String serial) |
void | startScreenRecorder (String remoteFilePath, ScreenRecorderOptions options, IShellOutputReceiver receiver) |
boolean | supportsFeature (IDevice.HardwareFeature arg0) |
boolean | supportsFeature (IDevice.Feature feature) |
String | syncPackageToDevice (String localFilePath) |
String | uninstallApp (String applicationID, String... extraArgs) |
String | uninstallPackage (String packageName)
|
Constructores públicos
Dispositivo auxiliar
public StubDevice (String serial)
Parámetros | |
---|---|
serial | String |
Dispositivo auxiliar
public StubDevice (String serial, boolean isEmulator)
Parámetros | |
---|---|
serial | String |
isEmulator | boolean |
Métodos públicos
sonPropiedadesConjunto
public boolean arePropertiesSet ()
Devoluciones | |
---|---|
boolean |
crearadelante
public void createForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)
Parámetros | |
---|---|
localPort | int |
remoteSocketName | String |
namespace | IDevice.DeviceUnixSocketNamespace |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
crearadelante
public void createForward (int localPort, int remotePort)
Parámetros | |
---|---|
localPort | int |
remotePort | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
crearReverse
public void createReverse (int remotePort, int localPort)
Parámetros | |
---|---|
remotePort | int |
localPort | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
ejecutar ShellCommand
public void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)
Parámetros | |
---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
ejecutar ShellCommand
public void executeShellCommand (String command, IShellOutputReceiver receiver)
Parámetros | |
---|---|
command | String |
receiver | IShellOutputReceiver |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
ejecutar ShellCommand
public void executeShellCommand (String command, IShellOutputReceiver receiver, int maxTimeToOutputResponse)
Este método está en desuso.
utilice executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit)
.
Parámetros | |
---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputResponse | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
ejecutar ShellCommand
public void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)
Parámetros | |
---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
obtenerAbis
publicgetAbis ()
Devoluciones | |
---|---|
getAvdName
public String getAvdName ()
Devoluciones | |
---|---|
String |
obtenerAvdPath
public String getAvdPath ()
Devoluciones | |
---|---|
String |
obtener batería
publicgetBattery (long freshnessTime, TimeUnit timeUnit)
Parámetros | |
---|---|
freshnessTime | long |
timeUnit | TimeUnit |
Devoluciones | |
---|---|
obtener batería
publicgetBattery ()
Devoluciones | |
---|---|
obtener nivel de batería
public Integer getBatteryLevel (long freshnessMs)
Este método está en desuso.
utilice getBattery(long, TimeUnit)
en su lugar.
Parámetros | |
---|---|
freshnessMs | long |
Devoluciones | |
---|---|
Integer |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
obtener nivel de batería
public Integer getBatteryLevel ()
Este método está en desuso.
utilice getBattery()
en su lugar.
Devoluciones | |
---|---|
Integer |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
obtenerCliente
public Client getClient (String applicationName)
Parámetros | |
---|---|
applicationName | String |
Devoluciones | |
---|---|
Client |
obtenerNombreCliente
public String getClientName (int pid)
Parámetros | |
---|---|
pid | int |
Devoluciones | |
---|---|
String |
obtenerClientes
public Client[] getClients ()
Devoluciones | |
---|---|
Client[] |
obtenerDensidad
public int getDensity ()
Devoluciones | |
---|---|
int |
obtener servicio de listado de archivos
public FileListingService getFileListingService ()
Devoluciones | |
---|---|
FileListingService |
obtenerIdioma
public String getLanguage ()
Devoluciones | |
---|---|
String |
obtenerMountPoint
public String getMountPoint (String name)
Parámetros | |
---|---|
name | String |
Devoluciones | |
---|---|
String |
obtenerNombre
public String getName ()
Devoluciones | |
---|---|
String |
obtenerPropiedades
publicgetProperties ()
Este método está en desuso.
utilice getSystemProperty(String)
en su lugar.
Devoluciones | |
---|---|
obtener propiedad
public String getProperty (String name)
Parámetros | |
---|---|
name | String |
Devoluciones | |
---|---|
String |
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Este método está en desuso.
utilice getProperty(String)
en su lugar.
Parámetros | |
---|---|
name | String |
Devoluciones | |
---|---|
String |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
getPropertyCount
public int getPropertyCount ()
Este método está en desuso.
obsoleto en ddmlib con "detalles de implementación" como motivo.
Devoluciones | |
---|---|
int |
obtenerPropertySync
public String getPropertySync (String name)
Este método está en desuso.
utilice getProperty(String)
en su lugar.
Parámetros | |
---|---|
name | String |
Devoluciones | |
---|---|
String |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
obtenerRegión
public String getRegion ()
Devoluciones | |
---|---|
String |
obtener captura de pantalla
public RawImage getScreenshot ()
Devoluciones | |
---|---|
RawImage |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
obtener captura de pantalla
public RawImage getScreenshot (long timeout, TimeUnit unit)
Parámetros | |
---|---|
timeout | long |
unit | TimeUnit |
Devoluciones | |
---|---|
RawImage |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
obtener número de serie
public String getSerialNumber ()
Devoluciones | |
---|---|
String |
obtener estado
public IDevice.DeviceState getState ()
Devoluciones | |
---|---|
IDevice.DeviceState |
obtener servicio de sincronización
public SyncService getSyncService ()
Devoluciones | |
---|---|
SyncService |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
obtener propiedad del sistema
public ListenableFuture<String> getSystemProperty (String name)
Parámetros | |
---|---|
name | String |
Devoluciones | |
---|---|
ListenableFuture<String> |
obtener versión
public AndroidVersion getVersion ()
Devoluciones | |
---|---|
AndroidVersion |
tieneClientes
public boolean hasClients ()
Devoluciones | |
---|---|
boolean |
paquete de instalación
public void installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs)
Parámetros | |
---|---|
packageFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
extraArgs | String |
Lanza | |
---|---|
InstallException |
paquete de instalación
public void installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs)
Parámetros | |
---|---|
packageFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
Lanza | |
---|---|
InstallException |
paquete de instalación
public void installPackage (String packageFilePath, boolean reinstall, String... extraArgs)
Parámetros | |
---|---|
packageFilePath | String |
reinstall | boolean |
extraArgs | String |
Lanza | |
---|---|
InstallException |
instalarPaquetes
public void installPackages (apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit)
Parámetros | |
---|---|
apkFilePaths | |
reinstall | boolean |
extraArgs | |
timeOutInMs | long |
timeunit | TimeUnit |
Lanza | |
---|---|
InstallException |
instalarRemotePackage
public void installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs)
Parámetros | |
---|---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
Lanza | |
---|---|
InstallException |
instalarRemotePackage
public void installRemotePackage (String remoteFilePath, boolean reinstall, String... extraArgs)
Parámetros | |
---|---|
remoteFilePath | String |
reinstall | boolean |
extraArgs | String |
Lanza | |
---|---|
InstallException |
instalarRemotePackage
public void installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs)
Parámetros | |
---|---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
extraArgs | String |
Lanza | |
---|---|
InstallException |
esBootLoader
public boolean isBootLoader ()
Devoluciones | |
---|---|
boolean |
es emulador
public boolean isEmulator ()
Devoluciones | |
---|---|
boolean |
fuera de linea
public boolean isOffline ()
Devoluciones | |
---|---|
boolean |
está en linea
public boolean isOnline ()
Devoluciones | |
---|---|
boolean |
es raíz
public boolean isRoot ()
Devoluciones | |
---|---|
boolean |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
extraer archivo
public void pullFile (String remote, String local)
Parámetros | |
---|---|
remote | String |
local | String |
Lanza | |
---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException |
empujar archivo
public void pushFile (String local, String remote)
Parámetros | |
---|---|
local | String |
remote | String |
Lanza | |
---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException |
reiniciar
public void reboot (String into)
Parámetros | |
---|---|
into | String |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
eliminarAdelante
public void removeForward (int localPort)
Parámetros | |
---|---|
localPort | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
eliminarAdelante
public void removeForward (int localPort, int remotePort)
Parámetros | |
---|---|
localPort | int |
remotePort | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
eliminarAdelante
public void removeForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)
Parámetros | |
---|---|
localPort | int |
remoteSocketName | String |
namespace | IDevice.DeviceUnixSocketNamespace |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
eliminar paquete remoto
public void removeRemotePackage (String remoteFilePath)
Parámetros | |
---|---|
remoteFilePath | String |
Lanza | |
---|---|
InstallException |
eliminarRevertir
public void removeReverse (int remotePort)
Parámetros | |
---|---|
remotePort | int |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
raíz
public boolean root ()
Devoluciones | |
---|---|
boolean |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
ejecutarEventLogService
public void runEventLogService (LogReceiver receiver)
Parámetros | |
---|---|
receiver | LogReceiver |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
ejecutarLogService
public void runLogService (String logname, LogReceiver receiver)
Parámetros | |
---|---|
logname | String |
receiver | LogReceiver |
Lanza | |
---|---|
AdbCommandRejectedException | |
TimeoutException |
setSerial
public void setSerial (String serial)
Parámetros | |
---|---|
serial | String |
iniciarScreenRecorder
public void startScreenRecorder (String remoteFilePath, ScreenRecorderOptions options, IShellOutputReceiver receiver)
Parámetros | |
---|---|
remoteFilePath | String |
options | ScreenRecorderOptions |
receiver | IShellOutputReceiver |
Lanza | |
---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException |
soportaCaracterística
public boolean supportsFeature (IDevice.HardwareFeature arg0)
Parámetros | |
---|---|
arg0 | IDevice.HardwareFeature |
Devoluciones | |
---|---|
boolean |
soportaCaracterística
public boolean supportsFeature (IDevice.Feature feature)
Parámetros | |
---|---|
feature | IDevice.Feature |
Devoluciones | |
---|---|
boolean |
sincronizarPaqueteAlDispositivo
public String syncPackageToDevice (String localFilePath)
Parámetros | |
---|---|
localFilePath | String |
Devoluciones | |
---|---|
String |
Lanza | |
---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException |
desinstalar aplicación
public String uninstallApp (String applicationID, String... extraArgs)
Parámetros | |
---|---|
applicationID | String |
extraArgs | String |
Devoluciones | |
---|---|
String |
Lanza | |
---|---|
InstallException |
desinstalar paquete
public String uninstallPackage (String packageName)
Parámetros | |
---|---|
packageName | String |
Devoluciones | |
---|---|
String |
Lanza | |
---|---|
InstallException |