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 root の後かつ デバイスがオンラインになりました。

void postAdbUnrootAction()

adb unroot の後および前後に、デバイスで特定のアクションを実行する必要がある場合はオーバーライドします デバイスがオンラインに戻りました。

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 または デバイスが fastboot で実行されているかどうかに応じて、シェルの 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)

使用する Clock インスタンスを設定します。

void setLogStartDelay(int delay)

オンライン デバイスで logcat キャプチャを開始するまでの待機時間をミリ秒単位で設定します。

void waitForDeviceNotAvailable(String operationDesc, long time)

定数

INVALID_USER_ID(無効なユーザー 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)

MAX_RETRY_ATTEMPTS 回

protected static final int MAX_RETRY_ATTEMPTS

コマンドの再試行のデフォルト回数

定数値: 2 (0x00000002)

フィールド

SD_CARD

protected static final String SD_CARD

ストレージ エミュレータ

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

デバイスのソフト再起動

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

パラメータ
prevSystemServerProcess ProcessInfo

戻り値
boolean

例外
DeviceNotAvailableException

deviceSoftRestarted since

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

パラメータ
utcEpochTime long

timeUnit TimeUnit

戻り値
boolean

例外
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

戻り値
boolean

例外
DeviceNotAvailableException

Keyguard を無効にする

public void disableKeyguard ()

例外
DeviceNotAvailableException

ネットワーク モニタリングを無効にする

public boolean disableNetworkMonitor ()

戻り値
boolean

例外
DeviceNotAvailableException

接続解除 FromWifi

public boolean disconnectFromWifi ()

戻り値
boolean

例外
DeviceNotAvailableException

doesFileExist

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

EnableNetworkMonitor

public boolean enableNetworkMonitor ()

戻り値
boolean

例外
DeviceNotAvailableException

encryptionDevice

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

runShellV2Command

public CommandResult executeShellV2Command (String cmd)

パラメータ
cmd String

戻り値
CommandResult

例外
DeviceNotAvailableException

runShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

パラメータ
cmd String

pipeToOutput OutputStream

戻り値
CommandResult

例外
DeviceNotAvailableException

runShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

パラメータ
cmd String

pipeAsInput File

戻り値
CommandResult

例外
DeviceNotAvailableException

runShellV2Command

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

パラメータ
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

戻り値
CommandResult

例外
DeviceNotAvailableException

runShellV2Command

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

パラメータ
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

戻り値
CommandResult

例外
DeviceNotAvailableException

runShellV2Command

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

runShellV2Command

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

パラメータ
cmd String

pipeAsInput File

pipeToOutput OutputStream

pipeToError OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

戻り値
CommandResult

例外
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

パラメータ
partition String

戻り値
CommandResult

例外
DeviceNotAvailableException

getActiveApexes

public  getActiveApexes ()

戻り値

例外
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

パラメータ
namespace String

戻り値

例外
DeviceNotAvailableException

getAllocationState

public DeviceAllocationState getAllocationState ()

戻り値
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

パラメータ
userId int

戻り値
String

例外
DeviceNotAvailableException

getAndroidIds

public  getAndroidIds ()

戻り値

例外
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

戻り値
int

例外
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

パラメータ
packageName String

戻り値
PackageInfo

例外
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

戻り値

例外
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

戻り値
String

例外
DeviceNotAvailableException

getBattery

public Integer getBattery ()

戻り値
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

パラメータ
name String

defaultValue boolean

戻り値
boolean

例外
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

戻り値

例外
DeviceNotAvailableException

getBootHistoryBefore

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

パラメータ
utcEpochTime long

timeUnit TimeUnit

戻り値

例外
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

戻り値
String

例外
DeviceNotAvailableException

バグレポートを取得

public InputStreamSource getBugreport ()

戻り値
InputStreamSource

バグレポートの取得

public InputStreamSource getBugreportz ()

戻り値
InputStreamSource

getBuildAlias

public String getBuildAlias ()

戻り値
String

例外
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

戻り値
String

例外
DeviceNotAvailableException

getBuildId

public String getBuildId ()

戻り値
String

例外
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

戻り値
String

例外
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

戻り値
DeviceDescriptor

getChildren

public String[] getChildren (String path)

パラメータ
path String

戻り値
String[]

例外
DeviceNotAvailableException

getCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

戻り値
DeviceFoldableState

例外
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

戻り値
int

例外
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

戻り値
String

getDeviceDate

public long getDeviceDate ()

戻り値
long

例外
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

戻り値
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

戻り値
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

パラメータ
date Date

戻り値
long

例外
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

戻り値
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

戻り値
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

すべての executeShellCommand(String) ログを含むログ。

戻り値
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

戻り値
long

例外
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

戻り値
String

getFastbootProductType

public String getFastbootProductType ()

戻り値
String

例外
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

戻り値
String

例外
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

戻り値
String

getFastbootVariable

public String getFastbootVariable (String variableName)

パラメータ
variableName String

戻り値
String

例外
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

戻り値
String

getFileEntry

public IFileEntry getFileEntry (String path)

パラメータ
path String

戻り値
IFileEntry

例外
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

非ルートパスから FileEntry を取得するための非公式のヘルパー。修正: リファクタリングして 任意のパスから使用できるようになります。(root 以外も含む)。

パラメータ
entry FileListingService.FileEntry: FileEntry。Ddmlib で必要なように、root とは限りません。

戻り値
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

getLastExpectRebootTimeMillis

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

getLogcat since

public InputStreamSource getLogcatSince (long date)

パラメータ
date long

戻り値
InputStreamSource

getMacAddress

public String getMacAddress ()

戻り値
String

getMainlineModuleInfo

public  getMainlineModuleInfo ()

戻り値

例外
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

戻り値
int

例外
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

戻り値
int

例外
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

戻り値
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

パラメータ
mountName String

戻り値
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

パラメータ
mountpoint String

戻り値
ITestDevice.MountPointInfo

例外
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

戻り値

例外
DeviceNotAvailableException

getOptions

public TestDeviceOptions getOptions ()

戻り値
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

パラメータ
partition String

戻り値
long

例外
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

戻り値
Integer

例外
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

パラメータ
processName String

戻り値
ProcessInfo

例外
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

パラメータ
process String

戻り値
String

例外
DeviceNotAvailableException

getProductType

public String getProductType ()

戻り値
String

例外
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

戻り値
String

例外
DeviceNotAvailableException

getProperty

public String getProperty (String name)

パラメータ
name String

戻り値
String

例外
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

戻り値
ITestDevice.RecoveryMode

getScreenshot

public InputStreamSource getScreenshot (String format)

パラメータ
format String

戻り値
InputStreamSource

例外
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (long displayId)

パラメータ
displayId long

戻り値
InputStreamSource

例外
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

パラメータ
format String

rescale boolean

戻り値
InputStreamSource

例外
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot ()

戻り値
InputStreamSource

例外
DeviceNotAvailableException

getSerialNumber

public String getSerialNumber ()

戻り値
String

getSetting

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

パラメータ
userId int

namespace String

key String

戻り値
String

例外
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

パラメータ
namespace String

key String

戻り値
String

例外
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

戻り値
String

getSimState

public String getSimState ()

戻り値
String

getTombstone

public  getTombstones ()

戻り値

例外
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

戻り値
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

戻り値

例外
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

戻り値
boolean

getUserFlags

public int getUserFlags (int userId)

パラメータ
userId int

戻り値
int

例外
DeviceNotAvailableException

getUserInfo

public  getUserInfos ()

戻り値

例外
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

パラメータ
userId int

戻り値
int

例外
DeviceNotAvailableException

handleAllocationEvent

public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

DeviceEvent を処理します。このデバイスを新しい割り当てに移行する場合と、移行しない場合があります。 あります。

パラメータ
event DeviceEvent

戻り値
IManagedTestDevice.DeviceEventResponse

hasFeature

public boolean hasFeature (String feature)

パラメータ
feature String

戻り値
boolean

例外
DeviceNotAvailableException

installPackage

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

パラメータ
packageFile File

reinstall boolean

extraArgs String

戻り値
String

例外
DeviceNotAvailableException

installPackage

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

パラメータ
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

戻り値
String

例外
DeviceNotAvailableException

installPackageForUser

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

パラメータ
packageFile File

reinstall boolean

userId int

extraArgs String

戻り値
String

例外
DeviceNotAvailableException

installPackageForUser

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

パラメータ
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

戻り値
String

例外
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

戻り値
boolean

例外
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

戻り値
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

戻り値
boolean

例外
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

戻り値
boolean

例外
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

パラメータ
path String

戻り値
boolean

例外
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

戻り値
boolean true(デバイスで adb ルートを有効にする必要がある場合)

isEncryptionSupported

public boolean isEncryptionSupported ()

戻り値
boolean

例外
DeviceNotAvailableException

isExecutable

public boolean isExecutable (String fullPath)

パラメータ
fullPath String

戻り値
boolean

例外
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

戻り値
boolean

isHeadless

public boolean isHeadless ()

戻り値
boolean

例外
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

戻り値
boolean

例外
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

パラメータ
packageName String

userId String

戻り値
boolean

例外
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

パラメータ
packageName String

戻り値
boolean

例外
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

戻り値
boolean

例外
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

戻り値
boolean

isUserRunning

public boolean isUserRunning (int userId)

パラメータ
userId int

戻り値
boolean

例外
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

パラメータ
userId int

戻り値
boolean

例外
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

戻り値
boolean

例外
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

戻り値

例外
DeviceNotAvailableException

listUsers

public  listUsers ()

戻り値

例外
DeviceNotAvailableException

logBugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

パラメータ
dataName String

listener ITestLogger

戻り値
boolean

logOnDevice

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

パラメータ
tag String

level Log.LogLevel

format String

args Object

nonBlockingReboot

public void nonBlockingReboot ()

例外
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

adb root の後かつ デバイスがオンラインになりました。 デフォルトの実装には追加アクションは含まれていません。 この段階では、adb ルートが有効になることは保証されません。

例外
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

adb unroot の後および前後に、デバイスで特定のアクションを実行する必要がある場合はオーバーライドします デバイスがオンラインに戻りました。 デフォルトの実装には追加のアクションは含まれていません。 この段階で adb ルートが無効になる保証はありません。

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

rememberIntoBootloader

public void rebootIntoBootloader ()

例外
DeviceNotAvailableException

restartIntoFastbootd

public void rebootIntoFastbootd ()

例外
DeviceNotAvailableException

launchIntoRecovery

public void rebootIntoRecovery ()

例外
DeviceNotAvailableException

returnIntoSideload

public void rebootIntoSideload ()

例外
DeviceNotAvailableException

returnIntoSideload

public void rebootIntoSideload (boolean autoReboot)

パラメータ
autoReboot boolean

例外
DeviceNotAvailableException

restartUntilOnline

public void rebootUntilOnline ()

例外
DeviceNotAvailableException

restartUntilOnline

public void rebootUntilOnline (String reason)

パラメータ
reason String

例外
DeviceNotAvailableException

ユーザー空間を再起動

public void rebootUserspace ()

例外
DeviceNotAvailableException

returnUserspaceUntilOnline

public void rebootUserspaceUntilOnline ()

例外
DeviceNotAvailableException

recoveryDevice

public void recoverDevice ()

デバイス通信の回復を試みます。

例外
DeviceNotAvailableException デバイスが使用できなくなった場合

remountSystemWritable

public void remountSystemWritable ()

例外
DeviceNotAvailableException

remountVendorWritable

public void remountVendorWritable ()

例外
DeviceNotAvailableException

deleteAdmin

public boolean removeAdmin (String componentName, 
                int userId)

パラメータ
componentName String

userId int

戻り値
boolean

例外
DeviceNotAvailableException

オーナーを削除

public void removeOwners ()

例外
DeviceNotAvailableException

ユーザーを削除

public boolean removeUser (int userId)

パラメータ
userId int

戻り値
boolean

例外
DeviceNotAvailableException

resetContentProviderSetup

public void resetContentProviderSetup ()

再度トリガーするには、コンテンツ プロバイダ設定用のフラグをリセットしてください。

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

開始ユーザー

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

バグレポートを取得

public Bugreport takeBugreport ()

戻り値
Bugreport

暗号化解除

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

デバイスのロックを解除

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

ConfirmRuntimePermissionSupported

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 または デバイスが fastboot で実行されているかどうかに応じて、シェルの getprop または fastboot getvar を実行します。

パラメータ
propName String: adb shell getprop によって返されたデバイス プロパティの名前

fastbootVar String: クエリする同等の fastboot 変数の名前。null の場合、 fastboot クエリは試行されません

description String: 変数の簡単な説明。最初の文字は大文字にします。

戻り値
String 指定されたプロパティの値を含む文字列(null または空の場合もあります)

例外
DeviceNotAvailableException

isNewer

protected boolean isNewer (File localFile, 
                IFileEntry entry)

ローカル ファイルがリモート ファイルよりも新しい場合は、true を返します。IFileEntry は 時刻が同じ場合は、ファイルが新しいとみなされます。

パラメータ
localFile File

entry IFileEntry

戻り値
boolean

PerformDeviceAction

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

このデバイスでアクションを実行します。デバイスの復元を試行し、必要に応じてコマンドを再試行 失敗します。

パラメータ
actionDescription String: 実行するアクションの簡単な説明。ロギングに使用 使用しないでください。

action com.android.tradefed.device.NativeDevice.DeviceAction: 実行するアクション

retryAttempts int: 失敗した場合のアクションの再試行 復元成功

戻り値
boolean true: アクションが正常に完了した場合

例外
DeviceNotAvailableException 復元の試行が失敗した場合、または失敗した最大試行回数 成功

postAdbReboot

protected void postAdbReboot ()

再起動後に実行できる追加のアクション。

例外
DeviceNotAvailableException

prePostBootSetup セットアップ

protected void prePostBootSetup ()

各デバイスタイプ(AndroidNativeDevice、TestDevice)にこのメソッドをオーバーライドすることを許可します: 設定をカスタマイズしたりできます

例外
DeviceNotAvailableException

setClock

protected void setClock (Clock clock)

使用する Clock インスタンスを設定します。

パラメータ
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

オンライン デバイスで logcat キャプチャを開始するまでの待機時間をミリ秒単位で設定します。

パラメータ
delay int: 遅延(ミリ秒)

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

パラメータ
operationDesc String

time long