כיתות מקוננות |
---|
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 root ולפני שהמכשיר חוזר למצב מקוון. |
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) pushDir (File localFileDir, String deviceFilePath, excludedDirectories) |
boolean | pushDir (File localFileDir, String deviceFilePath) |
boolean | pushFile (File localFile, String remoteFilePath) |
boolean | pushString (String contents, String remoteFilePath) |
void | reboot (String reason) |
void | reboot () |
void | rebootIntoBootloader () |
void | rebootIntoFastbootd () |
void | rebootIntoRecovery () |
void | rebootIntoSideload () |
void | rebootIntoSideload (boolean autoReboot) |
void | rebootUntilOnline () |
void | rebootUntilOnline (String reason) |
void | rebootUserspace () |
void | rebootUserspaceUntilOnline () |
void | recoverDevice () ניסיונות לשחזר את התקשורת במכשיר. |
void | remountSystemWritable () |
void | remountVendorWritable () |
boolean | removeAdmin (String componentName, int userId) |
void | removeOwners () |
boolean | removeUser (int userId) |
void | resetContentProviderSetup () אפס את הדגל עבור הגדרת ספק התוכן כדי להפעיל אותו שוב. |
boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners) |
boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) |
boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners) |
boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) |
void | setConfiguration ( IConfiguration configuration) מזריק את IConfiguration בשימוש. |
void | setDate (Date date) |
boolean | setDeviceOwner (String componentName, int userId) |
void | setDeviceState (TestDeviceState deviceState) |
void | setEmulatorOutputStream ( SizeLimitedOutputStream output) עבור אמולטור הגדר את SizeLimitedOutputStream לרישום פלט |
void | setEmulatorProcess (Process p) |
void | setFastbootEnabled (boolean fastbootEnabled) |
void | setFastbootPath (String fastbootPath) |
void | setIDevice (IDevice newDevice) |
void | setOptions (TestDeviceOptions options) |
boolean | setProperty (String propKey, String propValue) |
void | setRecovery (IDeviceRecovery recovery) |
void | setRecoveryMode (ITestDevice.RecoveryMode mode) |
void | setSetting (String namespace, String key, String value) |
void | setSetting (int userId, String namespace, String key, String value) |
void | setUseFastbootErase (boolean useFastbootErase) |
void | startLogcat () |
boolean | startUser (int userId) |
boolean | startUser (int userId, boolean waitFlag) |
void | stopEmulatorOutput () |
void | stopLogcat () |
boolean | stopUser (int userId) |
boolean | stopUser (int userId, boolean waitFlag, boolean forceFlag) |
String | switchToAdbTcp () |
boolean | switchToAdbUsb () |
boolean | switchUser (int userId) |
boolean | switchUser (int userId, long timeout) |
boolean | syncFiles (File localFileDir, String deviceFilePath) |
Bugreport | takeBugreport () |
boolean | unencryptDevice () |
String | uninstallPackage (String packageName) |
String | uninstallPackageForUser (String packageName, int userId) |
boolean | unlockDevice () |
boolean | waitForBootComplete (long timeOut) |
void | waitForDeviceAvailable () |
void | waitForDeviceAvailable (long waitTime) |
boolean | waitForDeviceInRecovery (long waitTime) |
boolean | waitForDeviceInSideload (long waitTime) |
boolean | waitForDeviceNotAvailable (long waitTime) |
void | waitForDeviceOnline () |
void | waitForDeviceOnline (long waitTime) |
boolean | waitForDeviceShell (long waitTime) |
שיטות מוגנות |
---|
void | checkApiLevelAgainst (String feature, int strictMinLevel) |
NativeDevice.RebootDeviceAction | createRebootDeviceAction ( NativeDevice.RebootMode rebootMode, String reason) צור RebootDeviceAction לשימוש בעת ביצוע פעולת אתחול מחדש. |
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) בצע אתחול של 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) הגדר את מופע השעון לשימוש. |
void | setLogStartDelay (int delay) מגדיר את הזמן ב-ms להמתין לפני תחילת לכידת 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)
שדות
כרטיס זיכרון
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 |
זורק |
---|
DeviceNotAvailableException | |
לבדוק קישוריות
public boolean checkConnectivity ()
זורק |
---|
DeviceNotAvailableException | |
clearErrorDialogs
public boolean clearErrorDialogs ()
זורק |
---|
DeviceNotAvailableException | |
clearLastConnectedWifiNetwork
public void clearLastConnectedWifiNetwork ()
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 | |
צור משתמש
public int createUser (String name,
boolean guest,
boolean ephemeral)
פרמטרים |
---|
name | String |
guest | boolean |
ephemeral | boolean |
זורק |
---|
DeviceNotAvailableException | |
צור משתמש
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 | |
disableAdbRoot
public boolean disableAdbRoot ()
זורק |
---|
DeviceNotAvailableException | |
disableKeyguard
public void disableKeyguard ()
זורק |
---|
DeviceNotAvailableException | |
השבת את NetworkMonitor
public boolean disableNetworkMonitor ()
זורק |
---|
DeviceNotAvailableException | |
disconnectFromWifi
public boolean disconnectFromWifi ()
זורק |
---|
DeviceNotAvailableException | |
doesFileExist
public boolean doesFileExist (String deviceFilePath)
פרמטרים |
---|
deviceFilePath | String |
זורק |
---|
DeviceNotAvailableException | |
dumpHeap
public File dumpHeap (String process,
String devicePath)
פרמטרים |
---|
process | String |
devicePath | String |
זורק |
---|
DeviceNotAvailableException | |
enableAdbRoot
public boolean enableAdbRoot ()
זורק |
---|
DeviceNotAvailableException | |
אפשר NetworkMonitor
public boolean enableNetworkMonitor ()
זורק |
---|
DeviceNotAvailableException | |
מכשיר הצפנה
public boolean encryptDevice (boolean inplace)
זורק |
---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (long timeout,
String... cmdArgs)
פרמטרים |
---|
timeout | long |
cmdArgs | String |
זורק |
---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (String... cmdArgs)
זורק |
---|
DeviceNotAvailableException | |
executeFastbootCommand
public CommandResult executeFastbootCommand (String... cmdArgs)
זורק |
---|
DeviceNotAvailableException | |
executeFastbootCommand
public CommandResult executeFastbootCommand (long timeout,
String... cmdArgs)
פרמטרים |
---|
timeout | long |
cmdArgs | String |
זורק |
---|
DeviceNotAvailableException | |
executeLongFastbootCommand
public CommandResult executeLongFastbootCommand (String... cmdArgs)
זורק |
---|
DeviceNotAvailableException | |
executeShellCommand
public String executeShellCommand (String command)
זורק |
---|
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)
זורק |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
OutputStream pipeToOutput)
פרמטרים |
---|
cmd | String |
pipeToOutput | OutputStream |
זורק |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput)
פרמטרים |
---|
cmd | String |
pipeAsInput | File |
זורק |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
פרמטרים |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
זורק |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit)
פרמטרים |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
זורק |
---|
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 |
זורק |
---|
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 |
זורק |
---|
DeviceNotAvailableException | |
fastbootWipePartition
public CommandResult fastbootWipePartition (String partition)
זורק |
---|
DeviceNotAvailableException | |
getActiveApexes
public getActiveApexes ()
זורק |
---|
DeviceNotAvailableException | |
getAllSettings
public getAllSettings (String namespace)
זורק |
---|
DeviceNotAvailableException | |
getAllocationState
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)
פרמטרים |
---|
packageName | String |
זורק |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
זורק |
---|
DeviceNotAvailableException | |
getBasebandVersion
public String getBasebandVersion ()
זורק |
---|
DeviceNotAvailableException | |
getBattery
public Integer getBattery ()
get BooleanProperty
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)
פרמטרים |
---|
variableName | String |
זורק |
---|
DeviceNotAvailableException | |
getFastbootVersion
public String getFastbootVersion ()
getFileEntry
public IFileEntry getFileEntry (String path)
זורק |
---|
DeviceNotAvailableException | |
getFileEntry
public IFileEntry getFileEntry (FileListingService.FileEntry entry)
עוזר לא רשמי לקבל FileEntry
מנתיב שאינו שורש. FIXME: תקן מחדש את מערכת FileEntry כדי שתהיה זמינה מכל נתיב. (אפילו לא שורש).
פרמטרים |
---|
entry | FileListingService.FileEntry : FileEntry לא בהכרח שורש כפי ש-Ddmlib דורש. |
זורק |
---|
DeviceNotAvailableException | |
getFoldableStates
public getFoldableStates ()
זורק |
---|
DeviceNotAvailableException | |
getIDvice
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)
פרמטרים |
---|
mountpoint | String |
החזרות |
---|
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)
פרמטרים |
---|
processName | String |
זורק |
---|
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 | |
get Screenshot
public InputStreamSource getScreenshot (String format)
זורק |
---|
DeviceNotAvailableException | |
get Screenshot
public InputStreamSource getScreenshot (long displayId)
זורק |
---|
DeviceNotAvailableException | |
get Screenshot
public InputStreamSource getScreenshot (String format,
boolean rescale)
פרמטרים |
---|
format | String |
rescale | boolean |
זורק |
---|
DeviceNotAvailableException | |
get Screenshot
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 ()
קבל מצבות
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, שעשוי להעביר את המכשיר הזה למצב הקצאה חדש או לא.
פרמטרים |
---|
event | DeviceEvent |
החזרות |
---|
IManagedTestDevice.DeviceEventResponse | |
יש תכונה
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 | |
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 ()
הוא חסר ראש
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)
פרמטרים |
---|
packageName | String |
זורק |
---|
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 | |
רשימת משתמשים
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 root ולפני שהמכשיר חוזר למצב מקוון. יישום ברירת המחדל אינו כולל פעולות הוספה כלשהן. לא מובטח ש-adb root יופעל בשלב זה.
זורק |
---|
DeviceNotAvailableException | |
postAdbUnrootAction
public void postAdbUnrootAction ()
תעקוף אם המכשיר צריך לבצע פעולות ספציפיות לאחר ביטול השורש של adb ולפני שהמכשיר חוזר למצב מקוון. יישום ברירת המחדל אינו כולל פעולות נוספות. לא מובטח ש-adb root יהיה מושבת בשלב זה.
זורק |
---|
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 |
זורק |
---|
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 | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
excludedDirectories)
פרמטרים |
---|
localFileDir | File |
deviceFilePath | String |
excludedDirectories | |
זורק |
---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath)
פרמטרים |
---|
localFileDir | File |
deviceFilePath | String |
זורק |
---|
DeviceNotAvailableException | |
pushFile
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 | |
rebootIntoRecovery
public void rebootIntoRecovery ()
זורק |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload ()
זורק |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload (boolean autoReboot)
פרמטרים |
---|
autoReboot | boolean |
זורק |
---|
DeviceNotAvailableException | |
אתחול מחדשUntilOnline
public void rebootUntilOnline ()
זורק |
---|
DeviceNotAvailableException | |
אתחול מחדשUntilOnline
public void rebootUntilOnline (String reason)
זורק |
---|
DeviceNotAvailableException | |
הפעלה מחדש של מרחב המשתמש
public void rebootUserspace ()
זורק |
---|
DeviceNotAvailableException | |
rebootUserspaceUntilOnline
public void rebootUserspaceUntilOnline ()
זורק |
---|
DeviceNotAvailableException | |
recoverDevice
public void recoverDevice ()
ניסיונות לשחזר את התקשורת במכשיר.
זורק |
---|
DeviceNotAvailableException | אם המכשיר אינו זמין יותר |
remountSystemWritable
public void remountSystemWritable ()
זורק |
---|
DeviceNotAvailableException | |
remountVendorWritable
public void remountVendorWritable ()
זורק |
---|
DeviceNotAvailableException | |
הסר אדמין
public boolean removeAdmin (String componentName,
int userId)
פרמטרים |
---|
componentName | String |
userId | int |
זורק |
---|
DeviceNotAvailableException | |
להסיר בעלים
public void removeOwners ()
זורק |
---|
DeviceNotAvailableException | |
הסר משתמש
public boolean removeUser (int userId)
זורק |
---|
DeviceNotAvailableException | |
resetContentProviderSetup
public void resetContentProviderSetup ()
אפס את הדגל עבור הגדרת ספק התוכן כדי להפעיל אותו שוב.
להפעיל בדיקות מכשירים
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
ITestLifeCycleReceiver... listeners)
פרמטרים |
---|
runner | IRemoteAndroidTestRunner |
listeners | ITestLifeCycleReceiver |
זורק |
---|
DeviceNotAvailableException | |
להפעיל בדיקות מכשירים
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
listeners)
פרמטרים |
---|
runner | IRemoteAndroidTestRunner |
listeners | |
זורק |
---|
DeviceNotAvailableException | |
הפעל InstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
ITestLifeCycleReceiver... listeners)
פרמטרים |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
זורק |
---|
DeviceNotAvailableException | |
הפעל InstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
listeners)
פרמטרים |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | |
זורק |
---|
DeviceNotAvailableException | |
setConfiguration
public void setConfiguration (IConfiguration configuration)
מזריק את IConfiguration
בשימוש.
פרמטרים |
---|
configuration | IConfiguration |
קבע תאריך
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)
פרמטרים |
---|
fastbootPath | String |
setIDvice
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 |
זורק |
---|
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)
זורק |
---|
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId,
boolean waitFlag)
פרמטרים |
---|
userId | int |
waitFlag | boolean |
זורק |
---|
DeviceNotAvailableException | |
stopEmulatorOutput
public void stopEmulatorOutput ()
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 | |
switchToAdbTcp
public String switchToAdbTcp ()
זורק |
---|
DeviceNotAvailableException | |
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 | |
קח דיווח על שגיאות
public Bugreport takeBugreport ()
unencryptDevice
public boolean unencryptDevice ()
זורק |
---|
DeviceNotAvailableException | |
הסר את חבילת ההתקנה
public String uninstallPackage (String packageName)
פרמטרים |
---|
packageName | String |
זורק |
---|
DeviceNotAvailableException | |
הסר את ההתקנה שלPackageForUser
public String uninstallPackageForUser (String packageName,
int userId)
פרמטרים |
---|
packageName | String |
userId | int |
זורק |
---|
DeviceNotAvailableException | |
ביטול נעילת התקן
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)
בצע אתחול של adb.
פרמטרים |
---|
rebootMode | NativeDevice.RebootMode : מצב של אתחול זה. |
reason | String : עבור אתחול מחדש זה. |
זורק |
---|
DeviceNotAvailableException | |
sureRuntimePermissionSupported
protected void ensureRuntimePermissionSupported ()
שיטת עוזר לזרוק חריג אם הרשאת זמן ריצה אינה נתמכת
זורק |
---|
DeviceNotAvailableException | |
getBugreportInternal
protected InputStreamSource getBugreportInternal ()
getBugreportzInternal
protected File getBugreportzInternal ()
שיטת עוזר פנימית לקבל את קובץ ה-zip bugreportz כ- ERROR(/File)
.
getRunUtil
protected IRunUtil getRunUtil ()
קבל את מופע RunUtil
לשימוש.
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 , שאילתת אתחול מהיר לא תבוצע |
description | String : תיאור פשוט של המשתנה. האות הראשונה צריכה להיות באותיות גדולות. |
החזרות |
---|
String | מחרוזת, אולי null או ריקה, המכילה את הערך של המאפיין הנתון |
זורק |
---|
DeviceNotAvailableException | |
הוא חדש יותר
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)
מגדיר את הזמן ב-ms להמתין לפני תחילת לכידת logcat עבור מכשיר מקוון.
פרמטרים |
---|
delay | int : העיכוב ב-ms |
waitForDeviceNotAvailable
protected void waitForDeviceNotAvailable (String operationDesc,
long time)
פרמטרים |
---|
operationDesc | String |
time | long |
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-01 (שעון UTC).
[{
"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":"סיבה אחרת"
}]