StubDevice
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. use 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. use getBattery(long, TimeUnit) en su lugar. |
Integer | getBatteryLevel () Este método está en desuso. use 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. use getProperty(String) en su lugar. |
int | getPropertyCount () Este método está en desuso. en desuso en ddmlib con "detalle de implementación" como motivo. |
String | getPropertySync (String name) Este método está en desuso. use 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
StubDevice
public StubDevice (String serial)
StubDevice
public StubDevice (String serial,
boolean isEmulator)
Parámetros |
---|
serial | String |
isEmulator | boolean |
Métodos públicos
conjunto de propiedades
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 | |
ejecutarShellCommand
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 | |
ejecutarShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)
Parámetros |
---|
command | String |
receiver | IShellOutputReceiver |
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
ejecutarShellCommand
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 ()
getAvdPath
public String getAvdPath ()
obtenerBatería
public getBattery (long freshnessTime,
TimeUnit timeUnit)
Parámetros |
---|
freshnessTime | long |
timeUnit | TimeUnit |
obtenerBatería
public getBattery ()
getBatteryLevel
public Integer getBatteryLevel (long freshnessMs)
Este método está en desuso.
use getBattery(long, TimeUnit)
en su lugar.
Parámetros |
---|
freshnessMs | long |
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getBatteryLevel
public Integer getBatteryLevel ()
Este método está en desuso.
use getBattery()
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
obtenerCliente
public Client getClient (String applicationName)
Parámetros |
---|
applicationName | String |
getClientName
public String getClientName (int pid)
obtenerclientes
public Client[] getClients ()
obtenerDensidad
public int getDensity ()
getFileListingService
public FileListingService getFileListingService ()
Devoluciones |
---|
FileListingService | |
obtenerIdioma
public String getLanguage ()
obtenerPuntoMontaje
public String getMountPoint (String name)
obtenerNombre
public String getName ()
obtenerPropiedad
public String getProperty (String name)
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Este método está en desuso.
use getProperty(String)
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getPropertyCount
public int getPropertyCount ()
Este método está en desuso.
en desuso en ddmlib con "detalle de implementación" como motivo.
obtenerPropertySync
public String getPropertySync (String name)
Este método está en desuso.
use getProperty(String)
en su lugar.
Lanza |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getRegion
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 | |
getSerialNumber
public String getSerialNumber ()
obtenerEstado
public IDevice.DeviceState getState ()
Devoluciones |
---|
IDevice.DeviceState | |
getSyncService
public SyncService getSyncService ()
Lanza |
---|
AdbCommandRejectedException | |
TimeoutException | |
getSystemProperty
public ListenableFuture<String> getSystemProperty (String name)
Devoluciones |
---|
ListenableFuture<String> | |
getVersion
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 |
instalarPaqueteRemoto
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)
Parámetros |
---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
instalarPaqueteRemoto
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
String... extraArgs)
Parámetros |
---|
remoteFilePath | String |
reinstall | boolean |
extraArgs | String |
instalarPaqueteRemoto
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 ()
esEmulador
public boolean isEmulator ()
fuera de linea
public boolean isOffline ()
está en linea
public boolean isOnline ()
esraí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 | |
removeRemotePackage
public void removeRemotePackage (String remoteFilePath)
Parámetros |
---|
remoteFilePath | String |
removeReverse
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 | |
runLogService
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 | |
apoyaCaracterística
public boolean supportsFeature (IDevice.HardwareFeature arg0)
Parámetros |
---|
arg0 | IDevice.HardwareFeature |
apoyaCaracterística
public boolean supportsFeature (IDevice.Feature feature)
Parámetros |
---|
feature | IDevice.Feature |
syncPackageToDevice
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 |
desinstalarPaquete
public String uninstallPackage (String packageName)
Parámetros |
---|
packageName | String |