NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

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


التنفيذ الافتراضي لأجهزة Android غير الكاملة من ITestDevice .

ملخص

فصول متداخلة

class NativeDevice.AdbAction

DeviceAction لتشغيل أمر "adb ...." الخاص بنظام التشغيل.

class NativeDevice.AdbShellAction

class NativeDevice.RebootDeviceAction

DeviceAction لإعادة تشغيل الجهاز.

enum NativeDevice.RebootMode

طريقة إعادة التشغيل.

الثوابت

int INVALID_USER_ID

القيمة التي تم إرجاعها لأي معرف مستخدم غير صالح/لم يتم العثور عليه: حدد UserHandle القيمة -10000

long MAX_HOST_DEVICE_TIME_OFFSET

int MAX_RETRY_ATTEMPTS

العدد الافتراضي لمحاولات إعادة محاولة تنفيذ الأمر

مجالات

protected static final String SD_CARD

protected static final String STORAGE_EMULATED

protected TestDeviceOptions mOptions

protected final IDeviceStateMonitor mStateMonitor

المقاولين العامة

NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

يقوم بإنشاء TestDevice .

الأساليب العامة

boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

boolean checkConnectivity ()

boolean clearErrorDialogs ()

void clearLastConnectedWifiNetwork ()

void clearLogcat ()

boolean connectToWifiNetwork (String wifiSsid, String wifiPsk)

boolean connectToWifiNetwork (String wifiSsid, String wifiPsk, boolean scanSsid)

boolean connectToWifiNetworkIfNeeded (String wifiSsid, String wifiPsk, boolean scanSsid)

boolean connectToWifiNetworkIfNeeded (String wifiSsid, String wifiPsk)

int createUser (String name, boolean guest, boolean ephemeral)

int createUser (String name)

int createUserNoThrow (String name)

void deleteFile (String deviceFilePath)

boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

boolean deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit)

boolean disableAdbRoot ()

void disableKeyguard ()

boolean disableNetworkMonitor ()

boolean disconnectFromWifi ()

boolean doesFileExist (String deviceFilePath)

File dumpHeap (String process, String devicePath)

boolean enableAdbRoot ()

boolean enableNetworkMonitor ()

boolean encryptDevice (boolean inplace)

String executeAdbCommand (long timeout, String... cmdArgs)

String executeAdbCommand (String... cmdArgs)

CommandResult executeFastbootCommand (String... cmdArgs)

CommandResult executeFastbootCommand (long timeout, String... cmdArgs)

CommandResult executeLongFastbootCommand (String... cmdArgs)

String executeShellCommand (String command)

void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

void executeShellCommand (String command, IShellOutputReceiver receiver)

CommandResult executeShellV2Command (String cmd)

CommandResult executeShellV2Command (String cmd, OutputStream pipeToOutput)

CommandResult executeShellV2Command (String cmd, File pipeAsInput)

CommandResult executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

CommandResult executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit)

CommandResult executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

CommandResult executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

CommandResult fastbootWipePartition (String partition)

getActiveApexes ()

getAllSettings (String namespace)

DeviceAllocationState getAllocationState ()
String getAndroidId (int userId)

getAndroidIds ()

int getApiLevel ()

PackageInfo getAppPackageInfo (String packageName)

getAppPackageInfos ()

String getBasebandVersion ()
Integer getBattery ()

boolean getBooleanProperty (String name, boolean defaultValue)

getBootHistory ()

getBootHistorySince (long utcEpochTime, TimeUnit timeUnit)

String getBootloaderVersion ()

InputStreamSource getBugreport ()

InputStreamSource getBugreportz ()

String getBuildAlias ()

String getBuildFlavor ()

String getBuildId ()

String getBuildSigningKeys ()

DeviceDescriptor getCachedDeviceDescriptor ()

String[] getChildren (String path)

DeviceFoldableState getCurrentFoldableState ()
int getCurrentUser ()

String getDeviceClass ()

long getDeviceDate ()

DeviceDescriptor getDeviceDescriptor ()

TestDeviceState getDeviceState ()

long getDeviceTimeOffset (Date date)

InputStreamSource getEmulatorOutput ()

Process getEmulatorProcess ()

final File getExecuteShellCommandLog ()

السجل الذي يحتوي على كافة سجلات executeShellCommand(String) .

long getExternalStoreFreeSpace ()

String getFastbootPath ()

String getFastbootProductType ()

String getFastbootProductVariant ()

String getFastbootSerialNumber ()

String getFastbootVariable (String variableName)

String getFastbootVersion ()

IFileEntry getFileEntry (String path)

IFileEntry getFileEntry (FileListingService.FileEntry entry)

مساعد غير رسمي للحصول على FileEntry من مسار غير جذر.

getFoldableStates ()
IDevice getIDevice ()

getInstalledPackageNames ()

long getIntProperty (String name, long defaultValue)

String getIpAddress ()

KeyguardControllerState getKeyguardState ()

long getLastExpectedRebootTimeMillis ()

int getLaunchApiLevel ()

InputStreamSource getLogcat ()

InputStreamSource getLogcat (int maxBytes)

InputStreamSource getLogcatDump ()

InputStreamSource getLogcatSince (long date)

String getMacAddress ()

getMainlineModuleInfo ()

int getMaxNumberOfRunningUsersSupported ()
int getMaxNumberOfUsersSupported ()

IDeviceStateMonitor getMonitor ()
String getMountPoint (String mountName)

ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

getMountPointInfo ()

TestDeviceOptions getOptions ()

long getPartitionFreeSpace (String partition)

Integer getPrimaryUserId ()

ProcessInfo getProcessByName (String processName)

String getProcessPid (String process)

String getProductType ()

String getProductVariant ()

String getProperty (String name)

ITestDevice.RecoveryMode getRecoveryMode ()

InputStreamSource getScreenshot (String format)

InputStreamSource getScreenshot (long displayId)

InputStreamSource getScreenshot (String format, boolean rescale)

InputStreamSource getScreenshot ()

String getSerialNumber ()

String getSetting (int userId, String namespace, String key)

String getSetting (String namespace, String key)

String getSimOperator ()

String getSimState ()

getTombstones ()

long getTotalMemory ()

getUninstallablePackageNames ()

boolean getUseFastbootErase ()

int getUserFlags (int userId)

getUserInfos ()

int getUserSerialNumber (int userId)

IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

قم بمعالجة DeviceEvent، الذي قد ينقل أو لا ينقل هذا الجهاز إلى حالة تخصيص جديدة.

boolean hasFeature (String feature)

String installPackage (File packageFile, boolean reinstall, String... extraArgs)

String installPackage (File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs)

String installPackageForUser (File packageFile, boolean reinstall, int userId, String... extraArgs)

String installPackageForUser (File packageFile, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs)

boolean isAdbRoot ()

boolean isAdbTcp ()
boolean isAppEnumerationSupported ()

boolean isDeviceEncrypted ()

boolean isDirectory (String path)

boolean isEnableAdbRoot ()
boolean isEncryptionSupported ()

boolean isExecutable (String fullPath)

boolean isFastbootEnabled ()

boolean isHeadless ()

boolean isMultiUserSupported ()

boolean isPackageInstalled (String packageName, String userId)

boolean isPackageInstalled (String packageName)

boolean isRuntimePermissionSupported ()

boolean isStateBootloaderOrFastbootd ()

boolean isUserRunning (int userId)

boolean isUserSecondary (int userId)

boolean isWifiEnabled ()

listDisplayIds ()

listUsers ()

boolean logBugreport (String dataName, ITestLogger listener)

void logOnDevice (String tag, Log.LogLevel level, String format, Object... args)

void nonBlockingReboot ()

void postAdbRootAction ()

قم بالتجاوز إذا كان الجهاز يحتاج إلى اتخاذ بعض الإجراءات المحددة بعد جذر adb وقبل إعادة اتصال الجهاز بالإنترنت.

void postAdbUnrootAction ()

قم بالتجاوز إذا كان الجهاز يحتاج إلى اتخاذ بعض الإجراءات المحددة بعد إلغاء تجذير بنك التنمية الآسيوي وقبل إعادة اتصال الجهاز بالإنترنت.

void postBootSetup ()

void postInvocationTearDown (Throwable exception)

void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)

boolean pullDir (String deviceFilePath, File localDir)

boolean pullFile (String remoteFilePath, File localFile)

File pullFile (String remoteFilePath)

String pullFileContents (String remoteFilePath)

File pullFileFromExternal (String remoteFilePath)

boolean pushDir (File localFileDir, String deviceFilePath, excludedDirectories) pushDir (File localFileDir, String deviceFilePath, excludedDirectories)

boolean pushDir (File localFileDir, String deviceFilePath)

boolean pushFile (File localFile, String remoteFilePath)

boolean pushString (String contents, String remoteFilePath)

void reboot (String reason)

void reboot ()

void rebootIntoBootloader ()

void rebootIntoFastbootd ()

void rebootIntoRecovery ()

void rebootIntoSideload ()

void rebootIntoSideload (boolean autoReboot)

void rebootUntilOnline ()
void rebootUntilOnline (String reason)

void rebootUserspace ()
void rebootUserspaceUntilOnline ()
void recoverDevice ()

محاولات لاستعادة اتصالات الجهاز.

void remountSystemWritable ()

void remountVendorWritable ()

boolean removeAdmin (String componentName, int userId)

void removeOwners ()

boolean removeUser (int userId)

void resetContentProviderSetup ()

قم بإعادة تعيين العلامة لإعداد موفر المحتوى لتشغيلها مرة أخرى.

boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners)

boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners)

boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)

boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners)

void setConfiguration ( IConfiguration configuration)

يقوم بإدخال IConfiguration قيد الاستخدام.

void setDate (Date date)

boolean setDeviceOwner (String componentName, int userId)

void setDeviceState (TestDeviceState deviceState)

void setEmulatorOutputStream ( SizeLimitedOutputStream output)

بالنسبة للمحاكي، قم بتعيين SizeLimitedOutputStream لتسجيل الإخراج

void setEmulatorProcess (Process p)

void setFastbootEnabled (boolean fastbootEnabled)

void setFastbootPath (String fastbootPath)

void setIDevice (IDevice newDevice)

void setOptions (TestDeviceOptions options)

boolean setProperty (String propKey, String propValue)

void setRecovery (IDeviceRecovery recovery)

void setRecoveryMode (ITestDevice.RecoveryMode mode)

void setSetting (String namespace, String key, String value)

void setSetting (int userId, String namespace, String key, String value)

void setUseFastbootErase (boolean useFastbootErase)

void startLogcat ()

boolean startUser (int userId)

boolean startUser (int userId, boolean waitFlag)

void stopEmulatorOutput ()

void stopLogcat ()

boolean stopUser (int userId)

boolean stopUser (int userId, boolean waitFlag, boolean forceFlag)

String switchToAdbTcp ()

boolean switchToAdbUsb ()

boolean switchUser (int userId)

boolean switchUser (int userId, long timeout)

boolean syncFiles (File localFileDir, String deviceFilePath)

Bugreport takeBugreport ()

boolean unencryptDevice ()

String uninstallPackage (String packageName)

String uninstallPackageForUser (String packageName, int userId)

boolean unlockDevice ()

boolean waitForBootComplete (long timeOut)

void waitForDeviceAvailable ()

void waitForDeviceAvailable (long waitTime)

boolean waitForDeviceInRecovery (long waitTime)

boolean waitForDeviceInSideload (long waitTime)

boolean waitForDeviceNotAvailable (long waitTime)

void waitForDeviceOnline ()

void waitForDeviceOnline (long waitTime)

boolean waitForDeviceShell (long waitTime)

الأساليب المحمية

void checkApiLevelAgainst (String feature, int strictMinLevel)
NativeDevice.RebootDeviceAction createRebootDeviceAction ( NativeDevice.RebootMode rebootMode, String reason)

قم بإنشاء RebootDeviceAction لاستخدامه عند تنفيذ إجراء إعادة التشغيل.

void doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)

إجراء إعادة تشغيل بنك التنمية الآسيوي.

void ensureRuntimePermissionSupported ()

أسلوب مساعد لطرح الاستثناء إذا كان إذن وقت التشغيل غير مدعوم

InputStreamSource getBugreportInternal ()
File getBugreportzInternal ()

طريقة المساعد الداخلي للحصول على ملف bugreportz المضغوط ERROR(/File) .

IRunUtil getRunUtil ()

احصل على مثيل RunUtil لاستخدامه.

String internalGetProperty (String propName, String fastbootVar, String description)

قم بإحضار خاصية الجهاز، من ذاكرة التخزين المؤقت ddmlib بشكل افتراضي، والعودة إلى إما `adb shell getprop` أو `fastboot getvar` اعتمادًا على ما إذا كان الجهاز في Fastboot أم لا.

boolean isNewer (File localFile, IFileEntry entry)

يُرجع true إذا كان الملف المحلي أحدث من الملف البعيد.

boolean performDeviceAction (String actionDescription, com.android.tradefed.device.NativeDevice.DeviceAction action, int retryAttempts)

ينفذ إجراءً على هذا الجهاز.

void postAdbReboot ()

الإجراءات الإضافية المحتملة التي يمكن اتخاذها بعد إعادة التشغيل.

void prePostBootSetup ()

يسمح لكل نوع جهاز (AndroidNativeDevice، TestDevice) بتجاوز هذه الطريقة لإعداد محدد بعد التمهيد.

void setClock (Clock clock)

قم بتعيين مثيل الساعة للاستخدام.

void setLogStartDelay (int delay)

يضبط الوقت بالمللي ثانية للانتظار قبل بدء التقاط logcat لجهاز متصل بالإنترنت.

void waitForDeviceNotAvailable (String operationDesc, long time)

الثوابت

هوية مستخدم غير صالحه

public static final int INVALID_USER_ID

القيمة التي تم إرجاعها لأي معرف مستخدم غير صالح/لم يتم العثور عليه: حدد UserHandle القيمة -10000

القيمة الثابتة: -10000 (0xffffd8f0)

MAX_HOST_DEVICE_TIME_OFFSET

protected static final long MAX_HOST_DEVICE_TIME_OFFSET

القيمة الثابتة: 5000 (0x0000000000001388)

MAX_RETRY_ATTEMPTS

protected static final int MAX_RETRY_ATTEMPTS

العدد الافتراضي لمحاولات إعادة محاولة تنفيذ الأمر

القيمة الثابتة: 2 (0x00000002)

مجالات

بطاقة الذاكرة

protected static final String SD_CARD

STORAGE_EMULATED

protected static final String STORAGE_EMULATED

مخيارات

protected TestDeviceOptions mOptions

mStateMonitor

protected final IDeviceStateMonitor mStateMonitor

المقاولين العامة

NativeDevice

public NativeDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

يقوم بإنشاء TestDevice .

حدود
device IDevice : IDevice المرتبط

stateMonitor IDeviceStateMonitor : آلية IDeviceStateMonitor المراد استخدامها

allocationMonitor IDeviceMonitor : IDeviceMonitor للإبلاغ عن تغييرات حالة التخصيص. يمكن أن تكون فارغة

الأساليب العامة

checkApiLevelAgainstNextRelease

public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

حدود
strictMinLevel int

عائدات
boolean

رميات
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity ()

عائدات
boolean

رميات
DeviceNotAvailableException

ClearErrorDialogs

public boolean clearErrorDialogs ()

عائدات
boolean

رميات
DeviceNotAvailableException

ClearLastConnectedWifiNetwork

public void clearLastConnectedWifiNetwork ()

com.clearLogcat

public void clearLogcat ()

ConnectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk)

حدود
wifiSsid String

wifiPsk String

عائدات
boolean

رميات
DeviceNotAvailableException

ConnectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

حدود
wifiSsid String

wifiPsk String

scanSsid boolean

عائدات
boolean

رميات
DeviceNotAvailableException

ConnectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

حدود
wifiSsid String

wifiPsk String

scanSsid boolean

عائدات
boolean

رميات
DeviceNotAvailableException

ConnectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk)

حدود
wifiSsid String

wifiPsk String

عائدات
boolean

رميات
DeviceNotAvailableException

createUser

public int createUser (String name, 
                boolean guest, 
                boolean ephemeral)

حدود
name String

guest boolean

ephemeral boolean

عائدات
int

رميات
DeviceNotAvailableException

createUser

public int createUser (String name)

حدود
name String

عائدات
int

رميات
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

حدود
name String

عائدات
int

رميات
DeviceNotAvailableException

حذف ملف

public void deleteFile (String deviceFilePath)

حدود
deviceFilePath String

رميات
DeviceNotAvailableException

DeviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

حدود
prevSystemServerProcess ProcessInfo

عائدات
boolean

رميات
DeviceNotAvailableException

DeviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

حدود
utcEpochTime long

timeUnit TimeUnit

عائدات
boolean

رميات
DeviceNotAvailableException

this.disableAdbRoot

public boolean disableAdbRoot ()

عائدات
boolean

رميات
DeviceNotAvailableException

dableKeyguard

public void disableKeyguard ()

رميات
DeviceNotAvailableException

DisableNetworkMonitor

public boolean disableNetworkMonitor ()

عائدات
boolean

رميات
DeviceNotAvailableException

قطع الاتصالمنWifi

public boolean disconnectFromWifi ()

عائدات
boolean

رميات
DeviceNotAvailableException

doFileExist

public boolean doesFileExist (String deviceFilePath)

حدود
deviceFilePath String

عائدات
boolean

رميات
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

حدود
process String

devicePath String

عائدات
File

رميات
DeviceNotAvailableException

تمكينAdbRoot

public boolean enableAdbRoot ()

عائدات
boolean

رميات
DeviceNotAvailableException

تمكينNetworkMonitor

public boolean enableNetworkMonitor ()

عائدات
boolean

رميات
DeviceNotAvailableException

جهاز تشفير

public boolean encryptDevice (boolean inplace)

حدود
inplace boolean

عائدات
boolean

رميات
DeviceNotAvailableException

تنفيذAdbCommand

public String executeAdbCommand (long timeout, 
                String... cmdArgs)

حدود
timeout long

cmdArgs String

عائدات
String

رميات
DeviceNotAvailableException

تنفيذAdbCommand

public String executeAdbCommand (String... cmdArgs)

حدود
cmdArgs String

عائدات
String

رميات
DeviceNotAvailableException

تنفيذ FastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

حدود
cmdArgs String

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذ FastbootCommand

public CommandResult executeFastbootCommand (long timeout, 
                String... cmdArgs)

حدود
timeout long

cmdArgs String

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذ LongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

حدود
cmdArgs String

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellCommand

public String executeShellCommand (String command)

حدود
command String

عائدات
String

رميات
DeviceNotAvailableException

تنفيذShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

حدود
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

رميات
DeviceNotAvailableException

تنفيذShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeoutForCommand, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

حدود
command String

receiver IShellOutputReceiver

maxTimeoutForCommand long

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

رميات
DeviceNotAvailableException

تنفيذShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

حدود
command String

receiver IShellOutputReceiver

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd)

حدود
cmd String

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

حدود
cmd String

pipeToOutput OutputStream

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

حدود
cmd String

pipeAsInput File

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

حدود
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit)

حدود
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput, 
                OutputStream pipeToOutput, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

حدود
cmd String

pipeAsInput File

pipeToOutput OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

عائدات
CommandResult

رميات
DeviceNotAvailableException

تنفيذShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput, 
                OutputStream pipeToOutput, 
                OutputStream pipeToError, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

حدود
cmd String

pipeAsInput File

pipeToOutput OutputStream

pipeToError OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

عائدات
CommandResult

رميات
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

حدود
partition String

عائدات
CommandResult

رميات
DeviceNotAvailableException

getActiveApexes

public  getActiveApexes ()

عائدات

رميات
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

حدود
namespace String

عائدات

رميات
DeviceNotAvailableException

getAlllocationState

public DeviceAllocationState getAllocationState ()

عائدات
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

حدود
userId int

عائدات
String

رميات
DeviceNotAvailableException

getAndroidIds

public  getAndroidIds ()

عائدات

رميات
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

عائدات
int

رميات
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

حدود
packageName String

عائدات
PackageInfo

رميات
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

عائدات

رميات
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

عائدات
String

رميات
DeviceNotAvailableException

getBattery

public Integer getBattery ()

عائدات
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

حدود
name String

defaultValue boolean

عائدات
boolean

رميات
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

عائدات

رميات
DeviceNotAvailableException

getBootHistorySince

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

حدود
utcEpochTime long

timeUnit TimeUnit

عائدات

رميات
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

عائدات
String

رميات
DeviceNotAvailableException

getBugreport

public InputStreamSource getBugreport ()

عائدات
InputStreamSource

getBugreportz

public InputStreamSource getBugreportz ()

عائدات
InputStreamSource

getBuildAlias

public String getBuildAlias ()

عائدات
String

رميات
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

عائدات
String

رميات
DeviceNotAvailableException

getBuildId

public String getBuildId ()

عائدات
String

رميات
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

عائدات
String

رميات
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

عائدات
DeviceDescriptor

getChildren

public String[] getChildren (String path)

حدود
path String

عائدات
String[]

رميات
DeviceNotAvailableException

getCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

عائدات
DeviceFoldableState

رميات
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

عائدات
int

رميات
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

عائدات
String

getDeviceDate

public long getDeviceDate ()

عائدات
long

رميات
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

عائدات
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

عائدات
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

حدود
date Date

عائدات
long

رميات
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

عائدات
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

عائدات
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

السجل الذي يحتوي على كافة سجلات executeShellCommand(String) .

عائدات
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

عائدات
long

رميات
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

عائدات
String

getFastbootProductType

public String getFastbootProductType ()

عائدات
String

رميات
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

عائدات
String

رميات
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

عائدات
String

getFastbootVariable

public String getFastbootVariable (String variableName)

حدود
variableName String

عائدات
String

رميات
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

عائدات
String

getFileEntry

public IFileEntry getFileEntry (String path)

حدود
path String

عائدات
IFileEntry

رميات
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

مساعد غير رسمي للحصول على FileEntry من مسار غير جذر. الإصلاح: إعادة هيكلة نظام FileEntry ليكون متاحًا من أي مسار. (حتى غير الجذر).

حدود
entry FileListingService.FileEntry : ليس بالضرورة أن يكون FileEntry جذرًا كما يتطلب Ddmlib.

عائدات
IFileEntry FileEntryWrapper يمثل FileEntry.

رميات
DeviceNotAvailableException

getFoldableStates

public  getFoldableStates ()

عائدات

رميات
DeviceNotAvailableException

com.getIDevice

public IDevice getIDevice ()

عائدات
IDevice

getInstalledPackageNames

public  getInstalledPackageNames ()

عائدات

رميات
DeviceNotAvailableException

getIntProperty

public long getIntProperty (String name, 
                long defaultValue)

حدود
name String

defaultValue long

عائدات
long

رميات
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

عائدات
String

رميات
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

عائدات
KeyguardControllerState

رميات
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public long getLastExpectedRebootTimeMillis ()

عائدات
long

getLaunchApiLevel

public int getLaunchApiLevel ()

عائدات
int

رميات
DeviceNotAvailableException

getLogcat

public InputStreamSource getLogcat ()

عائدات
InputStreamSource

getLogcat

public InputStreamSource getLogcat (int maxBytes)

حدود
maxBytes int

عائدات
InputStreamSource

getLogcatDump

public InputStreamSource getLogcatDump ()

عائدات
InputStreamSource

getLogcatSince

public InputStreamSource getLogcatSince (long date)

حدود
date long

عائدات
InputStreamSource

getMacAddress

public String getMacAddress ()

عائدات
String

getMainlineModuleInfo

public  getMainlineModuleInfo ()

عائدات

رميات
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

عائدات
int

رميات
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

عائدات
int

رميات
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

عائدات
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

حدود
mountName String

عائدات
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

حدود
mountpoint String

عائدات
ITestDevice.MountPointInfo

رميات
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

عائدات

رميات
DeviceNotAvailableException

getOptions

public TestDeviceOptions getOptions ()

عائدات
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

حدود
partition String

عائدات
long

رميات
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

عائدات
Integer

رميات
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

حدود
processName String

عائدات
ProcessInfo

رميات
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

حدود
process String

عائدات
String

رميات
DeviceNotAvailableException

getProductType

public String getProductType ()

عائدات
String

رميات
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

عائدات
String

رميات
DeviceNotAvailableException

getProperty

public String getProperty (String name)

حدود
name String

عائدات
String

رميات
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

عائدات
ITestDevice.RecoveryMode

getScreenshot

public InputStreamSource getScreenshot (String format)

حدود
format String

عائدات
InputStreamSource

رميات
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (long displayId)

حدود
displayId long

عائدات
InputStreamSource

رميات
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

حدود
format String

rescale boolean

عائدات
InputStreamSource

رميات
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot ()

عائدات
InputStreamSource

رميات
DeviceNotAvailableException

getSerialNumber

public String getSerialNumber ()

عائدات
String

getSetting

public String getSetting (int userId, 
                String namespace, 
                String key)

حدود
userId int

namespace String

key String

عائدات
String

رميات
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

حدود
namespace String

key String

عائدات
String

رميات
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

عائدات
String

getSimState

public String getSimState ()

عائدات
String

getTombstones

public  getTombstones ()

عائدات

رميات
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

عائدات
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

عائدات

رميات
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

عائدات
boolean

getUserFlags

public int getUserFlags (int userId)

حدود
userId int

عائدات
int

رميات
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

عائدات

رميات
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

حدود
userId int

عائدات
int

رميات
DeviceNotAvailableException

HandleAllocationEvent

public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

قم بمعالجة DeviceEvent، الذي قد ينقل أو لا ينقل هذا الجهاز إلى حالة تخصيص جديدة.

حدود
event DeviceEvent

عائدات
IManagedTestDevice.DeviceEventResponse

hasFeature

public boolean hasFeature (String feature)

حدود
feature String

عائدات
boolean

رميات
DeviceNotAvailableException

ثبت المجموعة

public String installPackage (File packageFile, 
                boolean reinstall, 
                String... extraArgs)

حدود
packageFile File

reinstall boolean

extraArgs String

عائدات
String

رميات
DeviceNotAvailableException

ثبت المجموعة

public String installPackage (File packageFile, 
                boolean reinstall, 
                boolean grantPermissions, 
                String... extraArgs)

حدود
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

عائدات
String

رميات
DeviceNotAvailableException

installPackageForUser

public String installPackageForUser (File packageFile, 
                boolean reinstall, 
                int userId, 
                String... extraArgs)

حدود
packageFile File

reinstall boolean

userId int

extraArgs String

عائدات
String

رميات
DeviceNotAvailableException

installPackageForUser

public String installPackageForUser (File packageFile, 
                boolean reinstall, 
                boolean grantPermissions, 
                int userId, 
                String... extraArgs)

حدود
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

عائدات
String

رميات
DeviceNotAvailableException

com.isAdbRoot

public boolean isAdbRoot ()

عائدات
boolean

رميات
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

عائدات
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

عائدات
boolean

رميات
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

عائدات
boolean

رميات
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

حدود
path String

عائدات
boolean

رميات
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

عائدات
boolean true إذا كان يجب تمكين adb root على الجهاز

isEncryptionSupported

public boolean isEncryptionSupported ()

عائدات
boolean

رميات
DeviceNotAvailableException

قابل للتنفيذ

public boolean isExecutable (String fullPath)

حدود
fullPath String

عائدات
boolean

رميات
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

عائدات
boolean

com.isHeadless

public boolean isHeadless ()

عائدات
boolean

رميات
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

عائدات
boolean

رميات
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

حدود
packageName String

userId String

عائدات
boolean

رميات
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

حدود
packageName String

عائدات
boolean

رميات
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

عائدات
boolean

رميات
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

عائدات
boolean

isUserRunning

public boolean isUserRunning (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

عائدات
boolean

رميات
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

عائدات

رميات
DeviceNotAvailableException

listUsers

public  listUsers ()

عائدات

رميات
DeviceNotAvailableException

logBugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

حدود
dataName String

listener ITestLogger

عائدات
boolean

logOnDevice

public void logOnDevice (String tag, 
                Log.LogLevel level, 
                String format, 
                Object... args)

حدود
tag String

level Log.LogLevel

format String

args Object

NonBlockingReboot

public void nonBlockingReboot ()

رميات
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

قم بالتجاوز إذا كان الجهاز يحتاج إلى اتخاذ بعض الإجراءات المحددة بعد جذر adb وقبل إعادة اتصال الجهاز بالإنترنت. لا يتضمن التنفيذ الافتراضي أي إجراءات إضافة. لا يمكن ضمان تمكين adb root في هذه المرحلة.

رميات
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

قم بالتجاوز إذا كان الجهاز يحتاج إلى اتخاذ بعض الإجراءات المحددة بعد إلغاء تجذير بنك التنمية الآسيوي وقبل إعادة اتصال الجهاز بالإنترنت. لا يتضمن التنفيذ الافتراضي أي إجراءات إضافية. لا يمكن ضمان تعطيل جذر adb في هذه المرحلة.

رميات
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

رميات
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

حدود
exception Throwable

preInvocationSetup

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

حدود
info IBuildInfo

attributes MultiMap

رميات
DeviceNotAvailableException
TargetSetupError

pullDir

public boolean pullDir (String deviceFilePath, 
                File localDir)

حدود
deviceFilePath String

localDir File

عائدات
boolean

رميات
DeviceNotAvailableException

pullFile

public boolean pullFile (String remoteFilePath, 
                File localFile)

حدود
remoteFilePath String

localFile File

عائدات
boolean

رميات
DeviceNotAvailableException

pullFile

public File pullFile (String remoteFilePath)

حدود
remoteFilePath String

عائدات
File

رميات
DeviceNotAvailableException

pullFileContents

public String pullFileContents (String remoteFilePath)

حدود
remoteFilePath String

عائدات
String

رميات
DeviceNotAvailableException

pullFileFromExternal

public File pullFileFromExternal (String remoteFilePath)

حدود
remoteFilePath String

عائدات
File

رميات
DeviceNotAvailableException

com.pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath, 
                 excludedDirectories)

حدود
localFileDir File

deviceFilePath String

excludedDirectories

عائدات
boolean

رميات
DeviceNotAvailableException

com.pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

حدود
localFileDir File

deviceFilePath String

عائدات
boolean

رميات
DeviceNotAvailableException

ملف دفع

public boolean pushFile (File localFile, 
                String remoteFilePath)

حدود
localFile File

remoteFilePath String

عائدات
boolean

رميات
DeviceNotAvailableException

PushString

public boolean pushString (String contents, 
                String remoteFilePath)

حدود
contents String

remoteFilePath String

عائدات
boolean

رميات
DeviceNotAvailableException

اعادة التشغيل

public void reboot (String reason)

حدود
reason String

رميات
DeviceNotAvailableException

اعادة التشغيل

public void reboot ()

رميات
DeviceNotAvailableException

rebootIntoBootloader

public void rebootIntoBootloader ()

رميات
DeviceNotAvailableException

rebootIntoFastbootd

public void rebootIntoFastbootd ()

رميات
DeviceNotAvailableException

إعادة التمهيد إلى الانتعاش

public void rebootIntoRecovery ()

رميات
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload ()

رميات
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload (boolean autoReboot)

حدود
autoReboot boolean

رميات
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline ()

رميات
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline (String reason)

حدود
reason String

رميات
DeviceNotAvailableException

rebootUserspace

public void rebootUserspace ()

رميات
DeviceNotAvailableException

rebootUserspaceUntilOnline

public void rebootUserspaceUntilOnline ()

رميات
DeviceNotAvailableException

com.recoverDevice

public void recoverDevice ()

محاولات لاستعادة اتصالات الجهاز.

رميات
DeviceNotAvailableException إذا لم يعد الجهاز متوفرا

remountSystemWritable

public void remountSystemWritable ()

رميات
DeviceNotAvailableException

remountVendorWritable

public void remountVendorWritable ()

رميات
DeviceNotAvailableException

RemoveAdmin

public boolean removeAdmin (String componentName, 
                int userId)

حدود
componentName String

userId int

عائدات
boolean

رميات
DeviceNotAvailableException

RemoveOwners

public void removeOwners ()

رميات
DeviceNotAvailableException

RemoveUser

public boolean removeUser (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

إعادة تعيينContentProviderSetup

public void resetContentProviderSetup ()

قم بإعادة تعيين العلامة لإعداد موفر المحتوى لتشغيلها مرة أخرى.

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                ITestLifeCycleReceiver... listeners)

حدود
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

عائدات
boolean

رميات
DeviceNotAvailableException

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

حدود
runner IRemoteAndroidTestRunner

listeners

عائدات
boolean

رميات
DeviceNotAvailableException

runInstrumentationTestsAsUser

public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                int userId, 
                ITestLifeCycleReceiver... listeners)

حدود
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

عائدات
boolean

رميات
DeviceNotAvailableException

runInstrumentationTestsAsUser

public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                int userId, 
                 listeners)

حدود
runner IRemoteAndroidTestRunner

userId int

listeners

عائدات
boolean

رميات
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

يقوم بإدخال IConfiguration قيد الاستخدام.

حدود
configuration IConfiguration

setDate

public void setDate (Date date)

حدود
date Date

رميات
DeviceNotAvailableException

setDeviceOwner

public boolean setDeviceOwner (String componentName, 
                int userId)

حدود
componentName String

userId int

عائدات
boolean

رميات
DeviceNotAvailableException

setDeviceState

public void setDeviceState (TestDeviceState deviceState)

حدود
deviceState TestDeviceState

setEmulatorOutputStream

public void setEmulatorOutputStream (SizeLimitedOutputStream output)

بالنسبة للمحاكي، قم بتعيين SizeLimitedOutputStream لتسجيل الإخراج

حدود
output SizeLimitedOutputStream : لتسجيل الإخراج

setEmulatorProcess

public void setEmulatorProcess (Process p)

حدود
p Process

setFastbootEnabled

public void setFastbootEnabled (boolean fastbootEnabled)

حدود
fastbootEnabled boolean

setFastbootPath

public void setFastbootPath (String fastbootPath)

حدود
fastbootPath String

setIDevice

public void setIDevice (IDevice newDevice)

حدود
newDevice IDevice

setOptions

public void setOptions (TestDeviceOptions options)

حدود
options TestDeviceOptions

setProperty

public boolean setProperty (String propKey, 
                String propValue)

حدود
propKey String

propValue String

عائدات
boolean

رميات
DeviceNotAvailableException

setRecovery

public void setRecovery (IDeviceRecovery recovery)

حدود
recovery IDeviceRecovery

setRecoveryMode

public void setRecoveryMode (ITestDevice.RecoveryMode mode)

حدود
mode ITestDevice.RecoveryMode

setSetting

public void setSetting (String namespace, 
                String key, 
                String value)

حدود
namespace String

key String

value String

رميات
DeviceNotAvailableException

setSetting

public void setSetting (int userId, 
                String namespace, 
                String key, 
                String value)

حدود
userId int

namespace String

key String

value String

رميات
DeviceNotAvailableException

setUseFastbootErase

public void setUseFastbootErase (boolean useFastbootErase)

حدود
useFastbootErase boolean

com.startLogcat

public void startLogcat ()

startUser

public boolean startUser (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

startUser

public boolean startUser (int userId, 
                boolean waitFlag)

حدود
userId int

waitFlag boolean

عائدات
boolean

رميات
DeviceNotAvailableException

stopEmulatorOutput

public void stopEmulatorOutput ()

com.stopLogcat

public void stopLogcat ()

stopUser

public boolean stopUser (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

stopUser

public boolean stopUser (int userId, 
                boolean waitFlag, 
                boolean forceFlag)

حدود
userId int

waitFlag boolean

forceFlag boolean

عائدات
boolean

رميات
DeviceNotAvailableException

com.switchToAdbTcp

public String switchToAdbTcp ()

عائدات
String

رميات
DeviceNotAvailableException

com.switchToAdbUsb

public boolean switchToAdbUsb ()

عائدات
boolean

رميات
DeviceNotAvailableException

تغير المستخدم

public boolean switchUser (int userId)

حدود
userId int

عائدات
boolean

رميات
DeviceNotAvailableException

تغير المستخدم

public boolean switchUser (int userId, 
                long timeout)

حدود
userId int

timeout long

عائدات
boolean

رميات
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

حدود
localFileDir File

deviceFilePath String

عائدات
boolean

رميات
DeviceNotAvailableException

com.takeBugreport

public Bugreport takeBugreport ()

عائدات
Bugreport

com.unencryptDevice

public boolean unencryptDevice ()

عائدات
boolean

رميات
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

حدود
packageName String

عائدات
String

رميات
DeviceNotAvailableException

إلغاء التثبيتPackageForUser

public String uninstallPackageForUser (String packageName, 
                int userId)

حدود
packageName String

userId int

عائدات
String

رميات
DeviceNotAvailableException

unlockDevice

public boolean unlockDevice ()

عائدات
boolean

رميات
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

حدود
timeOut long

عائدات
boolean

رميات
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable ()

رميات
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable (long waitTime)

حدود
waitTime long

رميات
DeviceNotAvailableException

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

حدود
waitTime long

عائدات
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

حدود
waitTime long

عائدات
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

حدود
waitTime long

عائدات
boolean

waitForDeviceOnline

public void waitForDeviceOnline ()

رميات
DeviceNotAvailableException

waitForDeviceOnline

public void waitForDeviceOnline (long waitTime)

حدود
waitTime long

رميات
DeviceNotAvailableException

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

حدود
waitTime long

عائدات
boolean

الأساليب المحمية

checkApiLevelAgainst

protected void checkApiLevelAgainst (String feature, 
                int strictMinLevel)

حدود
feature String

strictMinLevel int

createRebootDeviceAction

protected NativeDevice.RebootDeviceAction createRebootDeviceAction (NativeDevice.RebootMode rebootMode, 
                String reason)

قم بإنشاء RebootDeviceAction لاستخدامه عند تنفيذ إجراء إعادة التشغيل.

حدود
rebootMode NativeDevice.RebootMode : وضع إعادة التشغيل هذا.

reason String : لإعادة التشغيل هذه.

عائدات
NativeDevice.RebootDeviceAction RebootDeviceAction الذي تم إنشاؤه .

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

إجراء إعادة تشغيل بنك التنمية الآسيوي.

حدود
rebootMode NativeDevice.RebootMode : وضع إعادة التشغيل هذا.

reason String : لإعادة التشغيل هذه.

رميات
DeviceNotAvailableException

ضمان RuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

أسلوب مساعد لطرح الاستثناء إذا كان إذن وقت التشغيل غير مدعوم

رميات
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

عائدات
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

طريقة المساعد الداخلي للحصول على ملف bugreportz المضغوط ERROR(/File) .

عائدات
File

getRunUtil

protected IRunUtil getRunUtil ()

احصل على مثيل RunUtil لاستخدامه.

عائدات
IRunUtil

interGetProperty

protected String internalGetProperty (String propName, 
                String fastbootVar, 
                String description)

قم بإحضار خاصية الجهاز، من ذاكرة التخزين المؤقت ddmlib بشكل افتراضي، والعودة إلى إما `adb shell getprop` أو `fastboot getvar` اعتمادًا على ما إذا كان الجهاز في Fastboot أم لا.

حدود
propName String : اسم خاصية الجهاز كما تم إرجاعها بواسطة `adb shell getprop`

fastbootVar String : اسم متغير fastboot المكافئ المطلوب الاستعلام عنه. إذا كانت null ، فلن تتم محاولة استعلام fastboot

description String : وصف بسيط للمتغير. يجب أن يكون الحرف الأول كبيرًا.

عائدات
String سلسلة، ربما null أو فارغة، تحتوي على قيمة الخاصية المحددة

رميات
DeviceNotAvailableException

isNewer

protected boolean isNewer (File localFile, 
                IFileEntry entry)

يُرجع true إذا كان الملف المحلي أحدث من الملف البعيد. نظرًا لأن IFileEntry دقيق حتى الدقيقة، ففي حالة تساوي الأوقات، سيتم اعتبار الملف أحدث.

حدود
localFile File

entry IFileEntry

عائدات
boolean

supportDeviceAction

protected boolean performDeviceAction (String actionDescription, 
                com.android.tradefed.device.NativeDevice.DeviceAction action, 
                int retryAttempts)

ينفذ إجراءً على هذا الجهاز. محاولات استرداد الجهاز وإعادة محاولة الأمر بشكل اختياري في حالة فشل الإجراء.

حدود
actionDescription String : وصف قصير للإجراء الذي سيتم تنفيذه. تستخدم لأغراض التسجيل فقط.

action com.android.tradefed.device.NativeDevice.DeviceAction : الإجراء المطلوب تنفيذه

retryAttempts int : تحاول إعادة المحاولة اتخاذ الإجراء إذا فشلت ولكن نجح الاسترداد

عائدات
boolean true إذا تم تنفيذ الإجراء بنجاح

رميات
DeviceNotAvailableException في حالة فشل محاولة الاسترداد أو إجراء الحد الأقصى من المحاولات دون نجاح

postAdbReboot

protected void postAdbReboot ()

الإجراءات الإضافية المحتملة التي يمكن اتخاذها بعد إعادة التشغيل.

رميات
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

يسمح لكل نوع جهاز (AndroidNativeDevice، TestDevice) بتجاوز هذه الطريقة لإعداد محدد بعد التمهيد.

رميات
DeviceNotAvailableException

اضبط الساعة

protected void setClock (Clock clock)

قم بتعيين مثيل الساعة للاستخدام.

حدود
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

يضبط الوقت بالمللي ثانية للانتظار قبل بدء التقاط logcat لجهاز متصل بالإنترنت.

حدود
delay int : التأخير في مللي ثانية

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

حدود
operationDesc String

time long