NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

java.lang.Object의 클래스
   ↳ com.android.tradefed.device.NativeDevice


풀 스택이 아닌 ITestDevice Android 기기의 기본 구현

요약

중첩된 클래스

class NativeDevice.AdbAction

OS 'adb ....'를 실행하기 위한 DeviceAction 명령어와 함께 사용하면 됩니다 

class NativeDevice.AdbShellAction

 

class NativeDevice.RebootDeviceAction

DeviceAction: 기기 재부팅 

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)

TestDevice를 만듭니다.

공개 메서드

boolean checkApiLevelAgainstNextRelease(int strictMinLevel)

boolean checkConnectivity()

boolean clearErrorDialogs()

void clearLastConnectedWifiNetwork()

void clearLogcat()

boolean connectToWifiNetwork(String wifiSsid, String wifiPsk)

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

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

boolean connectToWifiNetworkIfNeeded(String wifiSsid, String wifiPsk)

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

int createUser(String name)

int createUserNoThrow(String name)

void deleteFile(String deviceFilePath)

boolean deviceSoftRestarted(ProcessInfo prevSystemServerProcess)

boolean deviceSoftRestartedSince(long utcEpochTime, TimeUnit timeUnit)

boolean disableAdbRoot()

void disableKeyguard()

boolean disableNetworkMonitor()

boolean disconnectFromWifi()

boolean doesFileExist(String deviceFilePath)

File dumpHeap(String process, String devicePath)

boolean enableAdbRoot()

boolean enableNetworkMonitor()

boolean encryptDevice(boolean inplace)

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

String executeAdbCommand(String... cmdArgs)

CommandResult executeFastbootCommand(String... cmdArgs)

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

CommandResult executeLongFastbootCommand(String... cmdArgs)

String executeShellCommand(String command)

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

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

void executeShellCommand(String command, IShellOutputReceiver receiver)

CommandResult executeShellV2Command(String cmd)

CommandResult executeShellV2Command(String cmd, OutputStream pipeToOutput)

CommandResult executeShellV2Command(String cmd, File pipeAsInput)

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

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

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

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

CommandResult fastbootWipePartition(String partition)

getActiveApexes()

getAllSettings(String namespace)

DeviceAllocationState getAllocationState()
String getAndroidId(int userId)

getAndroidIds()

int getApiLevel()

PackageInfo getAppPackageInfo(String packageName)

getAppPackageInfos()

String getBasebandVersion()
Integer getBattery()

boolean getBooleanProperty(String name, boolean defaultValue)

getBootHistory()

getBootHistorySince(long utcEpochTime, TimeUnit timeUnit)

String getBootloaderVersion()

InputStreamSource getBugreport()

InputStreamSource getBugreportz()

String getBuildAlias()

String getBuildFlavor()

String getBuildId()

String getBuildSigningKeys()

DeviceDescriptor getCachedDeviceDescriptor()

String[] getChildren(String path)

DeviceFoldableState getCurrentFoldableState()
int getCurrentUser()

String getDeviceClass()

long getDeviceDate()

DeviceDescriptor getDeviceDescriptor()

TestDeviceState getDeviceState()

long getDeviceTimeOffset(Date date)

InputStreamSource getEmulatorOutput()

Process getEmulatorProcess()

final File getExecuteShellCommandLog()

모든 executeShellCommand(String) 로그가 포함된 로그

long getExternalStoreFreeSpace()

String getFastbootPath()

String getFastbootProductType()

String getFastbootProductVariant()

String getFastbootSerialNumber()

String getFastbootVariable(String variableName)

String getFastbootVersion()

IFileEntry getFileEntry(String path)

IFileEntry getFileEntry(FileListingService.FileEntry entry)

루트가 아닌 경로에서 FileEntry를 가져오는 비공식 도우미입니다.

getFoldableStates()
IDevice getIDevice()

getInstalledPackageNames()

long getIntProperty(String name, long defaultValue)

String getIpAddress()

KeyguardControllerState getKeyguardState()

long getLastExpectedRebootTimeMillis()

int getLaunchApiLevel()

InputStreamSource getLogcat()

InputStreamSource getLogcat(int maxBytes)

InputStreamSource getLogcatDump()

InputStreamSource getLogcatSince(long date)

String getMacAddress()

getMainlineModuleInfo()

int getMaxNumberOfRunningUsersSupported()
int getMaxNumberOfUsersSupported()

IDeviceStateMonitor getMonitor()
String getMountPoint(String mountName)

ITestDevice.MountPointInfo getMountPointInfo(String mountpoint)

getMountPointInfo()

TestDeviceOptions getOptions()

long getPartitionFreeSpace(String partition)

Integer getPrimaryUserId()

ProcessInfo getProcessByName(String processName)

String getProcessPid(String process)

String getProductType()

String getProductVariant()

String getProperty(String name)

ITestDevice.RecoveryMode getRecoveryMode()

InputStreamSource getScreenshot(String format)

InputStreamSource getScreenshot(long displayId)

InputStreamSource getScreenshot(String format, boolean rescale)

InputStreamSource getScreenshot()

String getSerialNumber()

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

String getSetting(String namespace, String key)

String getSimOperator()

String getSimState()

getTombstones()

long getTotalMemory()

getUninstallablePackageNames()

boolean getUseFastbootErase()

int getUserFlags(int userId)

getUserInfos()

int getUserSerialNumber(int userId)

IManagedTestDevice.DeviceEventResponse handleAllocationEvent(DeviceEvent event)

DeviceEvent를 처리합니다. 이 기기를 새 할당으로 전환할 수도 있고 전환하지 않을 수도 있습니다. 있습니다.

boolean hasFeature(String feature)

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

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

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

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

boolean isAdbRoot()

boolean isAdbTcp()
boolean isAppEnumerationSupported()

boolean isDeviceEncrypted()

boolean isDirectory(String path)

boolean isEnableAdbRoot()
boolean isEncryptionSupported()

boolean isExecutable(String fullPath)

boolean isFastbootEnabled()

boolean isHeadless()

boolean isMultiUserSupported()

boolean isPackageInstalled(String packageName, String userId)

boolean isPackageInstalled(String packageName)

boolean isRuntimePermissionSupported()

boolean isStateBootloaderOrFastbootd()

boolean isUserRunning(int userId)

boolean isUserSecondary(int userId)

boolean isWifiEnabled()

listDisplayIds()

listUsers()

boolean logBugreport(String dataName, ITestLogger listener)

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

void nonBlockingReboot()

void postAdbRootAction()

adb 루트 이후 그리고 기기가 다시 온라인 상태가 되었습니다.

void postAdbUnrootAction()

adb 루트 해제 후 및 그 전에 기기에서 특정 작업을 실행해야 하는 경우 재정의합니다. 기기가 다시 온라인 상태가 됩니다.

void postBootSetup()

void postInvocationTearDown(Throwable exception)

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

boolean pullDir(String deviceFilePath, File localDir)

boolean pullFile(String remoteFilePath, File localFile)

File pullFile(String remoteFilePath)

String pullFileContents(String remoteFilePath)

File pullFileFromExternal(String remoteFilePath)

boolean pushDir(File localFileDir, String deviceFilePath, excludedDirectories)

boolean pushDir(File localFileDir, String deviceFilePath)

boolean pushFile(File localFile, String remoteFilePath)

boolean pushString(String contents, String remoteFilePath)

void reboot(String reason)

void reboot()

void rebootIntoBootloader()

void rebootIntoFastbootd()

void rebootIntoRecovery()

void rebootIntoSideload()

void rebootIntoSideload(boolean autoReboot)

void rebootUntilOnline()
void rebootUntilOnline(String reason)

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

기기 통신 복구를 시도합니다.

void remountSystemWritable()

void remountVendorWritable()

boolean removeAdmin(String componentName, int userId)

void removeOwners()

boolean removeUser(int userId)

void resetContentProviderSetup()

다시 트리거하려면 콘텐츠 제공업체 설정 플래그를 재설정하세요.

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

boolean runInstrumentationTests(IRemoteAndroidTestRunner runner, listeners)

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

boolean runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId, listeners)

void setConfiguration(IConfiguration configuration)

사용 중인 IConfiguration를 삽입합니다.

void setDate(Date date)

boolean setDeviceOwner(String componentName, int userId)

void setDeviceState(TestDeviceState deviceState)

void setEmulatorOutputStream(SizeLimitedOutputStream output)

에뮬레이터의 경우 출력을 로깅하도록 SizeLimitedOutputStream를 설정합니다.

void setEmulatorProcess(Process p)

void setFastbootEnabled(boolean fastbootEnabled)

void setFastbootPath(String fastbootPath)

void setIDevice(IDevice newDevice)

void setOptions(TestDeviceOptions options)

boolean setProperty(String propKey, String propValue)

void setRecovery(IDeviceRecovery recovery)

void setRecoveryMode(ITestDevice.RecoveryMode mode)

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

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

void setUseFastbootErase(boolean useFastbootErase)

void startLogcat()

boolean startUser(int userId)

boolean startUser(int userId, boolean waitFlag)

void stopEmulatorOutput()

void stopLogcat()

boolean stopUser(int userId)

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

String switchToAdbTcp()

boolean switchToAdbUsb()

boolean switchUser(int userId)

boolean switchUser(int userId, long timeout)

boolean syncFiles(File localFileDir, String deviceFilePath)

Bugreport takeBugreport()

boolean unencryptDevice()

String uninstallPackage(String packageName)

String uninstallPackageForUser(String packageName, int userId)

boolean unlockDevice()

boolean waitForBootComplete(long timeOut)

void waitForDeviceAvailable()

void waitForDeviceAvailable(long waitTime)

boolean waitForDeviceInRecovery(long waitTime)

boolean waitForDeviceInSideload(long waitTime)

boolean waitForDeviceNotAvailable(long waitTime)

void waitForDeviceOnline()

void waitForDeviceOnline(long waitTime)

boolean waitForDeviceShell(long waitTime)

보호된 메서드

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

재부팅 작업을 실행할 때 사용할 RebootDeviceAction를 만듭니다.

void doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)

adb 재부팅을 실행합니다.

void ensureRuntimePermissionSupported()

런타임 권한이 지원되지 않는 경우 예외를 발생시키는 도우미 메서드

InputStreamSource getBugreportInternal()
File getBugreportzInternal()

bugreportz ZIP 파일을 ERROR(/File)로 가져오는 내부 도우미 메서드입니다.

IRunUtil getRunUtil()

사용할 RunUtil 인스턴스를 가져옵니다.

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

기본적으로 ddmlib 캐시에서 기기 속성을 가져와 `adb로 대체함 기기가 빠른 부팅에 있는지 여부에 따라 셸 getprop` 또는 `fastboot getvar` 가 사용됩니다.

boolean isNewer(File localFile, IFileEntry entry)

로컬 파일이 원격 파일보다 최신이면 true를 반환합니다.

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

이 기기에서 작업을 실행합니다.

void postAdbReboot()

재부팅 후에 수행할 수 있는 추가 작업입니다.

void prePostBootSetup()

각 기기 유형 (AndroidNativeDevice, TestDevice)에서 이 메서드를 재정의하도록 허용합니다. 설정할 수 있습니다

void setClock(Clock clock)

사용할 시계 인스턴스를 설정합니다.

void setLogStartDelay(int delay)

온라인 기기의 logcat 캡처를 시작하기 전에 대기할 시간을 밀리초 단위로 설정합니다.

void waitForDeviceNotAvailable(String operationDesc, long time)

상수

잘못된_사용자_ID

public static final int INVALID_USER_ID

유효하지 않거나 찾을 수 없는 사용자 ID에 대해 반환된 값: UserHandle에서 -10000 값을 정의함

상수 값: -10,000명 (0xffffd8f0)

MAX_HOST_DEVICE_TIME_OFFSET

protected static final long MAX_HOST_DEVICE_TIME_OFFSET

상수 값: 5,000명 (0x0000000000001388)

최대 RETRY_ATTEMPTS회

protected static final int MAX_RETRY_ATTEMPTS

수행하려는 기본 명령어 재시도 횟수

상수 값: 2개 (0x00000002)

필드

SD 카드

protected static final String SD_CARD

저장용량_에뮬레이트됨

protected static final String STORAGE_EMULATED

모바일 옵션

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

사용자 만들기

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

매개변수
name String

guest boolean

ephemeral boolean

반환 값
int

생성 값
DeviceNotAvailableException

사용자 만들기

public int createUser (String name)

매개변수
name String

반환 값
int

생성 값
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

매개변수
name String

반환 값
int

생성 값
DeviceNotAvailableException

파일 삭제

public void deleteFile (String deviceFilePath)

매개변수
deviceFilePath String

생성 값
DeviceNotAvailableException

deviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

매개변수
prevSystemServerProcess ProcessInfo

반환 값
boolean

생성 값
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

매개변수
utcEpochTime long

timeUnit TimeUnit

반환 값
boolean

생성 값
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

반환 값
boolean

생성 값
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

생성 값
DeviceNotAvailableException

네트워크 모니터 사용 중지

public boolean disableNetworkMonitor ()

반환 값
boolean

생성 값
DeviceNotAvailableException

연결 끊김

public boolean disconnectFromWifi ()

반환 값
boolean

생성 값
DeviceNotAvailableException

doFileExist

public boolean doesFileExist (String deviceFilePath)

매개변수
deviceFilePath String

반환 값
boolean

생성 값
DeviceNotAvailableException

덤프힙

public File dumpHeap (String process, 
                String devicePath)

매개변수
process String

devicePath String

반환 값
File

생성 값
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

반환 값
boolean

생성 값
DeviceNotAvailableException

네트워크 모니터 사용

public boolean enableNetworkMonitor ()

반환 값
boolean

생성 값
DeviceNotAvailableException

암호화 기기

public boolean encryptDevice (boolean inplace)

매개변수
inplace boolean

반환 값
boolean

생성 값
DeviceNotAvailableException

runAdbCommand

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

매개변수
timeout long

cmdArgs String

반환 값
String

생성 값
DeviceNotAvailableException

runAdbCommand

public String executeAdbCommand (String... cmdArgs)

매개변수
cmdArgs String

반환 값
String

생성 값
DeviceNotAvailableException

runFastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

매개변수
cmdArgs String

반환 값
CommandResult

생성 값
DeviceNotAvailableException

runFastbootCommand

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

매개변수
timeout long

cmdArgs String

반환 값
CommandResult

생성 값
DeviceNotAvailableException

runLongFastbootCommand를 실행합니다.

public CommandResult executeLongFastbootCommand (String... cmdArgs)

매개변수
cmdArgs String

반환 값
CommandResult

생성 값
DeviceNotAvailableException

runShellCommand

public String executeShellCommand (String command)

매개변수
command String

반환 값
String

생성 값
DeviceNotAvailableException

runShellCommand

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

매개변수
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

생성 값
DeviceNotAvailableException

runShellCommand

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

runShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

매개변수
command String

receiver IShellOutputReceiver

생성 값
DeviceNotAvailableException

launchShellV2Command

public CommandResult executeShellV2Command (String cmd)

매개변수
cmd String

반환 값
CommandResult

생성 값
DeviceNotAvailableException

launchShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

매개변수
cmd String

pipeToOutput OutputStream

반환 값
CommandResult

생성 값
DeviceNotAvailableException

launchShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

매개변수
cmd String

pipeAsInput File

반환 값
CommandResult

생성 값
DeviceNotAvailableException

launchShellV2Command

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

매개변수
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

반환 값
CommandResult

생성 값
DeviceNotAvailableException

launchShellV2Command

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

매개변수
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

반환 값
CommandResult

생성 값
DeviceNotAvailableException

launchShellV2Command

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

launchShellV2Command

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

빠른 부팅 삭제 파티션

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

배터리 얻기

public Integer getBattery ()

반환 값
Integer

getbooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

매개변수
name String

defaultValue boolean

반환 값
boolean

생성 값
DeviceNotAvailableException

getBoot기록

public  getBootHistory ()

반환 값

생성 값
DeviceNotAvailableException

이후 부팅 기록 가져오기

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

외부 저장소 무료 공간 가져오기

public long getExternalStoreFreeSpace ()

반환 값
long

생성 값
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

반환 값
String

getFastbootProductType

public String getFastbootProductType ()

반환 값
String

생성 값
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

반환 값
String

생성 값
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

반환 값
String

getFastbootVariable

public String getFastbootVariable (String variableName)

매개변수
variableName String

반환 값
String

생성 값
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

반환 값
String

getFileEntry

public IFileEntry getFileEntry (String path)

매개변수
path String

반환 값
IFileEntry

생성 값
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

루트가 아닌 경로에서 FileEntry를 가져오는 비공식 도우미입니다. FIXME: 어느 경로에서든 사용할 수 있도록 하려면 FileEntry 시스템을 사용해야 합니다. (루트가 아닌 경우에도 가능)

매개변수
entry FileListingService.FileEntry: FileEntry은 Ddmlib에 필요하므로 반드시 루트할 필요는 없습니다.

반환 값
IFileEntry FileEntry를 나타내는 FileEntryWrapper입니다.

생성 값
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

getLastLastbootTimeMillis

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

스크린샷 가져오기

public InputStreamSource getScreenshot (String format)

매개변수
format String

반환 값
InputStreamSource

생성 값
DeviceNotAvailableException

스크린샷 가져오기

public InputStreamSource getScreenshot (long displayId)

매개변수
displayId long

반환 값
InputStreamSource

생성 값
DeviceNotAvailableException

스크린샷 가져오기

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

매개변수
format String

rescale boolean

반환 값
InputStreamSource

생성 값
DeviceNotAvailableException

스크린샷 가져오기

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

getUseFastbootwipe

public boolean getUseFastbootErase ()

반환 값
boolean

getUserFlags

public int getUserFlags (int userId)

매개변수
userId int

반환 값
int

생성 값
DeviceNotAvailableException

사용자 정보 가져오기

public  getUserInfos ()

반환 값

생성 값
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

매개변수
userId int

반환 값
int

생성 값
DeviceNotAvailableException

핸들 할당 이벤트

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

사용자 설치 패키지

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

매개변수
packageFile File

reinstall boolean

userId int

extraArgs String

반환 값
String

생성 값
DeviceNotAvailableException

사용자 설치 패키지

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

매개변수
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

반환 값
String

생성 값
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

반환 값
boolean

생성 값
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

반환 값
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

반환 값
boolean

생성 값
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

반환 값
boolean

생성 값
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

매개변수
path String

반환 값
boolean

생성 값
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

반환 값
boolean true: 기기에서 adb 루트를 사용 설정해야 하는 경우

isEncryptionSupported

public boolean isEncryptionSupported ()

반환 값
boolean

생성 값
DeviceNotAvailableException

실행 가능

public boolean isExecutable (String fullPath)

매개변수
fullPath String

반환 값
boolean

생성 값
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

반환 값
boolean

헤드리스

public boolean isHeadless ()

반환 값
boolean

생성 값
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

반환 값
boolean

생성 값
DeviceNotAvailableException

패키지 설치됨

public boolean isPackageInstalled (String packageName, 
                String userId)

매개변수
packageName String

userId String

반환 값
boolean

생성 값
DeviceNotAvailableException

패키지 설치됨

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

로그온디바이스

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

매개변수
tag String

level Log.LogLevel

format String

args Object

비차단재부팅

public void nonBlockingReboot ()

생성 값
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

adb 루트 이후 그리고 기기가 다시 온라인 상태가 되었습니다. 기본 구현에는 추가 작업이 포함되지 않습니다. adb 루트는 이 단계에서 사용 설정되지 않을 수도 있습니다.

생성 값
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

adb 루트 해제 후 및 그 전에 기기에서 특정 작업을 실행해야 하는 경우 재정의합니다. 기기가 다시 온라인 상태가 됩니다. 기본 구현에는 추가 작업이 포함되지 않습니다. adb 루트는 이 단계에서 반드시 사용 중지되지는 않습니다.

생성 값
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

생성 값
DeviceNotAvailableException

호출 후 해체

public void postInvocationTearDown (Throwable exception)

매개변수
exception Throwable

호출 전 설정

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

pull파일

public boolean pullFile (String remoteFilePath, 
                File localFile)

매개변수
remoteFilePath String

localFile File

반환 값
boolean

생성 값
DeviceNotAvailableException

pull파일

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

푸시디르

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

매개변수
localFileDir File

deviceFilePath String

excludedDirectories

반환 값
boolean

생성 값
DeviceNotAvailableException

푸시디르

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

매개변수
localFileDir File

deviceFilePath String

반환 값
boolean

생성 값
DeviceNotAvailableException

푸시 파일

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

재부팅으로부트로더

public void rebootIntoBootloader ()

생성 값
DeviceNotAvailableException

재부팅으로 빠르게 부팅

public void rebootIntoFastbootd ()

생성 값
DeviceNotAvailableException

재부팅으로복구

public void rebootIntoRecovery ()

생성 값
DeviceNotAvailableException

재부팅으로 사이드로드

public void rebootIntoSideload ()

생성 값
DeviceNotAvailableException

재부팅으로 사이드로드

public void rebootIntoSideload (boolean autoReboot)

매개변수
autoReboot boolean

생성 값
DeviceNotAvailableException

재부팅UntilOnline

public void rebootUntilOnline ()

생성 값
DeviceNotAvailableException

재부팅UntilOnline

public void rebootUntilOnline (String reason)

매개변수
reason String

생성 값
DeviceNotAvailableException

재부팅 사용자 공간

public void rebootUserspace ()

생성 값
DeviceNotAvailableException

재부팅 사용자 공간UntilOnline

public void rebootUserspaceUntilOnline ()

생성 값
DeviceNotAvailableException

기기 복구

public void recoverDevice ()

기기 통신 복구를 시도합니다.

생성 값
DeviceNotAvailableException 기기를 더 이상 사용할 수 없는 경우

시스템 쓰기 가능 다시 마운트

public void remountSystemWritable ()

생성 값
DeviceNotAvailableException

VendorWritable 다시 마운트하기

public void remountVendorWritable ()

생성 값
DeviceNotAvailableException

관리자 삭제

public boolean removeAdmin (String componentName, 
                int userId)

매개변수
componentName String

userId int

반환 값
boolean

생성 값
DeviceNotAvailableException

소유자 삭제

public void removeOwners ()

생성 값
DeviceNotAvailableException

사용자 삭제

public boolean removeUser (int userId)

매개변수
userId int

반환 값
boolean

생성 값
DeviceNotAvailableException

재설정콘텐츠 제공업체 설정

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

날짜 설정

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

세트 IDevice

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

setUseFastbootwipe

public void setUseFastbootErase (boolean useFastbootErase)

매개변수
useFastbootErase boolean

startLogcat

public void startLogcat ()

시작 사용자

public boolean startUser (int userId)

매개변수
userId int

반환 값
boolean

생성 값
DeviceNotAvailableException

시작 사용자

public boolean startUser (int userId, 
                boolean waitFlag)

매개변수
userId int

waitFlag boolean

반환 값
boolean

생성 값
DeviceNotAvailableException

StopEmulatorOutput

public void stopEmulatorOutput ()

StopLogcat

public void stopLogcat ()

중지 사용자

public boolean stopUser (int userId)

매개변수
userId int

반환 값
boolean

생성 값
DeviceNotAvailableException

중지 사용자

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

제거 패키지

public String uninstallPackage (String packageName)

매개변수
packageName String

반환 값
String

생성 값
DeviceNotAvailableException

사용자 제거 패키지

public String uninstallPackageForUser (String packageName, 
                int userId)

매개변수
packageName String

userId int

반환 값
String

생성 값
DeviceNotAvailableException

잠금 해제

public boolean unlockDevice ()

반환 값
boolean

생성 값
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

매개변수
timeOut long

반환 값
boolean

생성 값
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable ()

생성 값
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable (long waitTime)

매개변수
waitTime long

생성 값
DeviceNotAvailableException

기기 복구 대기

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

AssuredRuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

런타임 권한이 지원되지 않는 경우 예외를 발생시키는 도우미 메서드

생성 값
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

반환 값
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

bugreportz ZIP 파일을 ERROR(/File)로 가져오는 내부 도우미 메서드입니다.

반환 값
File

getRunUtil

protected IRunUtil getRunUtil ()

사용할 RunUtil 인스턴스를 가져옵니다.

반환 값
IRunUtil

internalGetProperty

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

기본적으로 ddmlib 캐시에서 기기 속성을 가져와 `adb로 대체함 기기가 빠른 부팅에 있는지 여부에 따라 셸 getprop` 또는 `fastboot getvar` 가 사용됩니다.

매개변수
propName String: `adb shell getprop`에서 반환하는 기기 속성의 이름입니다.

fastbootVar String: 쿼리할 동등한 빠른 부팅 변수의 이름입니다. null인 경우, 빠른 부팅 쿼리를 시도하지 않음

description String: 변수에 대한 간단한 설명입니다. 첫 번째 글자는 대문자로 표기해야 합니다.

반환 값
String 지정된 속성의 값을 포함하는 문자열(null 또는 비어 있을 수 있음)입니다.

생성 값
DeviceNotAvailableException

최신

protected boolean isNewer (File localFile, 
                IFileEntry entry)

로컬 파일이 원격 파일보다 최신이면 true를 반환합니다. IFileEntry 중 분 단위까지 정확하며, 시간이 동일한 경우 새 파일로 간주됩니다.

매개변수
localFile File

entry IFileEntry

반환 값
boolean

수행기기 작업

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

이 기기에서 작업을 실행합니다. 기기 복구를 시도하고 선택적으로 명령어를 재시도합니다. 작업 실패 시

매개변수
actionDescription String: 수행할 작업에 관한 간단한 설명입니다. 로깅에 사용 있습니다.

action com.android.tradefed.device.NativeDevice.DeviceAction: 수행할 작업입니다.

retryAttempts int: 실패하면 작업을 시도하기 위한 재시도 복구 성공

반환 값
boolean 작업이 성공적으로 수행된 경우 true

생성 값
DeviceNotAvailableException 복구 시도가 실패하거나 성공

postAdbReboot

protected void postAdbReboot ()

재부팅 후에 수행할 수 있는 추가 작업입니다.

생성 값
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

각 기기 유형 (AndroidNativeDevice, TestDevice)에서 이 메서드를 재정의하도록 허용합니다. 설정할 수 있습니다

생성 값
DeviceNotAvailableException

시계 설정

protected void setClock (Clock clock)

사용할 시계 인스턴스를 설정합니다.

매개변수
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

온라인 기기의 logcat 캡처를 시작하기 전에 대기할 시간을 밀리초 단위로 설정합니다.

매개변수
delay int: 지연 시간(밀리초)

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

매개변수
operationDesc String

time long