NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

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


التنفيذ التلقائي لأجهزة ITestDevice Android التي لا تتضمّن حِزم تطوير البرامج الكاملة

ملخّص

الفئات المُدمجة

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

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

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)

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)

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

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

نفِّذ إعادة تشغيل adb.

void ensureRuntimePermissionSupported()

طريقة مساعدة لرمي استثناء في حال عدم توفّر إذن التشغيل

InputStreamSource getBugreportInternal()
File getBugreportzInternal()

طريقة المساعد الداخلي للحصول على ملف zip لتقرير 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)

اضبط مثيل Clock المطلوب استخدامه.

void setLogStartDelay(int delay)

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

void waitForDeviceNotAvailable(String operationDesc, long time)

الثابتات

INVALID_USER_ID

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)

الحقول

SD_CARD

protected static final String SD_CARD

STORAGE_EMULATED

protected static final String STORAGE_EMULATED

mOptions

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

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

deleteFile

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

disableAdbRoot

public boolean disableAdbRoot ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

عمليات الرمي
DeviceNotAvailableException

disableNetworkMonitor

public boolean disableNetworkMonitor ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

disconnectFromWifi

public boolean disconnectFromWifi ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

doesFileExist

public boolean doesFileExist (String deviceFilePath)

المعلمات
deviceFilePath String

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

المعلمات
process String

devicePath String

المرتجعات
File

عمليات الرمي
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

enableNetworkMonitor

public boolean enableNetworkMonitor ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

encryptDevice

public boolean encryptDevice (boolean inplace)

المعلمات
inplace boolean

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

executeAdbCommand

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

المعلمات
timeout long

cmdArgs String

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

executeAdbCommand

public String executeAdbCommand (String... cmdArgs)

المعلمات
cmdArgs String

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

executeFastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

المعلمات
cmdArgs String

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeFastbootCommand

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

المعلمات
timeout long

cmdArgs String

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeLongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

المعلمات
cmdArgs String

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellCommand

public String executeShellCommand (String command)

المعلمات
command String

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

executeShellCommand

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

المعلمات
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

عمليات الرمي
DeviceNotAvailableException

executeShellCommand

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

executeShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

المعلمات
command String

receiver IShellOutputReceiver

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd)

المعلمات
cmd String

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

المعلمات
cmd String

pipeToOutput OutputStream

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

المعلمات
cmd String

pipeAsInput File

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

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

المعلمات
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

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

المعلمات
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

المرتجعات
CommandResult

عمليات الرمي
DeviceNotAvailableException

executeShellV2Command

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

executeShellV2Command

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

getAllocationState

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 من مسار غير جذر FIXME: إعادة صياغة نظام FileEntry لإتاحته من أي مسار (حتى إذا لم يكن لديك إذن الوصول إلى الجذر).

المعلمات
entry FileListingService.FileEntry: لا يُشترط أن يكون FileEntry الجذر كما تتطلّب Ddmlib.

المرتجعات
IFileEntry FileEntryWrapper تمثّل FileEntry

عمليات الرمي
DeviceNotAvailableException

getFoldableStates

public  getFoldableStates ()

المرتجعات

عمليات الرمي
DeviceNotAvailableException

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

installPackage

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

المعلمات
packageFile File

reinstall boolean

extraArgs String

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

installPackage

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

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 على الجهاز

isEncryptionSupported

public boolean isEncryptionSupported ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

isExecutable

public boolean isExecutable (String fullPath)

المعلمات
fullPath String

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

المرتجعات
boolean

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 وقبل إعادة الجهاز إلى الاتصال بالإنترنت. لا يتضمّن التنفيذ التلقائي أي إجراءات إضافية. لا يمكننا ضمان إيقاف إذن الوصول إلى الجذر في 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

pushDir

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

المعلمات
localFileDir File

deviceFilePath String

excludedDirectories

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

المعلمات
localFileDir File

deviceFilePath String

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

pushFile

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

rebootIntoRecovery

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

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

resetContentProviderSetup

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

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

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

switchToAdbTcp

public String switchToAdbTcp ()

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

switchToAdbUsb

public boolean switchToAdbUsb ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId)

المعلمات
userId int

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

switchUser

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

takeBugreport

public Bugreport takeBugreport ()

المرتجعات
Bugreport

unencryptDevice

public boolean unencryptDevice ()

المرتجعات
boolean

عمليات الرمي
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

المعلمات
packageName String

المرتجعات
String

عمليات الرمي
DeviceNotAvailableException

uninstallPackageForUser

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)

نفِّذ إعادة تشغيل adb.

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

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

عمليات الرمي
DeviceNotAvailableException

ensureRuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

طريقة مساعدة لرمي استثناء في حال عدم توفّر إذن التشغيل

عمليات الرمي
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

المرتجعات
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

طريقة المساعد الداخلي للحصول على ملف zip لتقرير bugreportz بتنسيق ERROR(/File)

المرتجعات
File

getRunUtil

protected IRunUtil getRunUtil ()

احصل على نسخة RunUtil لاستخدامها.

المرتجعات
IRunUtil

internalGetProperty

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

performDeviceAction

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

setClock

protected void setClock (Clock 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