Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

存根设备

public class StubDevice
extends Object implements IDevice

java.lang.Object
com.android.tradefed.device.StubDevice


IDevice占位符占位符实现。

摘要

公共建设者

StubDevice (String serial)
StubDevice (String serial, boolean isEmulator)

公开方法

boolean arePropertiesSet ()

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

void createForward (int localPort, int remotePort)

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

void executeShellCommand (String command, IShellOutputReceiver receiver)

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

不建议使用此方法。使用executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit)

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

getAbis ()

String getAvdName ()

getBattery (long freshnessTime, TimeUnit timeUnit)

getBattery ()

Integer getBatteryLevel (long freshnessMs)

不建议使用此方法。使用getBattery(long, TimeUnit)代替。

Integer getBatteryLevel ()

不建议使用此方法。使用getBattery()代替。

Client getClient (String applicationName)

String getClientName (int pid)

Client[] getClients ()

int getDensity ()

FileListingService getFileListingService ()

String getLanguage ()

String getMountPoint (String name)

String getName ()

getProperties ()

不建议使用此方法。使用getSystemProperty(String)代替。

String getProperty (String name)

String getPropertyCacheOrSync (String name)

不建议使用此方法。使用getProperty(String)代替。

int getPropertyCount ()

不建议使用此方法。在ddmlib中弃用,以“实现细节”作为原因。

String getPropertySync (String name)

不建议使用此方法。使用getProperty(String)代替。

String getRegion ()

RawImage getScreenshot ()

RawImage getScreenshot (long timeout, TimeUnit unit)
String getSerialNumber ()

IDevice.DeviceState getState ()

SyncService getSyncService ()

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, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs)

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

void installRemotePackage (String remoteFilePath, boolean reinstall, 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, int remotePort)

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

void removeRemotePackage (String remoteFilePath)

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 uninstallPackage (String packageName)

公共建设者

存根设备

public StubDevice (String serial)

参量
serial String

存根设备

public StubDevice (String serial, 
                boolean isEmulator)

参量
serial String

isEmulator boolean

公开方法

arePropertiesSet

public boolean arePropertiesSet ()

退货
boolean

createForward

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

参量
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

投掷
AdbCommandRejectedException
TimeoutException

createForward

public void createForward (int localPort, 
                int remotePort)

参量
localPort int

remotePort int

投掷
AdbCommandRejectedException
TimeoutException

executeShellCommand

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

参量
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

executeShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

参量
command String

receiver IShellOutputReceiver

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

executeShellCommand

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

不建议使用此方法。
使用executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit)

参量
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse int

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

executeShellCommand

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

参量
command String

receiver IShellOutputReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getAbis

public  getAbis ()

退货

getAvdName

public String getAvdName ()

退货
String

getBattery

public  getBattery (long freshnessTime, 
                TimeUnit timeUnit)

参量
freshnessTime long

timeUnit TimeUnit

退货

getBattery

public  getBattery ()

退货

getBatteryLevel

public Integer getBatteryLevel (long freshnessMs)

不建议使用此方法。
使用getBattery(long, TimeUnit)代替。

参量
freshnessMs long

退货
Integer

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getBatteryLevel

public Integer getBatteryLevel ()

不建议使用此方法。
使用getBattery()代替。

退货
Integer

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getClient

public Client getClient (String applicationName)

参量
applicationName String

退货
Client

getClientName

public String getClientName (int pid)

参量
pid int

退货
String

getClients

public Client[] getClients ()

退货
Client[]

getDensity

public int getDensity ()

退货
int

getFileListingService

public FileListingService getFileListingService ()

退货
FileListingService

getLanguage

public String getLanguage ()

退货
String

getMountPoint

public String getMountPoint (String name)

参量
name String

退货
String

getName

public String getName ()

退货
String

getProperties

public  getProperties ()

不建议使用此方法。
使用getSystemProperty(String)代替。

退货

getProperty

public String getProperty (String name)

参量
name String

退货
String

getPropertyCacheOrSync

public String getPropertyCacheOrSync (String name)

不建议使用此方法。
使用getProperty(String)代替。

参量
name String

退货
String

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getPropertyCount

public int getPropertyCount ()

不建议使用此方法。
在ddmlib中弃用,以“实现细节”作为原因。

退货
int

getPropertySync

public String getPropertySync (String name)

不建议使用此方法。
使用getProperty(String)代替。

参量
name String

退货
String

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getRegion

public String getRegion ()

退货
String

getScreenshot

public RawImage getScreenshot ()

退货
RawImage

投掷
AdbCommandRejectedException
TimeoutException

getScreenshot

public RawImage getScreenshot (long timeout, 
                TimeUnit unit)

参量
timeout long

unit TimeUnit

退货
RawImage

投掷
AdbCommandRejectedException
TimeoutException

getSerialNumber

public String getSerialNumber ()

退货
String

getState

public IDevice.DeviceState getState ()

退货
IDevice.DeviceState

getSyncService

public SyncService getSyncService ()

退货
SyncService

投掷
AdbCommandRejectedException
TimeoutException

getSystemProperty

public  getSystemProperty (String name)

参量
name String

退货

getVersion

public AndroidVersion getVersion ()

退货
AndroidVersion

hasClients

public boolean hasClients ()

退货
boolean

installPackage

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                long maxTimeout, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits, 
                String... extraArgs)

参量
packageFilePath String

reinstall boolean

receiver InstallReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

extraArgs String

投掷
InstallException

installPackage

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

参量
packageFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

投掷
InstallException

installPackage

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

参量
packageFilePath String

reinstall boolean

extraArgs String

投掷
InstallException

installPackages

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

参量
apkFilePaths

reinstall boolean

extraArgs

timeOutInMs long

timeunit TimeUnit

投掷
InstallException

installRemotePackage

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                long maxTimeout, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits, 
                String... extraArgs)

参量
remoteFilePath String

reinstall boolean

receiver InstallReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

extraArgs String

投掷
InstallException

installRemotePackage

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

参量
remoteFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

投掷
InstallException

installRemotePackage

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

参量
remoteFilePath String

reinstall boolean

extraArgs String

投掷
InstallException

isBootLoader

public boolean isBootLoader ()

退货
boolean

isEmulator

public boolean isEmulator ()

退货
boolean

isOffline

public boolean isOffline ()

退货
boolean

在线

public boolean isOnline ()

退货
boolean

isRoot

public boolean isRoot ()

退货
boolean

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

pullFile

public void pullFile (String remote, 
                String local)

参量
remote String

local String

投掷
AdbCommandRejectedException
SyncException
TimeoutException

pushFile

public void pushFile (String local, 
                String remote)

参量
local String

remote String

投掷
AdbCommandRejectedException
SyncException
TimeoutException

重启

public void reboot (String into)

参量
into String

投掷
AdbCommandRejectedException
TimeoutException

removeForward

public void removeForward (int localPort, 
                int remotePort)

参量
localPort int

remotePort int

投掷
AdbCommandRejectedException
TimeoutException

removeForward

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

参量
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

投掷
AdbCommandRejectedException
TimeoutException

removeRemotePackage

public void removeRemotePackage (String remoteFilePath)

参量
remoteFilePath String

投掷
InstallException

public boolean root ()

退货
boolean

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

runEventLogService

public void runEventLogService (LogReceiver receiver)

参量
receiver LogReceiver

投掷
AdbCommandRejectedException
TimeoutException

runLogService

public void runLogService (String logname, 
                LogReceiver receiver)

参量
logname String

receiver LogReceiver

投掷
AdbCommandRejectedException
TimeoutException

setSerial

public void setSerial (String serial)

参量
serial String

startScreenRecorder

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

参量
remoteFilePath String

options ScreenRecorderOptions

receiver IShellOutputReceiver

投掷
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

支持功能

public boolean supportsFeature (IDevice.HardwareFeature arg0)

参量
arg0 IDevice.HardwareFeature

退货
boolean

支持功能

public boolean supportsFeature (IDevice.Feature feature)

参量
feature IDevice.Feature

退货
boolean

syncPackageToDevice

public String syncPackageToDevice (String localFilePath)

参量
localFilePath String

退货
String

投掷
AdbCommandRejectedException
SyncException
TimeoutException

uninstallPackage

public String uninstallPackage (String packageName)

参量
packageName String

退货
String

投掷
InstallException