リモートAndroidデバイス

public class RemoteAndroidDevice
extends TestDevice

java.lang.オブジェクト
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.RemoteAndroidDevice


adb connect 経由で接続されたフルスタック Android デバイス用のITestDeviceの実装。デバイスのシリアルは次の形式であると仮定します。 : adbで。

まとめ

定数

long DEFAULT_SHORT_CMD_TIMEOUT

int MAX_RETRIES

long RETRY_INTERVAL_MS

long WAIT_FOR_ADB_CONNECT

パブリックコンストラクター

RemoteAndroidDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

RemoteAndroidDeviceを作成します。

パブリックメソッド

static boolean checkSerialFormatValid (String serialString)

シリアルの形式が期待どおりであるかどうかを確認します:ポート

DeviceDescriptor getDeviceDescriptor ()

実際のデバイス オブジェクトを渡さずにデバイス情報を取得するには、デバイス情報からDeviceDescriptorを返します。

Integer getInitialDeviceNumOffset ()

既知のデバイス番号オフセットがあればそれを返します。

String getInitialIp ()

関連付けられている最初の IP があれば、それをデバイスに返します。

String getInitialSerial ()

デバイスの初期シリアル名を返します。

String getInitialUser ()

最初の既知のユーザーがあればそれを返します。

String getMacAddress ()

デバイスの MAC アドレスを返します。デバイスからのクエリに失敗した場合は null を返します。

boolean isEncryptionSupported ()

デバイスで暗号化がサポートされているかどうかを返します。

void postInvocationTearDown (Throwable exception)

デバイス固有の必要なクリーンアップの追加手順は、呼び出しの完了後に実行されます。

void setAdbLogFile (File adbLogFile)

デバッグ目的ですべての adb 接続ログを保存できるレシーバー ファイルを指定します。

定数

DEFAULT_SHORT_CMD_TIMEOUT

protected static final long DEFAULT_SHORT_CMD_TIMEOUT

定数値: 20000 (0x0000000000004e20)

MAX_RETRIES

protected static final int MAX_RETRIES

定数値: 5 (0x00000005)

RETRY_INTERVAL_MS

protected static final long RETRY_INTERVAL_MS

定数値: 5000 (0x0000000000001388)

WAIT_FOR_ADB_CONNECT

public static final long WAIT_FOR_ADB_CONNECT

定数値: 120000 (0x000000000001d4c0)

パブリックコンストラクター

リモートAndroidデバイス

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

RemoteAndroidDeviceを作成します。

パラメーター
device IDevice : 関連付けられたIDevice

stateMonitor IDeviceStateMonitor : 使用するIDeviceStateMonitorメカニズム

allocationMonitor IDeviceMonitor : 割り当て状態の変更を通知するIDeviceMonitor

パブリックメソッド

checkSerialFormatValid

public static boolean checkSerialFormatValid (String serialString)

シリアルの形式が期待どおりであるかどうかを確認します:ポート

パラメーター
serialString String

戻り値
boolean形式が有効な場合は true、それ以外の場合は false。

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

実際のデバイス オブジェクトを渡さずにデバイス情報を取得するには、デバイス情報からDeviceDescriptorを返します。

戻り値
DeviceDescriptor

getInitialDeviceNumOffset

public Integer getInitialDeviceNumOffset ()

既知のデバイス番号オフセットがあればそれを返します。利用できない場合は null を返します。

戻り値
Integer

getInitialIp

public String getInitialIp ()

関連付けられている最初の IP があれば、それをデバイスに返します。初期 IP が不明な場合は null を返します。

戻り値
String

getInitialSerial

public String getInitialSerial ()

デバイスの初期シリアル名を返します。

戻り値
String

getInitialUser

public String getInitialUser ()

最初の既知のユーザーがあればそれを返します。最初の既知のユーザーが存在しない場合は null を返します。

戻り値
String

マックアドレスを取得する

public String getMacAddress ()

デバイスの MAC アドレスを返します。デバイスからのクエリに失敗した場合は null を返します。

戻り値
String

暗号化がサポートされています

public boolean isEncryptionSupported ()

デバイスで暗号化がサポートされているかどうかを返します。

戻り値
booleanデバイスが暗号化をサポートする場合はtrue

post呼び出しTearDown

public void postInvocationTearDown (Throwable exception)

デバイス固有の必要なクリーンアップの追加手順は、呼び出しの完了後に実行されます。

パラメーター
exception Throwable : 呼び出し失敗によって発生した最後の例外 (存在する場合)。

setAdbLogFile

public void setAdbLogFile (File adbLogFile)

デバッグ目的ですべての adb 接続ログを保存できるレシーバー ファイルを指定します。

パラメーター
adbLogFile File