INativeDevice
public
interface
INativeDevice
com.android.tradefed.device.INativeDevice |
ddmlib IDevice
に信頼性が高く、少し高レベルの API を提供します。
設定可能な回数だけデバイス コマンドを再試行し、応答しないデバイスにデバイス復元インターフェースを提供します。
概要
定数 | |
---|---|
int |
UNKNOWN_API_LEVEL
API レベルを検出できない場合のデフォルト値 |
パブリック メソッド | |
---|---|
abstract
boolean
|
checkApiLevelAgainstNextRelease(int strictMinLevel)
サポートされている最小レベルで、機能が現在サポートされているかどうかを確認します。 |
abstract
void
|
clearLogcat()
蓄積された logcat データを削除します。 |
abstract
void
|
deleteFile(String deviceFilePath)
デバイス上のファイルまたはディレクトリを削除するヘルパー メソッド。 |
abstract
void
|
deleteFile(String deviceFilePath, int userId)
デバイス上のファイルまたはディレクトリを削除するヘルパー メソッド。 |
abstract
boolean
|
deviceSoftRestarted(ProcessInfo prevSystemServerProcess)
現在の system_server と以前の system_server |
abstract
boolean
|
deviceSoftRestartedSince(long utcEpochTime, TimeUnit timeUnit)
デバイスのエポックからの UTC 時刻とその |
abstract
boolean
|
disableAdbRoot()
adb root をオフにします。 |
abstract
boolean
|
doesFileExist(String deviceFilePath)
デバイス上のファイルが存在するかどうかを判断するヘルパー メソッド。 |
abstract
boolean
|
enableAdbRoot()
adb root をオンにします。 |
abstract
String
|
executeAdbCommand(long timeout, String... commandArgs)
指定されたタイムアウトで adb コマンドをシステム コマンドとして実行するヘルパー メソッド。 |
abstract
String
|
executeAdbCommand(String... commandArgs)
adb コマンドをシステム コマンドとして実行するヘルパー メソッド。 |
abstract
String
|
executeAdbCommand(long timeout,
指定されたタイムアウトで adb コマンドをシステム コマンドとして実行するヘルパー メソッド。 |
abstract
CommandResult
|
executeFastbootCommand(long timeout, String... commandArgs)
fastboot コマンドをシステム コマンドとして実行するヘルパー メソッド。 |
abstract
CommandResult
|
executeFastbootCommand(String... commandArgs)
デフォルトのタイムアウトが 2 分間のシステム コマンドとして fastboot コマンドを実行するヘルパー メソッド。 |
abstract
CommandResult
|
executeLongFastbootCommand(String... commandArgs)
長時間実行される fastboot コマンドをシステム コマンドとして実行するヘルパー メソッド。 |
abstract
CommandResult
|
executeLongFastbootCommand(
長時間実行される fastboot コマンドを、システム環境変数を使用してシステム コマンドとして実行するヘルパー メソッド。 |
abstract
String
|
executeShellCommand(String command)
adb シェルコマンドを実行し、出力を |
abstract
void
|
executeShellCommand(String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
void
|
executeShellCommand(String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
void
|
executeShellCommand(String command, IShellOutputReceiver receiver)
指定された adb シェルコマンドを実行し、コマンドが失敗した場合は複数回再試行します。 |
abstract
CommandResult
|
executeShellV2Command(String command)
adb シェルコマンドを実行し、コマンド ステータス出力、stdout、stderr が適切に入力された |
abstract
CommandResult
|
executeShellV2Command(String command, OutputStream pipeToOutput)
adb シェルコマンドを実行し、コマンド ステータス出力と stderr が適切に入力された |
abstract
CommandResult
|
executeShellV2Command(String command, File pipeAsInput)
adb シェルコマンドを実行し、コマンド ステータス出力、stdout、stderr が適切に入力された |
abstract
CommandResult
|
executeShellV2Command(String command, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
CommandResult
|
executeShellV2Command(String command, long maxTimeoutForCommand, TimeUnit timeUnit)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
CommandResult
|
executeShellV2Command(String command, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
CommandResult
|
executeShellV2Command(String command, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
コマンドの動作を制御するための追加のパラメータを使用して、adb シェルコマンドを実行します。 |
abstract
CommandResult
|
fastbootWipePartition(String partition)
デバイスのパーティションをワイプするヘルパー メソッド。 |
abstract
int
|
getApiLevel()
デバイスの API レベルを取得します。 |
abstract
String
|
getBasebandVersion()
このデバイスのベースバンド(無線)バージョンを取得する便利なメソッド。 |
abstract
Integer
|
getBattery()
デバイスの現在のバッテリー残量を返します。バッテリー残量が取得できない場合は null を返します。 |
abstract
boolean
|
getBooleanProperty(String name, boolean defaultValue)
指定されたプロパティのブール値を返します。 |
abstract
|
getBootHistory()
ヘルパー メソッドは、起動時間と起動理由を含む起動履歴マップを収集します。 |
abstract
|
getBootHistorySince(long utcEpochTime, TimeUnit timeUnit)
ヘルパー メソッドは、デバイスから指定されたエポックからの時間と指定された時間単位以降の起動時間と起動理由を含む起動履歴マップを収集します。 |
abstract
String
|
getBootloaderVersion()
このデバイスのブートローダーのバージョンを取得する便利なメソッドです。 |
abstract
String
|
getBuildAlias()
デバイスで現在実行されているビルドのエイリアスを取得します。 |
abstract
String
|
getBuildFlavor()
デバイスのビルドフレーバーを取得します。 |
abstract
String
|
getBuildId()
デバイスで現在実行されているビルドを取得します。 |
abstract
String
|
getBuildSigningKeys()
デバイス イメージの署名に使用される鍵の種類を返します。 通常、Android デバイスはテストキー(AOSP など)またはリリースキー(個々のデバイス メーカーが管理)で署名されます。 |
abstract
DeviceDescriptor
|
getCachedDeviceDescriptor()
デバイスが割り当てられている場合はキャッシュに保存された |
abstract
DeviceDescriptor
|
getCachedDeviceDescriptor(boolean shortDescriptor)
デバイスが割り当てられている場合はキャッシュに保存された |
abstract
String[]
|
getChildren(String deviceFilePath)
|
abstract
AbstractConnection
|
getConnection()
デバイスに関連付けられている接続を返します。 |
abstract
String
|
getDeviceClass()
デバイスクラスを取得します。 |
abstract
long
|
getDeviceDate()
デバイスの日付をエポックからのミリ秒単位で返します。 |
abstract
DeviceDescriptor
|
getDeviceDescriptor()
デバイス情報から |
abstract
DeviceDescriptor
|
getDeviceDescriptor(boolean shortDescriptor)
デバイス情報から |
abstract
TestDeviceState
|
getDeviceState()
デバイスの状態を取得します。 |
abstract
long
|
getDeviceTimeOffset(Date date)
デバイスと指定された |
abstract
InputStreamSource
|
getEmulatorOutput()
エミュレータの stdout と stderr のストリームを取得します。 |
abstract
long
|
getExternalStoreFreeSpace()
デバイスの外部ストレージの空き容量を判断するヘルパー メソッド。 |
abstract
String
|
getFastbootProductType()
fastboot モードでこのデバイスのプロダクト タイプを取得する便利なメソッドです。 |
abstract
String
|
getFastbootProductVariant()
fastboot モードでこのデバイスのプロダクト タイプを取得する便利なメソッドです。 |
abstract
String
|
getFastbootSerialNumber()
Fastboot モードのシリアル番号を返します。 |
abstract
String
|
getFastbootVariable(String variableName)
デバイスから指定された fastboot 変数の値を取得します。 |
abstract
IFileEntry
|
getFileEntry(String path)
デバイス上のリモート ファイルへの参照を取得します。 |
abstract
IDevice
|
getIDevice()
関連する ddmlib |
abstract
long
|
getIntProperty(String name, long defaultValue)
デバイスから指定されたプロパティの整数値を返します。 |
abstract
long
|
getLastExpectedRebootTimeMillis()
Tradefed API が最後に再起動をトリガーした時刻(エポックからのミリ秒単位)を |
abstract
int
|
getLaunchApiLevel()
デバイスが最初にリリースされた API レベルを取得します。 |
abstract
InputStreamSource
|
getLogcat()
logcat データのスナップショット ストリームを取得します。 |
abstract
InputStreamSource
|
getLogcat(int maxBytes)
キャプチャされた logcat データの最後の |
abstract
InputStreamSource
|
getLogcatDump()
デバイスの現在の logcat ダンプを取得します。 |
abstract
InputStreamSource
|
getLogcatSince(long date)
指定された日付からキャプチャされた logcat データのスナップショット ストリームを取得します。 |
abstract
String
|
getMountPoint(String mountName)
マウント ポイントを返します。 |
abstract
ITestDevice.MountPointInfo
|
getMountPointInfo(String mountpoint)
指定されたマウントポイント パスに対応する |
abstract
|
getMountPointInfo()
デバイスの /proc/mounts にある情報を解析したバージョンを返します。 |
abstract
long
|
getPartitionFreeSpace(String partition)
デバイス パーティションの空き容量を判断するヘルパー メソッド。 |
abstract
ProcessInfo
|
getProcessByName(String processName)
ヘルパー メソッドは「pidof」コマンドと「stat」コマンドを実行し、指定されたプロセスの PID とプロセス開始時間を示す |
abstract
String
|
getProcessPid(String process)
サービスの pid を返します。エラーが発生した場合は null を返します。 |
abstract
String
|
getProductType()
このデバイスのプロダクト タイプを取得する便利なメソッド。 |
abstract
String
|
getProductVariant()
このデバイスの商品バリエーションを取得するための便利なメソッド。 |
abstract
String
|
getProperty(String name)
デバイスから指定されたプロパティ値を取得します。 |
abstract
ITestDevice.RecoveryMode
|
getRecoveryMode()
デバイスで使用されている現在のリカバリモードを取得します。 |
abstract
String
|
getSerialNumber()
このデバイスのシリアル番号を取得する便利なメソッド。 |
abstract
|
getTombstones()
デバイスから墓石のリストを取得して返します。 |
abstract
long
|
getTotalMemory()
物理メモリの合計サイズをバイト単位で返します。内部エラーの場合は -1 を返します。 |
default
String
|
getTrackingSerial()
デバイス管理の目的で、デバイスの追跡に使用されるシリアル番号を取得します。 |
abstract
boolean
|
getUseFastbootErase()
fastboot erase と fastboot format のどちらを使用してデバイスのパーティションをワイプするかを取得します。 |
abstract
boolean
|
isAdbRoot()
|
abstract
boolean
|
isAdbTcp()
|
abstract
boolean
|
isAppEnumerationSupported()
デバイス上のプラットフォームがアプリの列挙をサポートしているかどうかを確認します。 |
abstract
boolean
|
isBypassLowTargetSdkBlockSupported()
デバイス上のプラットフォームが、アプリのインストール時に低いターゲット SDK ブロックのバイパスをサポートしているかどうかを確認します。 |
abstract
boolean
|
isDebugfsMounted()
debugfs がマウントされているかどうかを確認します。 |
abstract
boolean
|
isDeviceEncrypted()
デバイスが暗号化されているかどうかを返します。 |
abstract
boolean
|
isDirectory(String deviceFilePath)
デバイス上のパスがディレクトリである場合は true、そうでない場合は false を返します。 |
abstract
boolean
|
isEncryptionSupported()
デバイスで暗号化がサポートされているかどうかを返します。 |
abstract
boolean
|
isExecutable(String fullPath)
デバイス上のファイルパスが実行可能ファイルである場合は true を返し、そうでない場合は false を返します。 |
abstract
boolean
|
isHeadless()
デバイスがヘッドレス(画面なし)の場合は true、それ以外の場合は false を返します。 |
abstract
boolean
|
isRuntimePermissionSupported()
デバイス上のプラットフォームがランタイム権限の付与をサポートしているかどうかを確認します。 |
abstract
boolean
|
isStateBootloaderOrFastbootd()
デバイスが |
abstract
boolean
|
logAnrs(ITestLogger logger)
デバイスから ANR を収集してログに記録します。 |
abstract
void
|
logOnDevice(String tag, Log.LogLevel level, String format, Object... args)
デバイスの logcat にメッセージを記録します。 |
abstract
void
|
mountDebugfs()
debugfs をマウントします。 |
abstract
void
|
nonBlockingReboot()
デバイスを再起動するためのコマンドを送信し、コマンドが完了したとき、またはデバイスが adb に表示されなくなったときに返します。 |
abstract
void
|
postBootSetup()
起動後にテストを行うようにデバイスを構成する手順を実施します。 |
default
void
|
postInvocationTearDown()
このメソッドは非推奨です。
代わりに |
abstract
void
|
postInvocationTearDown(Throwable invocationException)
呼び出しが完了した後に実行される、デバイス固有の必要なクリーンアップの追加手順。 |
default
void
|
preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)
呼び出しフローの前にデバイス上で実行される、デバイス固有の必要な設定の追加手順。 |
abstract
boolean
|
pullDir(String deviceFilePath, File localDir)
デバイスからディレクトリ コンテンツを再帰的に pull します。 |
abstract
boolean
|
pullDir(String deviceFilePath, File localDir, int userId)
デバイスからディレクトリ コンテンツを再帰的に pull します。 |
abstract
File
|
pullFile(String remoteFilePath, int userId)
デバイスからファイルを取得し、ローカルの一時 |
abstract
File
|
pullFile(String remoteFilePath)
デバイスからファイルを取得し、ローカルの一時 |
abstract
boolean
|
pullFile(String remoteFilePath, File localFile)
デバイスからファイルを取得します。 |
abstract
boolean
|
pullFile(String remoteFilePath, File localFile, int userId)
デバイスからファイルを取得します。 |
abstract
String
|
pullFileContents(String remoteFilePath)
デバイスからファイルを取得し、内容を返します。 |
abstract
File
|
pullFileFromExternal(String remoteFilePath)
デバイスの外部ストレージからファイルを取得し、ローカルの一時 |
abstract
boolean
|
pushDir(File localDir, String deviceFilePath, int userId)
ディレクトリの内容を再帰的にデバイスに push します。 |
abstract
boolean
|
pushDir(File localDir, String deviceFilePath,
フィルタされた一部のディレクトリを除外しながら、ディレクトリの内容をデバイスに再帰的にプッシュします。 |
abstract
boolean
|
pushDir(File localDir, String deviceFilePath)
ディレクトリの内容を再帰的にデバイスに push します。 |
abstract
boolean
|
pushFile(File localFile, String deviceFilePath, boolean evaluateContentProviderNeeded)
|
abstract
boolean
|
pushFile(File localFile, String deviceFilePath)
ファイルをデバイスにプッシュします。 |
abstract
boolean
|
pushFile(File localFile, String deviceFilePath, int userId)
ファイルをデバイスにプッシュします。 |
abstract
boolean
|
pushString(String contents, String deviceFilePath)
文字列から作成されたファイルをデバイスにプッシュする |
abstract
void
|
reboot()
デバイスを adb モードで再起動します。 |
abstract
void
|
reboot(String reason)
指定された |
abstract
void
|
rebootIntoBootloader()
デバイスを再起動してブートローダー モードに入ります。 |
abstract
void
|
rebootIntoFastbootd()
デバイスを再起動して fastbootd モードに入ります。 |
abstract
void
|
rebootIntoRecovery()
デバイスを再起動して adb リカバリ モードに入ります。 |
abstract
void
|
rebootIntoSideload(boolean autoReboot)
デバイスを adb サイドロード モードに再起動します(これはリカバリの特別なモードです)。 デバイスがサイドロード モードに入るまでブロックします |
abstract
void
|
rebootIntoSideload()
デバイスを adb サイドロード モードに再起動します(これはリカバリの特別なモードです)。 デバイスがサイドロード モードに入るまでブロックします |
abstract
void
|
rebootUntilOnline()
|
abstract
void
|
rebootUntilOnline(String reason)
|
abstract
void
|
rebootUserspace()
デバイスのユーザー空間部分のみを再起動します。 |
abstract
void
|
rebootUserspaceUntilOnline()
|
abstract
void
|
remountSystemReadOnly()
デバイスのシステム パーティションを読み取り専用にします。 |
abstract
void
|
remountSystemWritable()
デバイスのシステム パーティションを書き込み可能にします。 |
abstract
void
|
remountVendorReadOnly()
デバイス上のベンダー パーティションを読み取り専用にします。 |
abstract
void
|
remountVendorWritable()
デバイス上のベンダー パーティションを書き込み可能にします。 |
abstract
boolean
|
runInstrumentationTests(IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners)
1 つ以上のリスナーをパラメータとして渡して |
abstract
boolean
|
runInstrumentationTests(IRemoteAndroidTestRunner runner,
インストルメンテーション テストを実行し、デバイスの復元を提供します。 |
abstract
boolean
|
runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId,
|
abstract
boolean
|
runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)
|
abstract
void
|
setDate(Date date)
デバイスの日付を設定します 注: デバイスの日付を設定するには、root 権限が必要です。 |
abstract
void
|
|