Dispositivo Stub

public class StubDevice
extends Object implements IDevice

Objeto java.lang.
   ↳ com.android.tradefed.device.StubDevice


Implementación de marcador de posición 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 dejó de estar disponible. usa 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 dejó de estar disponible. usa getBattery(long, TimeUnit) en su lugar.

Integer getBatteryLevel()

Este método dejó de estar disponible. usa 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 dejó de estar disponible. usa getSystemProperty(String) en su lugar.

String getProperty(String name)

String getPropertyCacheOrSync(String name)

Este método dejó de estar disponible. usa getProperty(String) en su lugar.

int getPropertyCount()

Este método dejó de estar disponible. obsoleto en ddmlib con "implementation details" como un motivo.

String getPropertySync(String name)

Este método dejó de estar disponible. usa 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)

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 Stub

public StubDevice (String serial)

Parámetros
serial String

Dispositivo Stub

public StubDevice (String serial, 
                boolean isEmulator)

Parámetros
serial String

isEmulator boolean

Métodos públicos

Conjunto de propiedades

public boolean arePropertiesSet ()

Muestra
boolean

crear

public void createForward (int localPort, 
                String remoteSocketName, 
                IDevice.DeviceUnixSocketNamespace namespace)

Parámetros
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

Arroja
AdbCommandRejectedException
TimeoutException

crear

public void createForward (int localPort, 
                int remotePort)

Parámetros
localPort int

remotePort int

Arroja
AdbCommandRejectedException
TimeoutException

createReverse

public void createReverse (int remotePort, 
                int localPort)

Parámetros
remotePort int

localPort int

Arroja
AdbCommandRejectedException
TimeoutException

Comando runShell

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits)

Parámetros
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

Comando runShell

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

Parámetros
command String

receiver IShellOutputReceiver

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

Comando runShell

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                int maxTimeToOutputResponse)

Este método dejó de estar disponible.
usa executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit).

Parámetros
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse int

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

Comando runShell

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

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getAbis

public  getAbis ()

Muestra

Nombre getAvd

public String getAvdName ()

Muestra
String

getAvdPath

public String getAvdPath ()

Muestra
String

getBatería

public  getBattery (long freshnessTime, 
                TimeUnit timeUnit)

Parámetros
freshnessTime long

timeUnit TimeUnit

Muestra

getBatería

public  getBattery ()

Muestra

getBateríaLevel

public Integer getBatteryLevel (long freshnessMs)

Este método dejó de estar disponible.
usa getBattery(long, TimeUnit) en su lugar.

Parámetros
freshnessMs long

Muestra
Integer

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getBateríaLevel

public Integer getBatteryLevel ()

Este método dejó de estar disponible.
usa getBattery() en su lugar.

Muestra
Integer

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getClient

public Client getClient (String applicationName)

Parámetros
applicationName String

Muestra
Client

getClientName

public String getClientName (int pid)

Parámetros
pid int

Muestra
String

getClients

public Client[] getClients ()

Muestra
Client[]

getDensity

public int getDensity ()

Muestra
int

getFileListingService

public FileListingService getFileListingService ()

Muestra
FileListingService

getLanguage

public String getLanguage ()

Muestra
String

getMountPoint

public String getMountPoint (String name)

Parámetros
name String

Muestra
String

getName

public String getName ()

Muestra
String

getProperties

public  getProperties ()

Este método dejó de estar disponible.
usa getSystemProperty(String) en su lugar.

Muestra

getProperty

public String getProperty (String name)

Parámetros
name String

Muestra
String

getPropertyCacheOrSync

public String getPropertyCacheOrSync (String name)

Este método dejó de estar disponible.
usa getProperty(String) en su lugar.

Parámetros
name String

Muestra
String

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getPropertyCount

public int getPropertyCount ()

Este método dejó de estar disponible.
obsoleto en ddmlib con "implementation details" como un motivo.

Muestra
int

getPropertySync

public String getPropertySync (String name)

Este método dejó de estar disponible.
usa getProperty(String) en su lugar.

Parámetros
name String

Muestra
String

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getRegion

public String getRegion ()

Muestra
String

obtener captura de pantalla

public RawImage getScreenshot ()

Muestra
RawImage

Arroja
AdbCommandRejectedException
TimeoutException

obtener captura de pantalla

public RawImage getScreenshot (long timeout, 
                TimeUnit unit)

Parámetros
timeout long

unit TimeUnit

Muestra
RawImage

Arroja
AdbCommandRejectedException
TimeoutException

getSerialNumber

public String getSerialNumber ()

Muestra
String

getState

public IDevice.DeviceState getState ()

Muestra
IDevice.DeviceState

getSyncService

public SyncService getSyncService ()

Muestra
SyncService

Arroja
AdbCommandRejectedException
TimeoutException

getSystemProperty.

public ListenableFuture<String> getSystemProperty (String name)

Parámetros
name String

Muestra
ListenableFuture<String>

getVersion

public AndroidVersion getVersion ()

Muestra
AndroidVersion

hasClients

public boolean hasClients ()

Muestra
boolean

installPackage

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

Arroja
InstallException

installPackage

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                String... extraArgs)

Parámetros
packageFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

Arroja
InstallException

installPackage

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                String... extraArgs)

Parámetros
packageFilePath String

reinstall boolean

extraArgs String

Arroja
InstallException

installPackages

public void installPackages ( apkFilePaths, 
                boolean reinstall, 
                 extraArgs, 
                long timeOutInMs, 
                TimeUnit timeunit)

Parámetros
apkFilePaths

reinstall boolean

extraArgs

timeOutInMs long

timeunit TimeUnit

Arroja
InstallException

instalarRemotePackage

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                String... extraArgs)

Parámetros
remoteFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

Arroja
InstallException

instalarRemotePackage

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                String... extraArgs)

Parámetros
remoteFilePath String

reinstall boolean

extraArgs String

Arroja
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

Arroja
InstallException

esBootLoader

public boolean isBootLoader ()

Muestra
boolean

isEmulator

public boolean isEmulator ()

Muestra
boolean

Está sin conexión

public boolean isOffline ()

Muestra
boolean

estáEn línea

public boolean isOnline ()

Muestra
boolean

Raíz israí

public boolean isRoot ()

Muestra
boolean

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

pullFile

public void pullFile (String remote, 
                String local)

Parámetros
remote String

local String

Arroja
AdbCommandRejectedException
SyncException
TimeoutException

Archivo push

public void pushFile (String local, 
                String remote)

Parámetros
local String

remote String

Arroja
AdbCommandRejectedException
SyncException
TimeoutException

reiniciar

public void reboot (String into)

Parámetros
into String

Arroja
AdbCommandRejectedException
TimeoutException

quitarReenviar

public void removeForward (int localPort)

Parámetros
localPort int

Arroja
AdbCommandRejectedException
TimeoutException

quitarReenviar

public void removeForward (int localPort, 
                int remotePort)

Parámetros
localPort int

remotePort int

Arroja
AdbCommandRejectedException
TimeoutException

quitarReenviar

public void removeForward (int localPort, 
                String remoteSocketName, 
                IDevice.DeviceUnixSocketNamespace namespace)

Parámetros
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

Arroja
AdbCommandRejectedException
TimeoutException

quitarRemotePackage

public void removeRemotePackage (String remoteFilePath)

Parámetros
remoteFilePath String

Arroja
InstallException

QuitarRevertir

public void removeReverse (int remotePort)

Parámetros
remotePort int

Arroja
AdbCommandRejectedException
TimeoutException

root

public boolean root ()

Muestra
boolean

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

runEventLogService

public void runEventLogService (LogReceiver receiver)

Parámetros
receiver LogReceiver

Arroja
AdbCommandRejectedException
TimeoutException

runLogService

public void runLogService (String logname, 
                LogReceiver receiver)

Parámetros
logname String

receiver LogReceiver

Arroja
AdbCommandRejectedException
TimeoutException

setSerial

public void setSerial (String serial)

Parámetros
serial String

startScreenRecorder

public void startScreenRecorder (String remoteFilePath, 
                ScreenRecorderOptions options, 
                IShellOutputReceiver receiver)

Parámetros
remoteFilePath String

options ScreenRecorderOptions

receiver IShellOutputReceiver

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

admiteFeature

public boolean supportsFeature (IDevice.HardwareFeature arg0)

Parámetros
arg0 IDevice.HardwareFeature

Muestra
boolean

admiteFeature

public boolean supportsFeature (IDevice.Feature feature)

Parámetros
feature IDevice.Feature

Muestra
boolean

SyncPackageToDevice

public String syncPackageToDevice (String localFilePath)

Parámetros
localFilePath String

Muestra
String

Arroja
AdbCommandRejectedException
SyncException
TimeoutException

desinstalar Aplicación

public String uninstallApp (String applicationID, 
                String... extraArgs)

Parámetros
applicationID String

extraArgs String

Muestra
String

Arroja
InstallException

desinstalarPaquete

public String uninstallPackage (String packageName)

Parámetros
packageName String

Muestra
String

Arroja
InstallException