NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

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


הטמעת ברירת המחדל של ITestDevice במכשירי Android עם סטאק חלקי.

סיכום

כיתות בתצוגת עץ

class NativeDevice.AdbAction

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

class NativeDevice.AdbShellAction

 

class NativeDevice.RebootDeviceAction

DeviceAction כדי להפעיל מחדש מכשיר. 

enum NativeDevice.RebootMode

מצב של הפעלה מחדש. 

קבועים

int INVALID_USER_ID

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

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 מנתיב שאינו ברמה הבסיסית (root).

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

משנים את ההגדרה אם צריך לבצע פעולות ספציפיות במכשיר אחרי ביטול ה-root באמצעות adb, ולפני שהמכשיר חוזר לאינטרנט.

void postBootSetup()

void postInvocationTearDown(Throwable exception)

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

boolean pullDir(String deviceFilePath, File localDir)

boolean pullFile(String remoteFilePath, File localFile)

File pullFile(String remoteFilePath)

String pullFileContents(String remoteFilePath)

File pullFileFromExternal(String remoteFilePath)

boolean pushDir(File localFileDir, String deviceFilePath, excludedDirectories)

boolean pushDir(File localFileDir, String deviceFilePath)

boolean pushFile(File localFile, String remoteFilePath)

boolean pushString(String contents, String remoteFilePath)

void reboot(String reason)

void reboot()

void rebootIntoBootloader()

void rebootIntoFastbootd()

void rebootIntoRecovery()

void rebootIntoSideload()

void rebootIntoSideload(boolean autoReboot)

void rebootUntilOnline()
void rebootUntilOnline(String reason)

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

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

void remountSystemWritable()

void remountVendorWritable()

boolean removeAdmin(String componentName, int userId)

void removeOwners()

boolean removeUser(int userId)

void resetContentProviderSetup()

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

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

boolean runInstrumentationTests(IRemoteAndroidTestRunner runner, listeners)

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

boolean runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId, listeners)

void setConfiguration(IConfiguration configuration)

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

void setDate(Date date)

boolean setDeviceOwner(String componentName, int userId)

void setDeviceState(TestDeviceState deviceState)

void setEmulatorOutputStream(SizeLimitedOutputStream output)

במהלך הדמיה, מגדירים את SizeLimitedOutputStream לתיעוד הפלט

void setEmulatorProcess(Process p)

void setFastbootEnabled(boolean fastbootEnabled)

void setFastbootPath(String fastbootPath)

void setIDevice(IDevice newDevice)

void setOptions(TestDeviceOptions options)

boolean setProperty(String propKey, String propValue)

void setRecovery(IDeviceRecovery recovery)

void setRecoveryMode(ITestDevice.RecoveryMode mode)

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

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

void setUseFastbootErase(boolean useFastbootErase)

void startLogcat()

boolean startUser(int userId)

boolean startUser(int userId, boolean waitFlag)

void stopEmulatorOutput()

void stopLogcat()

boolean stopUser(int userId)

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

String switchToAdbTcp()

boolean switchToAdbUsb()

boolean switchUser(int userId)

boolean switchUser(int userId, long timeout)

boolean syncFiles(File localFileDir, String deviceFilePath)

Bugreport takeBugreport()

boolean unencryptDevice()

String uninstallPackage(String packageName)

String uninstallPackageForUser(String packageName, int userId)

boolean unlockDevice()

boolean waitForBootComplete(long timeOut)

void waitForDeviceAvailable()

void waitForDeviceAvailable(long waitTime)

boolean waitForDeviceInRecovery(long waitTime)

boolean waitForDeviceInSideload(long waitTime)

boolean waitForDeviceNotAvailable(long waitTime)

void waitForDeviceOnline()

void waitForDeviceOnline(long waitTime)

boolean waitForDeviceShell(long waitTime)

שיטות מוגנות

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

יוצרים RebootDeviceAction שישמש לביצוע פעולת הפעלה מחדש.

void doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)

מבצעים הפעלה מחדש של adb.

void ensureRuntimePermissionSupported()

שיטה מסייעת להעלאת חריגה אם אין תמיכה בהרשאה בזמן ריצה

InputStreamSource getBugreportInternal()
File getBugreportzInternal()

שיטה פנימית מסייעת לקבלת קובץ ה-zip של bugreportz כ-ERROR(/File).

IRunUtil getRunUtil()

מקבלים את המכונה RunUtil לשימוש.

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

אחזור של מאפיין מכשיר, מהמטמון של ddmlib כברירת מחדל, וחזרה ל-adb shell getprop או ל-fastboot getvar בהתאם למצב המכשיר (במצב Fastboot או לא).

boolean isNewer(File localFile, IFileEntry entry)

הפונקציה מחזירה את הערך true אם הקובץ המקומי חדש יותר מהקובץ המרוחק.

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

ביצוע פעולה במכשיר הזה.

void postAdbReboot()

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

void prePostBootSetup()

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

void setClock(Clock clock)

מגדירים את המכונה של Clock לשימוש.

void setLogStartDelay(int delay)

הגדרת משך הזמן (באלפיות שנייה) להמתנה לפני תחילת הצילום של logcat במכשיר שמחובר לאינטרנט.

void waitForDeviceNotAvailable(String operationDesc, long time)

קבועים

INVALID_USER_ID

public static final int INVALID_USER_ID

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

ערך קבוע: -10000 (0xffffd8f0)

MAX_HOST_DEVICE_TIME_OFFSET

protected static final long MAX_HOST_DEVICE_TIME_OFFSET

ערך קבוע: 5000 (0x0000000000001388)

MAX_RETRY_ATTEMPTS

protected static final int MAX_RETRY_ATTEMPTS

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

ערך קבוע: 2 (0x00000002)

שדות

SD_CARD

protected static final String SD_CARD

STORAGE_EMULATED

protected static final String STORAGE_EMULATED

mOptions

protected TestDeviceOptions mOptions

mStateMonitor

protected final IDeviceStateMonitor mStateMonitor

קונסטרוקטורים גלויים לכולם

NativeDevice

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

יצירת TestDevice.

פרמטרים
device IDevice: IDevice המשויך

stateMonitor IDeviceStateMonitor: מנגנון IDeviceStateMonitor שבו רוצים להשתמש

allocationMonitor IDeviceMonitor: IDeviceMonitor כדי לעדכן על שינויים במצב ההקצאה. יכול להיות null

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

checkApiLevelAgainstNextRelease

public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

פרמטרים
strictMinLevel int

החזרות
boolean

זריקות
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity ()

החזרות
boolean

זריקות
DeviceNotAvailableException

clearErrorDialogs

public boolean clearErrorDialogs ()

החזרות
boolean

זריקות
DeviceNotAvailableException

clearLastConnectedWifiNetwork

public void clearLastConnectedWifiNetwork ()

clearLogcat

public void clearLogcat ()

connectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk)

פרמטרים
wifiSsid String

wifiPsk String

החזרות
boolean

זריקות
DeviceNotAvailableException

connectToWifiNetwork

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

פרמטרים
wifiSsid String

wifiPsk String

scanSsid boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

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

פרמטרים
wifiSsid String

wifiPsk String

scanSsid boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk)

פרמטרים
wifiSsid String

wifiPsk String

החזרות
boolean

זריקות
DeviceNotAvailableException

createUser

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

פרמטרים
name String

guest boolean

ephemeral boolean

החזרות
int

זריקות
DeviceNotAvailableException

createUser

public int createUser (String name)

פרמטרים
name String

החזרות
int

זריקות
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

פרמטרים
name String

החזרות
int

זריקות
DeviceNotAvailableException

deleteFile

public void deleteFile (String deviceFilePath)

פרמטרים
deviceFilePath String

זריקות
DeviceNotAvailableException

deviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

פרמטרים
prevSystemServerProcess ProcessInfo

החזרות
boolean

זריקות
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

פרמטרים
utcEpochTime long

timeUnit TimeUnit

החזרות
boolean

זריקות
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

החזרות
boolean

זריקות
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

זריקות
DeviceNotAvailableException

disableNetworkMonitor

public boolean disableNetworkMonitor ()

החזרות
boolean

זריקות
DeviceNotAvailableException

disconnectFromWifi

public boolean disconnectFromWifi ()

החזרות
boolean

זריקות
DeviceNotAvailableException

doesFileExist

public boolean doesFileExist (String deviceFilePath)

פרמטרים
deviceFilePath String

החזרות
boolean

זריקות
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

פרמטרים
process String

devicePath String

החזרות
File

זריקות
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

החזרות
boolean

זריקות
DeviceNotAvailableException

enableNetworkMonitor

public boolean enableNetworkMonitor ()

החזרות
boolean

זריקות
DeviceNotAvailableException

encryptDevice

public boolean encryptDevice (boolean inplace)

פרמטרים
inplace boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

executeAdbCommand

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

פרמטרים
timeout long

cmdArgs String

החזרות
String

זריקות
DeviceNotAvailableException

executeAdbCommand

public String executeAdbCommand (String... cmdArgs)

פרמטרים
cmdArgs String

החזרות
String

זריקות
DeviceNotAvailableException

executeFastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

פרמטרים
cmdArgs String

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeFastbootCommand

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

פרמטרים
timeout long

cmdArgs String

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeLongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

פרמטרים
cmdArgs String

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellCommand

public String executeShellCommand (String command)

פרמטרים
command String

החזרות
String

זריקות
DeviceNotAvailableException

executeShellCommand

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

פרמטרים
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

זריקות
DeviceNotAvailableException

executeShellCommand

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

פרמטרים
command String

receiver IShellOutputReceiver

maxTimeoutForCommand long

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

זריקות
DeviceNotAvailableException

executeShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

פרמטרים
command String

receiver IShellOutputReceiver

זריקות
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd)

פרמטרים
cmd String

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

פרמטרים
cmd String

pipeToOutput OutputStream

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

פרמטרים
cmd String

pipeAsInput File

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

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

פרמטרים
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

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

פרמטרים
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

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

פרמטרים
cmd String

pipeAsInput File

pipeToOutput OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

החזרות
CommandResult

זריקות
DeviceNotAvailableException

executeShellV2Command

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

פרמטרים
cmd String

pipeAsInput File

pipeToOutput OutputStream

pipeToError OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

החזרות
CommandResult

זריקות
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

פרמטרים
partition String

החזרות
CommandResult

זריקות
DeviceNotAvailableException

getActiveApexes

public  getActiveApexes ()

החזרות

זריקות
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

פרמטרים
namespace String

החזרות

זריקות
DeviceNotAvailableException

getAllocationState

public DeviceAllocationState getAllocationState ()

החזרות
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

פרמטרים
userId int

החזרות
String

זריקות
DeviceNotAvailableException

getAndroidIds

public  getAndroidIds ()

החזרות

זריקות
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

החזרות
int

זריקות
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

פרמטרים
packageName String

החזרות
PackageInfo

זריקות
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

החזרות

זריקות
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

החזרות
String

זריקות
DeviceNotAvailableException

getBattery

public Integer getBattery ()

החזרות
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

פרמטרים
name String

defaultValue boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

החזרות

זריקות
DeviceNotAvailableException

getBootHistorySince

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

פרמטרים
utcEpochTime long

timeUnit TimeUnit

החזרות

זריקות
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

החזרות
String

זריקות
DeviceNotAvailableException

getBugreport

public InputStreamSource getBugreport ()

החזרות
InputStreamSource

getBugreportz

public InputStreamSource getBugreportz ()

החזרות
InputStreamSource

getBuildAlias

public String getBuildAlias ()

החזרות
String

זריקות
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

החזרות
String

זריקות
DeviceNotAvailableException

getBuildId

public String getBuildId ()

החזרות
String

זריקות
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

החזרות
String

זריקות
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

החזרות
DeviceDescriptor

getChildren

public String[] getChildren (String path)

פרמטרים
path String

החזרות
String[]

זריקות
DeviceNotAvailableException

getCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

החזרות
DeviceFoldableState

זריקות
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

החזרות
int

זריקות
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

החזרות
String

getDeviceDate

public long getDeviceDate ()

החזרות
long

זריקות
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

החזרות
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

החזרות
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

פרמטרים
date Date

החזרות
long

זריקות
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

החזרות
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

החזרות
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

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

החזרות
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

החזרות
long

זריקות
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

החזרות
String

getFastbootProductType

public String getFastbootProductType ()

החזרות
String

זריקות
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

החזרות
String

זריקות
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

החזרות
String

getFastbootVariable

public String getFastbootVariable (String variableName)

פרמטרים
variableName String

החזרות
String

זריקות
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

החזרות
String

getFileEntry

public IFileEntry getFileEntry (String path)

פרמטרים
path String

החזרות
IFileEntry

זריקות
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

כלי עזר לא רשמי לקבלת FileEntry מנתיב שאינו ברמה הבסיסית (root). FIXME: צריך לשנות את מערכת FileEntry כך שתהיה זמינה מכל נתיב. (גם אם לא מדובר בחשבון root).

פרמטרים
entry FileListingService.FileEntry: FileEntry לא חייב להיות ברמה הבסיסית (root) כפי שנדרש ב-Ddmlib.

החזרות
IFileEntry FileEntryWrapper שמייצג את FileEntry.

זריקות
DeviceNotAvailableException

getFoldableStates

public  getFoldableStates ()

החזרות

זריקות
DeviceNotAvailableException

getIDevice

public IDevice getIDevice ()

החזרות
IDevice

getInstalledPackageNames

public  getInstalledPackageNames ()

החזרות

זריקות
DeviceNotAvailableException

getIntProperty

public long getIntProperty (String name, 
                long defaultValue)

פרמטרים
name String

defaultValue long

החזרות
long

זריקות
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

החזרות
String

זריקות
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

החזרות
KeyguardControllerState

זריקות
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public long getLastExpectedRebootTimeMillis ()

החזרות
long

getLaunchApiLevel

public int getLaunchApiLevel ()

החזרות
int

זריקות
DeviceNotAvailableException

getLogcat

public InputStreamSource getLogcat ()

החזרות
InputStreamSource

getLogcat

public InputStreamSource getLogcat (int maxBytes)

פרמטרים
maxBytes int

החזרות
InputStreamSource

getLogcatDump

public InputStreamSource getLogcatDump ()

החזרות
InputStreamSource

getLogcatSince

public InputStreamSource getLogcatSince (long date)

פרמטרים
date long

החזרות
InputStreamSource

getMacAddress

public String getMacAddress ()

החזרות
String

getMainlineModuleInfo

public  getMainlineModuleInfo ()

החזרות

זריקות
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

החזרות
int

זריקות
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

החזרות
int

זריקות
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

החזרות
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

פרמטרים
mountName String

החזרות
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

פרמטרים
mountpoint String

החזרות
ITestDevice.MountPointInfo

זריקות
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

החזרות

זריקות
DeviceNotAvailableException

getOptions

public TestDeviceOptions getOptions ()

החזרות
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

פרמטרים
partition String

החזרות
long

זריקות
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

החזרות
Integer

זריקות
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

פרמטרים
processName String

החזרות
ProcessInfo

זריקות
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

פרמטרים
process String

החזרות
String

זריקות
DeviceNotAvailableException

getProductType

public String getProductType ()

החזרות
String

זריקות
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

החזרות
String

זריקות
DeviceNotAvailableException

getProperty

public String getProperty (String name)

פרמטרים
name String

החזרות
String

זריקות
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

החזרות
ITestDevice.RecoveryMode

getScreenshot

public InputStreamSource getScreenshot (String format)

פרמטרים
format String

החזרות
InputStreamSource

זריקות
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (long displayId)

פרמטרים
displayId long

החזרות
InputStreamSource

זריקות
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

פרמטרים
format String

rescale boolean

החזרות
InputStreamSource

זריקות
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot ()

החזרות
InputStreamSource

זריקות
DeviceNotAvailableException

getSerialNumber

public String getSerialNumber ()

החזרות
String

getSetting

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

פרמטרים
userId int

namespace String

key String

החזרות
String

זריקות
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

פרמטרים
namespace String

key String

החזרות
String

זריקות
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

החזרות
String

getSimState

public String getSimState ()

החזרות
String

getTombstones

public  getTombstones ()

החזרות

זריקות
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

החזרות
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

החזרות

זריקות
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

החזרות
boolean

getUserFlags

public int getUserFlags (int userId)

פרמטרים
userId int

החזרות
int

זריקות
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

החזרות

זריקות
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

פרמטרים
userId int

החזרות
int

זריקות
DeviceNotAvailableException

handleAllocationEvent

public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

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

פרמטרים
event DeviceEvent

החזרות
IManagedTestDevice.DeviceEventResponse

hasFeature

public boolean hasFeature (String feature)

פרמטרים
feature String

החזרות
boolean

זריקות
DeviceNotAvailableException

installPackage

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

פרמטרים
packageFile File

reinstall boolean

extraArgs String

החזרות
String

זריקות
DeviceNotAvailableException

installPackage

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

פרמטרים
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

החזרות
String

זריקות
DeviceNotAvailableException

installPackageForUser

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

פרמטרים
packageFile File

reinstall boolean

userId int

extraArgs String

החזרות
String

זריקות
DeviceNotAvailableException

installPackageForUser

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

פרמטרים
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

החזרות
String

זריקות
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

החזרות
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

פרמטרים
path String

החזרות
boolean

זריקות
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

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

isEncryptionSupported

public boolean isEncryptionSupported ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isExecutable

public boolean isExecutable (String fullPath)

פרמטרים
fullPath String

החזרות
boolean

זריקות
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

החזרות
boolean

isHeadless

public boolean isHeadless ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

פרמטרים
packageName String

userId String

החזרות
boolean

זריקות
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

פרמטרים
packageName String

החזרות
boolean

זריקות
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

החזרות
boolean

זריקות
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

החזרות
boolean

isUserRunning

public boolean isUserRunning (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

החזרות
boolean

זריקות
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

החזרות

זריקות
DeviceNotAvailableException

listUsers

public  listUsers ()

החזרות

זריקות
DeviceNotAvailableException

logBugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

פרמטרים
dataName String

listener ITestLogger

החזרות
boolean

logOnDevice

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

פרמטרים
tag String

level Log.LogLevel

format String

args Object

nonBlockingReboot

public void nonBlockingReboot ()

זריקות
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

משנים את ההגדרה אם צריך לבצע פעולות ספציפיות במכשיר אחרי ה-adb root ולפני שהמכשיר חוזר לאינטרנט. הטמעת ברירת המחדל לא כוללת פעולות נוספות. אין ערובה לכך ש-adb root יופעל בשלב הזה.

זריקות
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

משנים את ההגדרה אם צריך לבצע פעולות ספציפיות במכשיר אחרי ביטול ה-root באמצעות 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

rebootUntilOnline

public void rebootUntilOnline ()

זריקות
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline (String reason)

פרמטרים
reason String

זריקות
DeviceNotAvailableException

rebootUserspace

public void rebootUserspace ()

זריקות
DeviceNotAvailableException

rebootUserspaceUntilOnline

public void rebootUserspaceUntilOnline ()

זריקות
DeviceNotAvailableException

recoverDevice

public void recoverDevice ()

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

זריקות
DeviceNotAvailableException אם המכשיר כבר לא זמין

remountSystemWritable

public void remountSystemWritable ()

זריקות
DeviceNotAvailableException

remountVendorWritable

public void remountVendorWritable ()

זריקות
DeviceNotAvailableException

removeAdmin

public boolean removeAdmin (String componentName, 
                int userId)

פרמטרים
componentName String

userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

removeOwners

public void removeOwners ()

זריקות
DeviceNotAvailableException

removeUser

public boolean removeUser (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

resetContentProviderSetup

public void resetContentProviderSetup ()

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

runInstrumentationTests

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

פרמטרים
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

החזרות
boolean

זריקות
DeviceNotAvailableException

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

פרמטרים
runner IRemoteAndroidTestRunner

listeners

החזרות
boolean

זריקות
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

פרמטרים
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

החזרות
boolean

זריקות
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

פרמטרים
runner IRemoteAndroidTestRunner

userId int

listeners

החזרות
boolean

זריקות
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

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

פרמטרים
configuration IConfiguration

setDate

public void setDate (Date date)

פרמטרים
date Date

זריקות
DeviceNotAvailableException

setDeviceOwner

public boolean setDeviceOwner (String componentName, 
                int userId)

פרמטרים
componentName String

userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

setDeviceState

public void setDeviceState (TestDeviceState deviceState)

פרמטרים
deviceState TestDeviceState

setEmulatorOutputStream

public void setEmulatorOutputStream (SizeLimitedOutputStream output)

במהלך הדמיה, מגדירים את SizeLimitedOutputStream לתיעוד הפלט

פרמטרים
output SizeLimitedOutputStream: כדי לתעד את הפלט ביומן

setEmulatorProcess

public void setEmulatorProcess (Process p)

פרמטרים
p Process

setFastbootEnabled

public void setFastbootEnabled (boolean fastbootEnabled)

פרמטרים
fastbootEnabled boolean

setFastbootPath

public void setFastbootPath (String fastbootPath)

פרמטרים
fastbootPath String

setIDevice

public void setIDevice (IDevice newDevice)

פרמטרים
newDevice IDevice

setOptions

public void setOptions (TestDeviceOptions options)

פרמטרים
options TestDeviceOptions

setProperty

public boolean setProperty (String propKey, 
                String propValue)

פרמטרים
propKey String

propValue String

החזרות
boolean

זריקות
DeviceNotAvailableException

setRecovery

public void setRecovery (IDeviceRecovery recovery)

פרמטרים
recovery IDeviceRecovery

setRecoveryMode

public void setRecoveryMode (ITestDevice.RecoveryMode mode)

פרמטרים
mode ITestDevice.RecoveryMode

setSetting

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

פרמטרים
namespace String

key String

value String

זריקות
DeviceNotAvailableException

setSetting

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

פרמטרים
userId int

namespace String

key String

value String

זריקות
DeviceNotAvailableException

setUseFastbootErase

public void setUseFastbootErase (boolean useFastbootErase)

פרמטרים
useFastbootErase boolean

startLogcat

public void startLogcat ()

startUser

public boolean startUser (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

startUser

public boolean startUser (int userId, 
                boolean waitFlag)

פרמטרים
userId int

waitFlag boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

stopEmulatorOutput

public void stopEmulatorOutput ()

stopLogcat

public void stopLogcat ()

stopUser

public boolean stopUser (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

stopUser

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

פרמטרים
userId int

waitFlag boolean

forceFlag boolean

החזרות
boolean

זריקות
DeviceNotAvailableException

switchToAdbTcp

public String switchToAdbTcp ()

החזרות
String

זריקות
DeviceNotAvailableException

switchToAdbUsb

public boolean switchToAdbUsb ()

החזרות
boolean

זריקות
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId)

פרמטרים
userId int

החזרות
boolean

זריקות
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId, 
                long timeout)

פרמטרים
userId int

timeout long

החזרות
boolean

זריקות
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

פרמטרים
localFileDir File

deviceFilePath String

החזרות
boolean

זריקות
DeviceNotAvailableException

takeBugreport

public Bugreport takeBugreport ()

החזרות
Bugreport

unencryptDevice

public boolean unencryptDevice ()

החזרות
boolean

זריקות
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

פרמטרים
packageName String

החזרות
String

זריקות
DeviceNotAvailableException

uninstallPackageForUser

public String uninstallPackageForUser (String packageName, 
                int userId)

פרמטרים
packageName String

userId int

החזרות
String

זריקות
DeviceNotAvailableException

unlockDevice

public boolean unlockDevice ()

החזרות
boolean

זריקות
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

פרמטרים
timeOut long

החזרות
boolean

זריקות
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable ()

זריקות
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable (long waitTime)

פרמטרים
waitTime long

זריקות
DeviceNotAvailableException

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

waitForDeviceOnline

public void waitForDeviceOnline ()

זריקות
DeviceNotAvailableException

waitForDeviceOnline

public void waitForDeviceOnline (long waitTime)

פרמטרים
waitTime long

זריקות
DeviceNotAvailableException

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

שיטות מוגנות

checkApiLevelAgainst

protected void checkApiLevelAgainst (String feature, 
                int strictMinLevel)

פרמטרים
feature String

strictMinLevel int

createRebootDeviceAction

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

יוצרים RebootDeviceAction שישמש לביצוע פעולת הפעלה מחדש.

פרמטרים
rebootMode NativeDevice.RebootMode: מצב ההפעלה מחדש.

reason String: להפעלה מחדש הזו.

החזרות
NativeDevice.RebootDeviceAction RebootDeviceAction שנוצר.

doAdbReboot

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

מבצעים הפעלה מחדש של adb.

פרמטרים
rebootMode NativeDevice.RebootMode: מצב ההפעלה מחדש.

reason String: להפעלה מחדש הזו.

זריקות
DeviceNotAvailableException

ensureRuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

שיטה מסייעת להעלאת חריגה אם אין תמיכה בהרשאה בזמן ריצה

זריקות
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

החזרות
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

שיטה פנימית מסייעת לקבלת קובץ ה-zip של bugreportz כ-ERROR(/File).

החזרות
File

getRunUtil

protected IRunUtil getRunUtil ()

מקבלים את המכונה RunUtil לשימוש.

החזרות
IRunUtil

internalGetProperty

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

אחזור של מאפיין מכשיר, מהמטמון של ddmlib כברירת מחדל, וחזרה ל-adb shell getprop או ל-fastboot getvar בהתאם למצב המכשיר (במצב Fastboot או לא).

פרמטרים
propName String: השם של מאפיין המכשיר כפי שהוא מוחזר על ידי `adb shell getprop`

fastbootVar String: השם של משתנה fastboot המקביל לשאילתה. אם null, לא תתבצע ניסיון להריץ שאילתה ב-fastboot

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

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

זריקות
DeviceNotAvailableException

isNewer

protected boolean isNewer (File localFile, 
                IFileEntry entry)

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

פרמטרים
localFile File

entry IFileEntry

החזרות
boolean

performDeviceAction

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

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

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

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

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

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

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

postAdbReboot

protected void postAdbReboot ()

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

זריקות
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

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

זריקות
DeviceNotAvailableException

setClock

protected void setClock (Clock clock)

מגדירים את המכונה של Clock לשימוש.

פרמטרים
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

הגדרת משך הזמן (באלפיות שנייה) להמתנה לפני תחילת הצילום של logcat במכשיר שמחובר לאינטרנט.

פרמטרים
delay int: העיכוב במילישניות

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

פרמטרים
operationDesc String

time long