NativeDevice
public
class
NativeDevice
extends Object
implements
IManagedTestDevice,
IConfigurationReceiver
java.lang.Object | |
↳ | com.android.tradefed.device.NativeDevice |
ITestDevice
비전체 스택 Android 기기의 기본 구현입니다.
요약
중첩된 클래스 | |
---|---|
class |
NativeDevice.AdbAction
OS 'adb ....' 명령어를 실행하기 위한 |
class |
NativeDevice.AdbShellAction
|
class |
NativeDevice.RebootDeviceAction
|
enum |
NativeDevice.RebootMode
재부팅 모드입니다. |
상수 | |
---|---|
int |
INVALID_USER_ID
잘못되거나 찾을 수 없는 사용자 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)
|
공개 메서드 | |
---|---|
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()
모든 |
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)
루트가 아닌 경로에서 |
|
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,
|
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,
|
boolean
|
runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)
|
boolean
|
runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId,
|
void
|
setConfiguration(IConfiguration configuration)
사용 중인 |
void
|
setDate(Date date)
|
boolean
|
setDeviceOwner(String componentName, int userId)
|
void
|
setDeviceState(TestDeviceState deviceState)
|
void
|
setEmulatorOutputStream(SizeLimitedOutputStream output)
에뮬레이터의 경우 |
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)
재부팅 작업을 실행할 때 사용할 |
void
|
doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)
adb 재부팅을 실행합니다. |
void
|
ensureRuntimePermissionSupported()
런타임 권한이 지원되지 않는 경우 예외를 발생시키는 도우미 메서드 |
InputStreamSource
|
getBugreportInternal()
|
File
|
getBugreportzInternal()
bugreportz ZIP 파일을 |
IRunUtil
|
getRunUtil()
사용할 |
String
|
internalGetProperty(String propName, String fastbootVar, String description)
기본적으로 ddmlib 캐시에서 기기 속성을 가져오고 기기가 빠른 부팅 모드에 있는지 여부에 따라 `adb shell getprop` 또는 `fastboot getvar` 로 대체합니다. |
boolean
|
isNewer(File localFile, IFileEntry entry)
로컬 파일이 원격 파일보다 최신인 경우 |
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
잘못되거나 찾을 수 없는 사용자 ID에 대해 반환된 값: UserHandle가 -10000 값을 정의함
상수 값: -10000 (0xffffd8f0)
MAX_HOST_DEVICE_TIME_OFFSET
protected static final long MAX_HOST_DEVICE_TIME_OFFSET
상수 값: 5000 (0x0000000000001388)
MAX_RETRY_ATTEMPTS
protected static final int MAX_RETRY_ATTEMPTS
실행할 기본 명령어 재시도 횟수
상수 값: 2 (0x00000002)
필드
SD_CARD
protected static final String SD_CARD
STORAGE_EMULATED
protected static final String STORAGE_EMULATED
mOptions
protected TestDeviceOptions mOptions
mStateMonitor
protected final IDeviceStateMonitor mStateMonitor
공개 생성자
NativeDevice
public NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
TestDevice
를 만듭니다.
매개변수 | |
---|---|
device |
IDevice : 연결된 IDevice |
stateMonitor |
IDeviceStateMonitor : 사용할 IDeviceStateMonitor 메커니즘입니다. |
allocationMonitor |
IDeviceMonitor : 할당 상태 변경을 알리는 IDeviceMonitor 입니다.
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
publicgetActiveApexes ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getAllSettings
publicgetAllSettings (String namespace)
매개변수 | |
---|---|
namespace |
String |
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getAllocationState
public DeviceAllocationState getAllocationState ()
반환 값 | |
---|---|
DeviceAllocationState |
getAndroidId
public String getAndroidId (int userId)
매개변수 | |
---|---|
userId |
int |
반환 값 | |
---|---|
String |
생성 값 | |
---|---|
DeviceNotAvailableException |
getAndroidIds
publicgetAndroidIds ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getApiLevel
public int getApiLevel ()
반환 값 | |
---|---|
int |
생성 값 | |
---|---|
DeviceNotAvailableException |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
매개변수 | |
---|---|
packageName |
String |
반환 값 | |
---|---|
PackageInfo |
생성 값 | |
---|---|
DeviceNotAvailableException |
getAppPackageInfos
publicgetAppPackageInfos ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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
publicgetBootHistory ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getBootHistorySince
publicgetBootHistorySince (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 : Ddmlib에서 요구하는 것처럼 FileEntry 가 꼭 루트일 필요는 없습니다. |
반환 값 | |
---|---|
IFileEntry |
FileEntry를 나타내는 FileEntryWrapper 입니다. |
생성 값 | |
---|---|
DeviceNotAvailableException |
getFoldableStates
publicgetFoldableStates ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getIDevice
public IDevice getIDevice ()
반환 값 | |
---|---|
IDevice |
getInstalledPackageNames
publicgetInstalledPackageNames ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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
publicgetMainlineModuleInfo ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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
publicgetMountPointInfo ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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
publicgetTombstones ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getTotalMemory
public long getTotalMemory ()
반환 값 | |
---|---|
long |
getUninstallablePackageNames
publicgetUninstallablePackageNames ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
getUseFastbootErase
public boolean getUseFastbootErase ()
반환 값 | |
---|---|
boolean |
getUserFlags
public int getUserFlags (int userId)
매개변수 | |
---|---|
userId |
int |
반환 값 | |
---|---|
int |
생성 값 | |
---|---|
DeviceNotAvailableException |
getUserInfos
publicgetUserInfos ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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 |
기기에서 adb 루트를 사용 설정해야 하는 경우 true
|
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
publiclistDisplayIds ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
DeviceNotAvailableException |
listUsers
publiclistUsers ()
반환 값 | |
---|---|
|
생성 값 | |
---|---|
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 |
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 ()
bugreportz ZIP 파일을 ERROR(/File)
로 가져오는 내부 도우미 메서드입니다.
반환 값 | |
---|---|
File |
internalGetProperty
protected String internalGetProperty (String propName, String fastbootVar, String description)
기본적으로 ddmlib 캐시에서 기기 속성을 가져오고 기기가 빠른 부팅 모드에 있는지 여부에 따라 `adb shell getprop` 또는 `fastboot getvar` 로 대체합니다.
매개변수 | |
---|---|
propName |
String : `adb shell getprop`에서 반환한 기기 속성의 이름 |
fastbootVar |
String : 쿼리할 상응하는 빠른 부팅 변수의 이름입니다. null 인 경우 빠른 부팅 쿼리가 시도되지 않습니다. |
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 |