NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

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


יישום ברירת מחדל של ITestDevice מכשירי אנדרואיד שאינם מחסנית מלאה.

סיכום

כיתות מקוננות

class NativeDevice.AdbAction

DeviceAction להפעלת פקודת 'adb ....' של מערכת ההפעלה.

class NativeDevice.AdbShellAction

class NativeDevice.RebootDeviceAction

DeviceAction לאתחול מחדש של מכשיר.

enum NativeDevice.RebootMode

מצב של אתחול מחדש.

קבועים

int INVALID_USER_ID

ערך שהוחזר עבור כל מזהה משתמש לא חוקי/לא נמצא: UserHandle הגדיר את הערך -10000

long MAX_HOST_DEVICE_TIME_OFFSET

int MAX_RETRY_ATTEMPTS

מספר ברירת המחדל של ניסיונות ניסיון חוזר של פקודה לבצע

שדות

protected static final String SD_CARD

protected static final String STORAGE_EMULATED

protected TestDeviceOptions mOptions

protected final IDeviceStateMonitor mStateMonitor

בנאים ציבוריים

NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

יוצר TestDevice .

שיטות ציבוריות

boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

boolean checkConnectivity ()

boolean clearErrorDialogs ()

void clearLastConnectedWifiNetwork ()

void clearLogcat ()

boolean connectToWifiNetwork (String wifiSsid, String wifiPsk)

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

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

boolean connectToWifiNetworkIfNeeded (String wifiSsid, String wifiPsk)

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

int createUser (String name)

int createUserNoThrow (String name)

void deleteFile (String deviceFilePath)

boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

boolean deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit)

boolean disableAdbRoot ()

void disableKeyguard ()

boolean disableNetworkMonitor ()

boolean disconnectFromWifi ()

boolean doesFileExist (String deviceFilePath)

File dumpHeap (String process, String devicePath)

boolean enableAdbRoot ()

boolean enableNetworkMonitor ()

boolean encryptDevice (boolean inplace)

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

String executeAdbCommand (String... cmdArgs)

CommandResult executeFastbootCommand (String... cmdArgs)

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

CommandResult executeLongFastbootCommand (String... cmdArgs)

String executeShellCommand (String command)

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

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

void executeShellCommand (String command, IShellOutputReceiver receiver)

CommandResult executeShellV2Command (String cmd)

CommandResult executeShellV2Command (String cmd, OutputStream pipeToOutput)

CommandResult executeShellV2Command (String cmd, File pipeAsInput)

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

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

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

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

CommandResult fastbootWipePartition (String partition)

getActiveApexes ()

getAllSettings (String namespace)

DeviceAllocationState getAllocationState ()
String getAndroidId (int userId)

getAndroidIds ()

int getApiLevel ()

PackageInfo getAppPackageInfo (String packageName)

getAppPackageInfos ()

String getBasebandVersion ()
Integer getBattery ()

boolean getBooleanProperty (String name, boolean defaultValue)

getBootHistory ()

getBootHistorySince (long utcEpochTime, TimeUnit timeUnit)

String getBootloaderVersion ()

InputStreamSource getBugreport ()

InputStreamSource getBugreportz ()

String getBuildAlias ()

String getBuildFlavor ()

String getBuildId ()

String getBuildSigningKeys ()

DeviceDescriptor getCachedDeviceDescriptor ()

String[] getChildren (String path)

DeviceFoldableState getCurrentFoldableState ()
int getCurrentUser ()

String getDeviceClass ()

long getDeviceDate ()

DeviceDescriptor getDeviceDescriptor ()

TestDeviceState getDeviceState ()

long getDeviceTimeOffset (Date date)

InputStreamSource getEmulatorOutput ()

Process getEmulatorProcess ()

final File getExecuteShellCommandLog ()

היומן המכיל את כל יומני executeShellCommand(String) .

long getExternalStoreFreeSpace ()

String getFastbootPath ()

String getFastbootProductType ()

String getFastbootProductVariant ()

String getFastbootSerialNumber ()

String getFastbootVariable (String variableName)

String getFastbootVersion ()

IFileEntry getFileEntry (String path)

IFileEntry getFileEntry (FileListingService.FileEntry entry)

עוזר לא רשמי לקבל FileEntry מנתיב שאינו שורש.

getFoldableStates ()
IDevice getIDevice ()

getInstalledPackageNames ()

long getIntProperty (String name, long defaultValue)

String getIpAddress ()

KeyguardControllerState getKeyguardState ()

long getLastExpectedRebootTimeMillis ()

int getLaunchApiLevel ()

InputStreamSource getLogcat ()

InputStreamSource getLogcat (int maxBytes)

InputStreamSource getLogcatDump ()

InputStreamSource getLogcatSince (long date)

String getMacAddress ()

getMainlineModuleInfo ()

int getMaxNumberOfRunningUsersSupported ()
int getMaxNumberOfUsersSupported ()

IDeviceStateMonitor getMonitor ()
String getMountPoint (String mountName)

ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

getMountPointInfo ()

TestDeviceOptions getOptions ()

long getPartitionFreeSpace (String partition)

Integer getPrimaryUserId ()

ProcessInfo getProcessByName (String processName)

String getProcessPid (String process)

String getProductType ()

String getProductVariant ()

String getProperty (String name)

ITestDevice.RecoveryMode getRecoveryMode ()

InputStreamSource getScreenshot (String format)

InputStreamSource getScreenshot (long displayId)

InputStreamSource getScreenshot (String format, boolean rescale)

InputStreamSource getScreenshot ()

String getSerialNumber ()

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

String getSetting (String namespace, String key)

String getSimOperator ()

String getSimState ()

getTombstones ()

long getTotalMemory ()

getUninstallablePackageNames ()

boolean getUseFastbootErase ()

int getUserFlags (int userId)

getUserInfos ()

int getUserSerialNumber (int userId)

IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

עבד את DeviceEvent, שעשוי להעביר את המכשיר הזה למצב הקצאה חדש או לא.

boolean hasFeature (String feature)

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

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

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

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

boolean isAdbRoot ()

boolean isAdbTcp ()
boolean isAppEnumerationSupported ()

boolean isDeviceEncrypted ()

boolean isDirectory (String path)

boolean isEnableAdbRoot ()
boolean isEncryptionSupported ()

boolean isExecutable (String fullPath)

boolean isFastbootEnabled ()

boolean isHeadless ()

boolean isMultiUserSupported ()

boolean isPackageInstalled (String packageName, String userId)

boolean isPackageInstalled (String packageName)

boolean isRuntimePermissionSupported ()

boolean isStateBootloaderOrFastbootd ()

boolean isUserRunning (int userId)

boolean isUserSecondary (int userId)

boolean isWifiEnabled ()

listDisplayIds ()

listUsers ()

boolean logBugreport (String dataName, ITestLogger listener)

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

void nonBlockingReboot ()

void postAdbRootAction ()

תעקוף אם המכשיר זקוק לפעולות ספציפיות שיבוצעו לאחר ה-adb 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

החזרות
boolean

זורק
DeviceNotAvailableException

לבדוק קישוריות

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

צור משתמש

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

פרמטרים
name String

guest boolean

ephemeral boolean

החזרות
int

זורק
DeviceNotAvailableException

צור משתמש

public int createUser (String name)

פרמטרים
name String

החזרות
int

זורק
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

פרמטרים
name String

החזרות
int

זורק
DeviceNotAvailableException

מחק קובץ

public void deleteFile (String deviceFilePath)

פרמטרים
deviceFilePath String

זורק
DeviceNotAvailableException

deviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

פרמטרים
prevSystemServerProcess ProcessInfo

החזרות
boolean

זורק
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

פרמטרים
utcEpochTime long

timeUnit TimeUnit

החזרות
boolean

זורק
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

החזרות
boolean

זורק
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

זורק
DeviceNotAvailableException

השבת את NetworkMonitor

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

אפשר NetworkMonitor

public boolean enableNetworkMonitor ()

החזרות
boolean

זורק
DeviceNotAvailableException

מכשיר הצפנה

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

get BooleanProperty

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

getIDvice

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

get Screenshot

public InputStreamSource getScreenshot (String format)

פרמטרים
format String

החזרות
InputStreamSource

זורק
DeviceNotAvailableException

get Screenshot

public InputStreamSource getScreenshot (long displayId)

פרמטרים
displayId long

החזרות
InputStreamSource

זורק
DeviceNotAvailableException

get Screenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

פרמטרים
format String

rescale boolean

החזרות
InputStreamSource

זורק
DeviceNotAvailableException

get Screenshot

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

קבל מצבות

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

יש תכונה

public boolean hasFeature (String feature)

פרמטרים
feature String

החזרות
boolean

זורק
DeviceNotAvailableException

חבילת התקנה

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

פרמטרים
packageFile File

reinstall boolean

extraArgs String

החזרות
String

זורק
DeviceNotAvailableException

חבילת התקנה

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

פרמטרים
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

החזרות
String

זורק
DeviceNotAvailableException

installPackageForUser

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

פרמטרים
packageFile File

reinstall boolean

userId int

extraArgs String

החזרות
String

זורק
DeviceNotAvailableException

installPackageForUser

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

פרמטרים
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

החזרות
String

זורק
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

החזרות
boolean

זורק
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

החזרות
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

החזרות
boolean

זורק
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

החזרות
boolean

זורק
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

פרמטרים
path String

החזרות
boolean

זורק
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

החזרות
boolean true אם יש להפעיל את ה-adb root במכשיר

isEncryptionSupported

public boolean isEncryptionSupported ()

החזרות
boolean

זורק
DeviceNotAvailableException

הוא ניתן לביצוע

public boolean isExecutable (String fullPath)

פרמטרים
fullPath String

החזרות
boolean

זורק
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

החזרות
boolean

הוא חסר ראש

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

רשימת משתמשים

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

החזרות
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

אתחול מחדשUntilOnline

public void rebootUntilOnline ()

זורק
DeviceNotAvailableException

אתחול מחדשUntilOnline

public void rebootUntilOnline (String reason)

פרמטרים
reason String

זורק
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

החזרות
boolean

זורק
DeviceNotAvailableException

להסיר בעלים

public void removeOwners ()

זורק
DeviceNotAvailableException

הסר משתמש

public boolean removeUser (int userId)

פרמטרים
userId int

החזרות
boolean

זורק
DeviceNotAvailableException

resetContentProviderSetup

public void resetContentProviderSetup ()

אפס את הדגל עבור הגדרת ספק התוכן כדי להפעיל אותו שוב.

להפעיל בדיקות מכשירים

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

פרמטרים
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

החזרות
boolean

זורק
DeviceNotAvailableException

להפעיל בדיקות מכשירים

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

פרמטרים
runner IRemoteAndroidTestRunner

listeners

החזרות
boolean

זורק
DeviceNotAvailableException

הפעל InstrumentationTestsAsUser

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

פרמטרים
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

החזרות
boolean

זורק
DeviceNotAvailableException

הפעל InstrumentationTestsAsUser

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

פרמטרים
runner IRemoteAndroidTestRunner

userId int

listeners

החזרות
boolean

זורק
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

מזריק את IConfiguration בשימוש.

פרמטרים
configuration IConfiguration

קבע תאריך

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

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

החזרות
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

החלף משתמש

public boolean switchUser (int userId)

פרמטרים
userId int

החזרות
boolean

זורק
DeviceNotAvailableException

החלף משתמש

public boolean switchUser (int userId, 
                long timeout)

פרמטרים
userId int

timeout long

החזרות
boolean

זורק
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

פרמטרים
localFileDir File

deviceFilePath String

החזרות
boolean

זורק
DeviceNotAvailableException

קח דיווח על שגיאות

public Bugreport takeBugreport ()

החזרות
Bugreport

unencryptDevice

public boolean unencryptDevice ()

החזרות
boolean

זורק
DeviceNotAvailableException

הסר את חבילת ההתקנה

public String uninstallPackage (String packageName)

פרמטרים
packageName String

החזרות
String

זורק
DeviceNotAvailableException

הסר את ההתקנה שלPackageForUser

public String uninstallPackageForUser (String packageName, 
                int userId)

פרמטרים
packageName String

userId int

החזרות
String

זורק
DeviceNotAvailableException

ביטול נעילת התקן

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

sureRuntimePermissionSupported

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 , שאילתת אתחול מהיר לא תבוצע

description String : תיאור פשוט של המשתנה. האות הראשונה צריכה להיות באותיות גדולות.

החזרות
String מחרוזת, אולי null או ריקה, המכילה את הערך של המאפיין הנתון

זורק
DeviceNotAvailableException

הוא חדש יותר

protected boolean isNewer (File localFile, 
                IFileEntry entry)

החזר true אם הקובץ המקומי חדש יותר מהקובץ המרוחק. אם IFileEntry מדויק עד דקה, במקרה של זמנים שווים, הקובץ ייחשב חדש יותר.

פרמטרים
localFile File

entry IFileEntry

החזרות
boolean

לבצע DeviceAction

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

מבצע פעולה במכשיר זה. ניסיון לשחזר את המכשיר ולנסות שוב פקודה אם הפעולה נכשלת.

פרמטרים
actionDescription String : תיאור קצר של הפעולה שיש לבצע. משמש למטרות רישום בלבד.

action com.android.tradefed.device.NativeDevice.DeviceAction : הפעולה שיש לבצע

retryAttempts int : הניסיון החוזר מנסה לבצע פעולה אם הוא נכשל אך השחזור מצליח

החזרות
boolean true אם הפעולה בוצעה בהצלחה

זורק
DeviceNotAvailableException אם ניסיון השחזור נכשל או ניסיונות מקסימליים שנעשו ללא הצלחה

postAdbReboot

protected void postAdbReboot ()

פעולות נוספות אפשריות שניתן לבצע לאחר אתחול מחדש.

זורק
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

מאפשר לכל סוג מכשיר (AndroidNativeDevice, TestDevice) לעקוף שיטה זו עבור הגדרה ספציפית לאחר האתחול.

זורק
DeviceNotAvailableException

לכוון שעון

protected void setClock (Clock clock)

הגדר את מופע השעון לשימוש.

פרמטרים
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

מגדיר את הזמן ב-ms להמתין לפני תחילת לכידת logcat עבור מכשיר מקוון.

פרמטרים
delay int : העיכוב ב-ms

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

פרמטרים
operationDesc String

time long