StubDevice
 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 |  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) این روش منسوخ شده است. از   | 
 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) این روش منسوخ شده است. به جای آن از   | 
 Integer |  getBatteryLevel () این روش منسوخ شده است. به جای آن از   | 
 Client |  getClient (String applicationName) | 
 String |  getClientName (int pid) | 
 Client[] |  getClients () | 
 int |  getDensity () | 
 FileListingService |  getFileListingService () | 
 String |  getLanguage () | 
 String |  getMountPoint (String name) | 
 String |  getName () | 
 getProperties () این روش منسوخ شده است. به جای آن از   | |
 String |  getProperty (String name) | 
 String |  getPropertyCacheOrSync (String name) این روش منسوخ شده است. به جای آن از   | 
 int |  getPropertyCount ()این روش منسوخ شده است. در ddmlib با "جزئیات پیاده سازی" به عنوان دلیل منسوخ شده است.  | 
 String |  getPropertySync (String name) این روش منسوخ شده است. به جای آن از   | 
 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)
  | 
سازندگان عمومی
StubDevice
public StubDevice (String serial)
| پارامترها | |
|---|---|
 serial |  String  | 
StubDevice
public StubDevice (String serial, 
                boolean isEmulator)| پارامترها | |
|---|---|
 serial |  String | 
 isEmulator |  boolean  | 
روش های عمومی
arePropertiesSet
public boolean arePropertiesSet ()
| برمی گرداند | |
|---|---|
 boolean |  |
ایجاد به جلو
public void createForward (int localPort, 
                String remoteSocketName, 
                IDevice.DeviceUnixSocketNamespace namespace)| پارامترها | |
|---|---|
 localPort |  int | 
 remoteSocketName |  String | 
 namespace |  IDevice.DeviceUnixSocketNamespace | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
ایجاد به جلو
public void createForward (int localPort, 
                int remotePort)| پارامترها | |
|---|---|
 localPort |  int | 
 remotePort |  int | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
ایجاد معکوس
public void createReverse (int remotePort, 
                int localPort)| پارامترها | |
|---|---|
 remotePort |  int | 
 localPort |  int | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
ShellCommand را اجرا کنید
public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits)| پارامترها | |
|---|---|
 command |  String | 
 receiver |  IShellOutputReceiver | 
 maxTimeToOutputResponse |  long | 
 maxTimeUnits |  TimeUnit | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 ShellCommandUnresponsiveException | |
 TimeoutException |  |
ShellCommand را اجرا کنید
public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)| پارامترها | |
|---|---|
 command |  String | 
 receiver |  IShellOutputReceiver | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 ShellCommandUnresponsiveException | |
 TimeoutException |  |
ShellCommand را اجرا کنید
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 |  |
ShellCommand را اجرا کنید
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
publicgetAbis () 
| برمی گرداند | |
|---|---|
getAvdName
public String getAvdName ()
| برمی گرداند | |
|---|---|
 String |  |
getAvdPath
public String getAvdPath ()
| برمی گرداند | |
|---|---|
 String |  |
دریافت باتری
publicgetBattery (long freshnessTime, TimeUnit timeUnit) 
| پارامترها | |
|---|---|
 freshnessTime |  long | 
 timeUnit |  TimeUnit | 
| برمی گرداند | |
|---|---|
دریافت باتری
publicgetBattery () 
| برمی گرداند | |
|---|---|
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[] |  |
دریافت تراکم
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
publicgetProperties () 
 این روش منسوخ شده است.
 به جای آن از 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 |  |
دریافت اسکرین شات
public RawImage getScreenshot ()
| برمی گرداند | |
|---|---|
 RawImage |  |
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
دریافت اسکرین شات
public RawImage getScreenshot (long timeout, 
                TimeUnit unit)| پارامترها | |
|---|---|
 timeout |  long | 
 unit |  TimeUnit | 
| برمی گرداند | |
|---|---|
 RawImage |  |
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
دریافت شماره سریال
public String getSerialNumber ()
| برمی گرداند | |
|---|---|
 String |  |
getState
public IDevice.DeviceState getState ()
| برمی گرداند | |
|---|---|
 IDevice.DeviceState |  |
getSyncService
public SyncService getSyncService ()
| برمی گرداند | |
|---|---|
 SyncService |  |
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
getSystemProperty
public ListenableFuture<String> getSystemProperty (String name)
| پارامترها | |
|---|---|
 name |  String | 
| برمی گرداند | |
|---|---|
 ListenableFuture<String> |  |
getVersion
public AndroidVersion getVersion ()
| برمی گرداند | |
|---|---|
 AndroidVersion |  |
دارای مشتریان است
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 |  |
RemotePackage را نصب کنید
public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                String... extraArgs)| پارامترها | |
|---|---|
 remoteFilePath |  String | 
 reinstall |  boolean | 
 receiver |  InstallReceiver | 
 extraArgs |  String | 
| پرتاب می کند | |
|---|---|
 InstallException |  |
RemotePackage را نصب کنید
public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                String... extraArgs)| پارامترها | |
|---|---|
 remoteFilePath |  String | 
 reinstall |  boolean | 
 extraArgs |  String | 
| پرتاب می کند | |
|---|---|
 InstallException |  |
RemotePackage را نصب کنید
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 |  |
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)
| پارامترها | |
|---|---|
 localPort |  int | 
| پرتاب می کند | |
|---|---|
 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 |  |
حذف RemotePackage
public void removeRemotePackage (String remoteFilePath)
| پارامترها | |
|---|---|
 remoteFilePath |  String | 
| پرتاب می کند | |
|---|---|
 InstallException |  |
removeReverse
public void removeReverse (int remotePort)
| پارامترها | |
|---|---|
 remotePort |  int | 
| پرتاب می کند | |
|---|---|
 AdbCommandRejectedException | |
 TimeoutException |  |
ریشه
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 |  |
مجموعه سریال
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 |  |
حذف برنامه
public String uninstallApp (String applicationID, 
                String... extraArgs)| پارامترها | |
|---|---|
 applicationID |  String | 
 extraArgs |  String | 
| برمی گرداند | |
|---|---|
 String |  |
| پرتاب می کند | |
|---|---|
 InstallException |  |
UninstallPackage
public String uninstallPackage (String packageName)
| پارامترها | |
|---|---|
 packageName |  String | 
| برمی گرداند | |
|---|---|
 String |  |
| پرتاب می کند | |
|---|---|
 InstallException |  |