فصول متداخلة |
---|
class | NativeDevice.AdbAction DeviceAction لتشغيل أمر "adb ...." الخاص بنظام التشغيل. |
class | NativeDevice.AdbShellAction |
class | NativeDevice.RebootDeviceAction DeviceAction لإعادة تشغيل الجهاز. |
enum | NativeDevice.RebootMode طريقة إعادة التشغيل. |
الأساليب العامة |
---|
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) |
الثوابت
هوية مستخدم غير صالحه
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)
رميات |
---|
DeviceNotAvailableException | |
checkConnectivity
public boolean checkConnectivity ()
رميات |
---|
DeviceNotAvailableException | |
ClearErrorDialogs
public boolean clearErrorDialogs ()
رميات |
---|
DeviceNotAvailableException | |
ClearLastConnectedWifiNetwork
public void clearLastConnectedWifiNetwork ()
com.clearLogcat
public void clearLogcat ()
ConnectToWifiNetwork
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk)
حدود |
---|
wifiSsid | String |
wifiPsk | String |
رميات |
---|
DeviceNotAvailableException | |
ConnectToWifiNetwork
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk,
boolean scanSsid)
حدود |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
رميات |
---|
DeviceNotAvailableException | |
ConnectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk,
boolean scanSsid)
حدود |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
رميات |
---|
DeviceNotAvailableException | |
ConnectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk)
حدود |
---|
wifiSsid | String |
wifiPsk | String |
رميات |
---|
DeviceNotAvailableException | |
createUser
public int createUser (String name,
boolean guest,
boolean ephemeral)
حدود |
---|
name | String |
guest | boolean |
ephemeral | boolean |
رميات |
---|
DeviceNotAvailableException | |
createUser
public int createUser (String name)
رميات |
---|
DeviceNotAvailableException | |
createUserNoThrow
public int createUserNoThrow (String name)
رميات |
---|
DeviceNotAvailableException | |
حذف ملف
public void deleteFile (String deviceFilePath)
حدود |
---|
deviceFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
DeviceSoftRestarted
public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)
حدود |
---|
prevSystemServerProcess | ProcessInfo |
رميات |
---|
DeviceNotAvailableException | |
DeviceSoftRestartedSince
public boolean deviceSoftRestartedSince (long utcEpochTime,
TimeUnit timeUnit)
حدود |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
رميات |
---|
DeviceNotAvailableException | |
this.disableAdbRoot
public boolean disableAdbRoot ()
رميات |
---|
DeviceNotAvailableException | |
dableKeyguard
public void disableKeyguard ()
رميات |
---|
DeviceNotAvailableException | |
DisableNetworkMonitor
public boolean disableNetworkMonitor ()
رميات |
---|
DeviceNotAvailableException | |
قطع الاتصالمنWifi
public boolean disconnectFromWifi ()
رميات |
---|
DeviceNotAvailableException | |
doFileExist
public boolean doesFileExist (String deviceFilePath)
حدود |
---|
deviceFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
dumpHeap
public File dumpHeap (String process,
String devicePath)
حدود |
---|
process | String |
devicePath | String |
رميات |
---|
DeviceNotAvailableException | |
تمكينAdbRoot
public boolean enableAdbRoot ()
رميات |
---|
DeviceNotAvailableException | |
تمكينNetworkMonitor
public boolean enableNetworkMonitor ()
رميات |
---|
DeviceNotAvailableException | |
جهاز تشفير
public boolean encryptDevice (boolean inplace)
رميات |
---|
DeviceNotAvailableException | |
تنفيذAdbCommand
public String executeAdbCommand (long timeout,
String... cmdArgs)
حدود |
---|
timeout | long |
cmdArgs | String |
رميات |
---|
DeviceNotAvailableException | |
تنفيذAdbCommand
public String executeAdbCommand (String... cmdArgs)
رميات |
---|
DeviceNotAvailableException | |
تنفيذ FastbootCommand
public CommandResult executeFastbootCommand (String... cmdArgs)
رميات |
---|
DeviceNotAvailableException | |
تنفيذ FastbootCommand
public CommandResult executeFastbootCommand (long timeout,
String... cmdArgs)
حدود |
---|
timeout | long |
cmdArgs | String |
رميات |
---|
DeviceNotAvailableException | |
تنفيذ LongFastbootCommand
public CommandResult executeLongFastbootCommand (String... cmdArgs)
رميات |
---|
DeviceNotAvailableException | |
تنفيذShellCommand
public String executeShellCommand (String command)
رميات |
---|
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)
رميات |
---|
DeviceNotAvailableException | |
تنفيذShellV2Command
public CommandResult executeShellV2Command (String cmd,
OutputStream pipeToOutput)
حدود |
---|
cmd | String |
pipeToOutput | OutputStream |
رميات |
---|
DeviceNotAvailableException | |
تنفيذShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput)
حدود |
---|
cmd | String |
pipeAsInput | File |
رميات |
---|
DeviceNotAvailableException | |
تنفيذShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
حدود |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
رميات |
---|
DeviceNotAvailableException | |
تنفيذShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit)
حدود |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
رميات |
---|
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 |
رميات |
---|
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 |
رميات |
---|
DeviceNotAvailableException | |
fastbootWipePartition
public CommandResult fastbootWipePartition (String partition)
رميات |
---|
DeviceNotAvailableException | |
getActiveApexes
public getActiveApexes ()
رميات |
---|
DeviceNotAvailableException | |
getAllSettings
public getAllSettings (String namespace)
رميات |
---|
DeviceNotAvailableException | |
getAlllocationState
public DeviceAllocationState getAllocationState ()
عائدات |
---|
DeviceAllocationState | |
getAndroidId
public String getAndroidId (int userId)
رميات |
---|
DeviceNotAvailableException | |
getAndroidIds
public getAndroidIds ()
رميات |
---|
DeviceNotAvailableException | |
getApiLevel
public int getApiLevel ()
رميات |
---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
رميات |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
رميات |
---|
DeviceNotAvailableException | |
getBasebandVersion
public String getBasebandVersion ()
رميات |
---|
DeviceNotAvailableException | |
getBattery
public Integer getBattery ()
getBooleanProperty
public boolean getBooleanProperty (String name,
boolean defaultValue)
حدود |
---|
name | String |
defaultValue | boolean |
رميات |
---|
DeviceNotAvailableException | |
getBootHistory
public getBootHistory ()
رميات |
---|
DeviceNotAvailableException | |
getBootHistorySince
public getBootHistorySince (long utcEpochTime,
TimeUnit timeUnit)
حدود |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
رميات |
---|
DeviceNotAvailableException | |
getBootloaderVersion
public String getBootloaderVersion ()
رميات |
---|
DeviceNotAvailableException | |
getBugreport
public InputStreamSource getBugreport ()
getBugreportz
public InputStreamSource getBugreportz ()
getBuildAlias
public String getBuildAlias ()
رميات |
---|
DeviceNotAvailableException | |
getBuildFlavor
public String getBuildFlavor ()
رميات |
---|
DeviceNotAvailableException | |
getBuildId
public String getBuildId ()
رميات |
---|
DeviceNotAvailableException | |
getBuildSigningKeys
public String getBuildSigningKeys ()
رميات |
---|
DeviceNotAvailableException | |
getCachedDeviceDescriptor
public DeviceDescriptor getCachedDeviceDescriptor ()
getChildren
public String[] getChildren (String path)
رميات |
---|
DeviceNotAvailableException | |
getCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
عائدات |
---|
DeviceFoldableState | |
رميات |
---|
DeviceNotAvailableException | |
getCurrentUser
public int getCurrentUser ()
رميات |
---|
DeviceNotAvailableException | |
getDeviceClass
public String getDeviceClass ()
getDeviceDate
public long getDeviceDate ()
رميات |
---|
DeviceNotAvailableException | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
getDeviceState
public TestDeviceState getDeviceState ()
getDeviceTimeOffset
public long getDeviceTimeOffset (Date date)
رميات |
---|
DeviceNotAvailableException | |
getEmulatorOutput
public InputStreamSource getEmulatorOutput ()
getEmulatorProcess
public Process getEmulatorProcess ()
getExternalStoreFreeSpace
public long getExternalStoreFreeSpace ()
رميات |
---|
DeviceNotAvailableException | |
getFastbootPath
public String getFastbootPath ()
getFastbootProductType
public String getFastbootProductType ()
رميات |
---|
DeviceNotAvailableException | |
getFastbootProductVariant
public String getFastbootProductVariant ()
رميات |
---|
DeviceNotAvailableException | |
getFastbootSerialNumber
public String getFastbootSerialNumber ()
getFastbootVariable
public String getFastbootVariable (String variableName)
رميات |
---|
DeviceNotAvailableException | |
getFastbootVersion
public String getFastbootVersion ()
getFileEntry
public IFileEntry getFileEntry (String path)
رميات |
---|
DeviceNotAvailableException | |
getFileEntry
public IFileEntry getFileEntry (FileListingService.FileEntry entry)
مساعد غير رسمي للحصول على FileEntry
من مسار غير جذر. الإصلاح: إعادة هيكلة نظام FileEntry ليكون متاحًا من أي مسار. (حتى غير الجذر).
حدود |
---|
entry | FileListingService.FileEntry : ليس بالضرورة أن يكون FileEntry جذرًا كما يتطلب Ddmlib. |
رميات |
---|
DeviceNotAvailableException | |
getFoldableStates
public getFoldableStates ()
رميات |
---|
DeviceNotAvailableException | |
com.getIDevice
public IDevice getIDevice ()
getInstalledPackageNames
public getInstalledPackageNames ()
رميات |
---|
DeviceNotAvailableException | |
getIntProperty
public long getIntProperty (String name,
long defaultValue)
حدود |
---|
name | String |
defaultValue | long |
رميات |
---|
DeviceNotAvailableException | |
getIpAddress
public String getIpAddress ()
رميات |
---|
DeviceNotAvailableException | |
getKeyguardState
public KeyguardControllerState getKeyguardState ()
عائدات |
---|
KeyguardControllerState | |
رميات |
---|
DeviceNotAvailableException | |
getLastExpectedRebootTimeMillis
public long getLastExpectedRebootTimeMillis ()
getLaunchApiLevel
public int getLaunchApiLevel ()
رميات |
---|
DeviceNotAvailableException | |
getLogcat
public InputStreamSource getLogcat ()
getLogcat
public InputStreamSource getLogcat (int maxBytes)
getLogcatDump
public InputStreamSource getLogcatDump ()
getLogcatSince
public InputStreamSource getLogcatSince (long date)
getMacAddress
public String getMacAddress ()
getMainlineModuleInfo
public getMainlineModuleInfo ()
رميات |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfRunningUsersSupported ()
رميات |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfUsersSupported ()
رميات |
---|
DeviceNotAvailableException | |
getMonitor
public IDeviceStateMonitor getMonitor ()
عائدات |
---|
IDeviceStateMonitor | |
getMountPoint
public String getMountPoint (String mountName)
getMountPointInfo
public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)
عائدات |
---|
ITestDevice.MountPointInfo | |
رميات |
---|
DeviceNotAvailableException | |
getMountPointInfo
public getMountPointInfo ()
رميات |
---|
DeviceNotAvailableException | |
getOptions
public TestDeviceOptions getOptions ()
getPartitionFreeSpace
public long getPartitionFreeSpace (String partition)
رميات |
---|
DeviceNotAvailableException | |
getPrimaryUserId
public Integer getPrimaryUserId ()
رميات |
---|
DeviceNotAvailableException | |
getProcessByName
public ProcessInfo getProcessByName (String processName)
رميات |
---|
DeviceNotAvailableException | |
getProcessPid
public String getProcessPid (String process)
رميات |
---|
DeviceNotAvailableException | |
getProductType
public String getProductType ()
رميات |
---|
DeviceNotAvailableException | |
getProductVariant
public String getProductVariant ()
رميات |
---|
DeviceNotAvailableException | |
getProperty
public String getProperty (String name)
رميات |
---|
DeviceNotAvailableException | |
getRecoveryMode
public ITestDevice.RecoveryMode getRecoveryMode ()
عائدات |
---|
ITestDevice.RecoveryMode | |
getScreenshot
public InputStreamSource getScreenshot (String format)
رميات |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (long displayId)
رميات |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (String format,
boolean rescale)
حدود |
---|
format | String |
rescale | boolean |
رميات |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot ()
رميات |
---|
DeviceNotAvailableException | |
getSerialNumber
public String getSerialNumber ()
getSetting
public String getSetting (int userId,
String namespace,
String key)
حدود |
---|
userId | int |
namespace | String |
key | String |
رميات |
---|
DeviceNotAvailableException | |
getSetting
public String getSetting (String namespace,
String key)
حدود |
---|
namespace | String |
key | String |
رميات |
---|
DeviceNotAvailableException | |
getSimOperator
public String getSimOperator ()
getSimState
public String getSimState ()
getTombstones
public getTombstones ()
رميات |
---|
DeviceNotAvailableException | |
getTotalMemory
public long getTotalMemory ()
getUninstallablePackageNames
public getUninstallablePackageNames ()
رميات |
---|
DeviceNotAvailableException | |
getUseFastbootErase
public boolean getUseFastbootErase ()
getUserFlags
public int getUserFlags (int userId)
رميات |
---|
DeviceNotAvailableException | |
getUserInfos
public getUserInfos ()
رميات |
---|
DeviceNotAvailableException | |
getUserSerialNumber
public int getUserSerialNumber (int userId)
رميات |
---|
DeviceNotAvailableException | |
HandleAllocationEvent
public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)
قم بمعالجة DeviceEvent، الذي قد ينقل أو لا ينقل هذا الجهاز إلى حالة تخصيص جديدة.
عائدات |
---|
IManagedTestDevice.DeviceEventResponse | |
hasFeature
public boolean hasFeature (String feature)
رميات |
---|
DeviceNotAvailableException | |
ثبت المجموعة
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)
حدود |
---|
packageFile | File |
reinstall | boolean |
extraArgs | String |
رميات |
---|
DeviceNotAvailableException | |
ثبت المجموعة
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
حدود |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
رميات |
---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)
حدود |
---|
packageFile | File |
reinstall | boolean |
userId | int |
extraArgs | 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 |
رميات |
---|
DeviceNotAvailableException | |
com.isAdbRoot
public boolean isAdbRoot ()
رميات |
---|
DeviceNotAvailableException | |
isAdbTcp
public boolean isAdbTcp ()
isAppEnumerationSupported
public boolean isAppEnumerationSupported ()
رميات |
---|
DeviceNotAvailableException | |
isDeviceEncrypted
public boolean isDeviceEncrypted ()
رميات |
---|
DeviceNotAvailableException | |
isDirectory
public boolean isDirectory (String path)
رميات |
---|
DeviceNotAvailableException | |
isEnableAdbRoot
public boolean isEnableAdbRoot ()
عائدات |
---|
boolean | true إذا كان يجب تمكين adb root على الجهاز |
isEncryptionSupported
public boolean isEncryptionSupported ()
رميات |
---|
DeviceNotAvailableException | |
قابل للتنفيذ
public boolean isExecutable (String fullPath)
رميات |
---|
DeviceNotAvailableException | |
isFastbootEnabled
public boolean isFastbootEnabled ()
com.isHeadless
public boolean isHeadless ()
رميات |
---|
DeviceNotAvailableException | |
isMultiUserSupported
public boolean isMultiUserSupported ()
رميات |
---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName,
String userId)
حدود |
---|
packageName | String |
userId | String |
رميات |
---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName)
رميات |
---|
DeviceNotAvailableException | |
isRuntimePermissionSupported
public boolean isRuntimePermissionSupported ()
رميات |
---|
DeviceNotAvailableException | |
isStateBootloaderOrFastbootd
public boolean isStateBootloaderOrFastbootd ()
isUserRunning
public boolean isUserRunning (int userId)
رميات |
---|
DeviceNotAvailableException | |
isUserSecondary
public boolean isUserSecondary (int userId)
رميات |
---|
DeviceNotAvailableException | |
isWifiEnabled
public boolean isWifiEnabled ()
رميات |
---|
DeviceNotAvailableException | |
listDisplayIds
public listDisplayIds ()
رميات |
---|
DeviceNotAvailableException | |
listUsers
public listUsers ()
رميات |
---|
DeviceNotAvailableException | |
logBugreport
public boolean logBugreport (String dataName,
ITestLogger listener)
حدود |
---|
dataName | String |
listener | ITestLogger |
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)
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 |
رميات |
---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile)
حدود |
---|
remoteFilePath | String |
localFile | File |
رميات |
---|
DeviceNotAvailableException | |
pullFile
public File pullFile (String remoteFilePath)
حدود |
---|
remoteFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
pullFileContents
public String pullFileContents (String remoteFilePath)
حدود |
---|
remoteFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
pullFileFromExternal
public File pullFileFromExternal (String remoteFilePath)
حدود |
---|
remoteFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
com.pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
excludedDirectories)
حدود |
---|
localFileDir | File |
deviceFilePath | String |
excludedDirectories | |
رميات |
---|
DeviceNotAvailableException | |
com.pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath)
حدود |
---|
localFileDir | File |
deviceFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
ملف دفع
public boolean pushFile (File localFile,
String remoteFilePath)
حدود |
---|
localFile | File |
remoteFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
PushString
public boolean pushString (String contents,
String remoteFilePath)
حدود |
---|
contents | String |
remoteFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
اعادة التشغيل
public void reboot (String reason)
رميات |
---|
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)
رميات |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline ()
رميات |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline (String reason)
رميات |
---|
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 |
رميات |
---|
DeviceNotAvailableException | |
RemoveOwners
public void removeOwners ()
رميات |
---|
DeviceNotAvailableException | |
RemoveUser
public boolean removeUser (int userId)
رميات |
---|
DeviceNotAvailableException | |
إعادة تعيينContentProviderSetup
public void resetContentProviderSetup ()
قم بإعادة تعيين العلامة لإعداد موفر المحتوى لتشغيلها مرة أخرى.
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
ITestLifeCycleReceiver... listeners)
حدود |
---|
runner | IRemoteAndroidTestRunner |
listeners | ITestLifeCycleReceiver |
رميات |
---|
DeviceNotAvailableException | |
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
listeners)
حدود |
---|
runner | IRemoteAndroidTestRunner |
listeners | |
رميات |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
ITestLifeCycleReceiver... listeners)
حدود |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
رميات |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
listeners)
حدود |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | |
رميات |
---|
DeviceNotAvailableException | |
setConfiguration
public void setConfiguration (IConfiguration configuration)
يقوم بإدخال IConfiguration
قيد الاستخدام.
حدود |
---|
configuration | IConfiguration |
setDate
public void setDate (Date date)
رميات |
---|
DeviceNotAvailableException | |
setDeviceOwner
public boolean setDeviceOwner (String componentName,
int userId)
حدود |
---|
componentName | String |
userId | int |
رميات |
---|
DeviceNotAvailableException | |
setDeviceState
public void setDeviceState (TestDeviceState deviceState)
حدود |
---|
deviceState | TestDeviceState |
setEmulatorProcess
public void setEmulatorProcess (Process p)
setFastbootEnabled
public void setFastbootEnabled (boolean fastbootEnabled)
حدود |
---|
fastbootEnabled | boolean |
setFastbootPath
public void setFastbootPath (String fastbootPath)
setIDevice
public void setIDevice (IDevice newDevice)
setOptions
public void setOptions (TestDeviceOptions options)
حدود |
---|
options | TestDeviceOptions |
setProperty
public boolean setProperty (String propKey,
String propValue)
حدود |
---|
propKey | String |
propValue | String |
رميات |
---|
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)
رميات |
---|
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId,
boolean waitFlag)
حدود |
---|
userId | int |
waitFlag | boolean |
رميات |
---|
DeviceNotAvailableException | |
stopEmulatorOutput
public void stopEmulatorOutput ()
com.stopLogcat
public void stopLogcat ()
stopUser
public boolean stopUser (int userId)
رميات |
---|
DeviceNotAvailableException | |
stopUser
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
حدود |
---|
userId | int |
waitFlag | boolean |
forceFlag | boolean |
رميات |
---|
DeviceNotAvailableException | |
com.switchToAdbTcp
public String switchToAdbTcp ()
رميات |
---|
DeviceNotAvailableException | |
com.switchToAdbUsb
public boolean switchToAdbUsb ()
رميات |
---|
DeviceNotAvailableException | |
تغير المستخدم
public boolean switchUser (int userId)
رميات |
---|
DeviceNotAvailableException | |
تغير المستخدم
public boolean switchUser (int userId,
long timeout)
حدود |
---|
userId | int |
timeout | long |
رميات |
---|
DeviceNotAvailableException | |
syncFiles
public boolean syncFiles (File localFileDir,
String deviceFilePath)
حدود |
---|
localFileDir | File |
deviceFilePath | String |
رميات |
---|
DeviceNotAvailableException | |
com.takeBugreport
public Bugreport takeBugreport ()
com.unencryptDevice
public boolean unencryptDevice ()
رميات |
---|
DeviceNotAvailableException | |
uninstallPackage
public String uninstallPackage (String packageName)
رميات |
---|
DeviceNotAvailableException | |
إلغاء التثبيتPackageForUser
public String uninstallPackageForUser (String packageName,
int userId)
حدود |
---|
packageName | String |
userId | int |
رميات |
---|
DeviceNotAvailableException | |
unlockDevice
public boolean unlockDevice ()
رميات |
---|
DeviceNotAvailableException | |
waitForBootComplete
public boolean waitForBootComplete (long timeOut)
رميات |
---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public void waitForDeviceAvailable ()
رميات |
---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public void waitForDeviceAvailable (long waitTime)
رميات |
---|
DeviceNotAvailableException | |
waitForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
waitForDeviceInSideload
public boolean waitForDeviceInSideload (long waitTime)
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
waitForDeviceOnline
public void waitForDeviceOnline ()
رميات |
---|
DeviceNotAvailableException | |
waitForDeviceOnline
public void waitForDeviceOnline (long waitTime)
رميات |
---|
DeviceNotAvailableException | |
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
الأساليب المحمية
checkApiLevelAgainst
protected void checkApiLevelAgainst (String feature,
int strictMinLevel)
حدود |
---|
feature | String |
strictMinLevel | int |
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode,
String reason)
إجراء إعادة تشغيل بنك التنمية الآسيوي.
حدود |
---|
rebootMode | NativeDevice.RebootMode : وضع إعادة التشغيل هذا. |
reason | String : لإعادة التشغيل هذه. |
رميات |
---|
DeviceNotAvailableException | |
ضمان RuntimePermissionSupported
protected void ensureRuntimePermissionSupported ()
أسلوب مساعد لطرح الاستثناء إذا كان إذن وقت التشغيل غير مدعوم
رميات |
---|
DeviceNotAvailableException | |
getBugreportInternal
protected InputStreamSource getBugreportInternal ()
getBugreportzInternal
protected File getBugreportzInternal ()
طريقة المساعد الداخلي للحصول على ملف bugreportz المضغوط ERROR(/File)
.
getRunUtil
protected IRunUtil getRunUtil ()
احصل على مثيل RunUtil
لاستخدامه.
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 |
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)
قم بتعيين مثيل الساعة للاستخدام.
setLogStartDelay
protected void setLogStartDelay (int delay)
يضبط الوقت بالمللي ثانية للانتظار قبل بدء التقاط logcat لجهاز متصل بالإنترنت.
حدود |
---|
delay | int : التأخير في مللي ثانية |
waitForDeviceNotAvailable
protected void waitForDeviceNotAvailable (String operationDesc,
long time)
حدود |
---|
operationDesc | String |
time | long |
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2023-12-01 (حسب التوقيت العالمي المتفَّق عليه)
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"لا يحتوي على المعلومات التي أحتاج إليها."
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"الخطوات معقدة للغاية / كثيرة جدًا."
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"المحتوى قديم."
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"ثمة مشكلة في الترجمة."
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشكلة في العيّنات / التعليمات البرمجية"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غير ذلك"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"يسهُل فهم المحتوى."
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"ساعَدني المحتوى في حلّ مشكلتي."
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غير ذلك"
}]