Dispositivo auxiliar
public class StubDevice
extends Object
implements IDevice
java.lang.Objeto |
↳ | com.android.tradefed.device.StubDevice |
Subclases directas conocidas |
Subclases indirectas conocidas |
Implementación de marcador de posición de código auxiliar de un IDevice
.
Resumen
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 executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit) . |
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 getBattery(long, TimeUnit) en su lugar. |
Integer | getBatteryLevel () Este método está en desuso. utilice getBattery() en su lugar. |
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 getSystemProperty(String) en su lugar. |
String | getProperty (String name) |
String | getPropertyCacheOrSync (String name) Este método está en desuso. utilice getProperty(String) en su lugar. |
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 getProperty(String) en su lugar. |
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)
Dispositivo auxiliar
public StubDevice (String serial,
boolean isEmulator)
Parámetros |
---|
serial | String |
isEmulator | boolean |
Métodos públicos
sonPropiedadesConjunto
public boolean arePropertiesSet ()
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
public getAbis ()
getAvdName
public String getAvdName ()
obtenerAvdPath
public String getAvdPath ()
obtener batería
public getBattery (long freshnessTime,
TimeUnit timeUnit)
Parámetros |
---|
freshnessTime | long |
timeUnit | TimeUnit |
obtener batería
public getBattery ()
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 |
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
obtener nivel de batería
public Integer getBatteryLevel ()
Este método está en desuso.
utilice getBattery()
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
obtenerCliente
public Client getClient (String applicationName)
Parámetros |
---|
applicationName | String |
obtenerNombreCliente
public String getClientName (int pid)
obtenerClientes
public Client[] getClients ()
obtenerDensidad
public int getDensity ()
obtener servicio de listado de archivos
public FileListingService getFileListingService ()
Devoluciones |
---|
FileListingService | |
obtenerIdioma
public String getLanguage ()
obtenerMountPoint
public String getMountPoint (String name)
obtenerNombre
public String getName ()
obtener propiedad
public String getProperty (String name)
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Este método está en desuso.
utilice getProperty(String)
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getPropertyCount
public int getPropertyCount ()
Este método está en desuso.
obsoleto en ddmlib con "detalles de implementación" como motivo.
obtenerPropertySync
public String getPropertySync (String name)
Este método está en desuso.
utilice getProperty(String)
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
obtenerRegión
public String getRegion ()
obtener captura de pantalla
public RawImage getScreenshot ()
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
obtener captura de pantalla
public RawImage getScreenshot (long timeout,
TimeUnit unit)
Parámetros |
---|
timeout | long |
unit | TimeUnit |
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
obtener número de serie
public String getSerialNumber ()
obtener estado
public IDevice.DeviceState getState ()
Devoluciones |
---|
IDevice.DeviceState | |
obtener servicio de sincronización
public SyncService getSyncService ()
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
obtener propiedad del sistema
public ListenableFuture<String> getSystemProperty (String name)
Devoluciones |
---|
ListenableFuture<String> | |
obtener versión
public AndroidVersion getVersion ()
Devoluciones |
---|
AndroidVersion | |
tieneClientes
public boolean hasClients ()
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 |
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 |
paquete de instalación
public void installPackage (String packageFilePath,
boolean reinstall,
String... extraArgs)
Parámetros |
---|
packageFilePath | String |
reinstall | boolean |
extraArgs | String |
instalarPaquetes
public void installPackages ( apkFilePaths,
boolean reinstall,
extraArgs,
long timeOutInMs,
TimeUnit timeunit)
Parámetros |
---|
apkFilePaths | |
reinstall | boolean |
extraArgs | |
timeOutInMs | long |
timeunit | TimeUnit |
instalarRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)
Parámetros |
---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
instalarRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
String... extraArgs)
Parámetros |
---|
remoteFilePath | String |
reinstall | boolean |
extraArgs | String |
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 |
esBootLoader
public boolean isBootLoader ()
es emulador
public boolean isEmulator ()
fuera de linea
public boolean isOffline ()
está en linea
public boolean isOnline ()
es raíz
public boolean isRoot ()
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)
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
eliminarAdelante
public void removeForward (int localPort)
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 |
eliminarRevertir
public void removeReverse (int remotePort)
Parámetros |
---|
remotePort | int |
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
raíz
public boolean root ()
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)
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 |
soportaCaracterística
public boolean supportsFeature (IDevice.Feature feature)
Parámetros |
---|
feature | IDevice.Feature |
sincronizarPaqueteAlDispositivo
public String syncPackageToDevice (String localFilePath)
Parámetros |
---|
localFilePath | String |
Lanza |
---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException | |
desinstalar aplicación
public String uninstallApp (String applicationID,
String... extraArgs)
Parámetros |
---|
applicationID | String |
extraArgs | String |
desinstalar paquete
public String uninstallPackage (String packageName)
Parámetros |
---|
packageName | String |