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 detail" como 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 ()

Devuelve
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 ()

Devuelve

Nombre getAvd

public String getAvdName ()

Devuelve
String

getAvdPath

public String getAvdPath ()

Devuelve
String

getBatería

public  getBattery (long freshnessTime, 
                TimeUnit timeUnit)

Parámetros
freshnessTime long

timeUnit TimeUnit

Devuelve

getBatería

public  getBattery ()

Devuelve

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

Devuelve
Integer

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getBateríaLevel

public Integer getBatteryLevel ()

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

Devuelve
Integer

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getClient

public Client getClient (String applicationName)

Parámetros
applicationName String

Devuelve
Client

getClientName

public String getClientName (int pid)

Parámetros
pid int

Devuelve
String

getClients

public Client[] getClients ()

Devuelve
Client[]

getDensity

public int getDensity ()

Devuelve
int

getFileListingService

public FileListingService getFileListingService ()

Devuelve
FileListingService

getLanguage

public String getLanguage ()

Devuelve
String

getMountPoint

public String getMountPoint (String name)

Parámetros
name String

Devuelve
String

getName

public String getName ()

Devuelve
String

getProperties

public  getProperties ()

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

Devuelve

getProperty

public String getProperty (String name)

Parámetros
name String

Devuelve
String

getPropertyCacheOrSync

public String getPropertyCacheOrSync (String name)

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

Parámetros
name String

Devuelve
String

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getPropertyCount

public int getPropertyCount ()

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

Devuelve
int

getPropertySync

public String getPropertySync (String name)

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

Parámetros
name String

Devuelve
String

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getRegion

public String getRegion ()

Devuelve
String

obtener captura de pantalla

public RawImage getScreenshot ()

Devuelve
RawImage

Arroja
AdbCommandRejectedException
TimeoutException

obtener captura de pantalla

public RawImage getScreenshot (long timeout, 
                TimeUnit unit)

Parámetros
timeout long

unit TimeUnit

Devuelve
RawImage

Arroja
AdbCommandRejectedException
TimeoutException

getSerialNumber

public String getSerialNumber ()

Devuelve
String

getState

public IDevice.DeviceState getState ()

Devuelve
IDevice.DeviceState

getSyncService

public SyncService getSyncService ()

Devuelve
SyncService

Arroja
AdbCommandRejectedException
TimeoutException

getSystemProperty.

public ListenableFuture<String> getSystemProperty (String name)

Parámetros
name String

Devuelve
ListenableFuture<String>

getVersion

public AndroidVersion getVersion ()

Devuelve
AndroidVersion

hasClients

public boolean hasClients ()

Devuelve
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 ()

Devuelve
boolean

isEmulator

public boolean isEmulator ()

Devuelve
boolean

Está sin conexión

public boolean isOffline ()

Devuelve
boolean

estáEn línea

public boolean isOnline ()

Devuelve
boolean

Raíz israí

public boolean isRoot ()

Devuelve
boolean

Arroja
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

Archivo pull

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 ()

Devuelve
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

Devuelve
boolean

admiteFeature

public boolean supportsFeature (IDevice.Feature feature)

Parámetros
feature IDevice.Feature

Devuelve
boolean

SyncPackageToDevice

public String syncPackageToDevice (String localFilePath)

Parámetros
localFilePath String

Devuelve
String

Arroja
AdbCommandRejectedException
SyncException
TimeoutException

desinstalar Aplicación

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

Parámetros
applicationID String

extraArgs String

Devuelve
String

Arroja
InstallException

desinstalarPaquete

public String uninstallPackage (String packageName)

Parámetros
packageName String

Devuelve
String

Arroja
InstallException