AdbSshConnection

public class AdbSshConnection
extends AdbTcpConnection

java.lang.Object
   ↳ com.android.tradefed.device.connection.AbstractConnection
     ↳ com.android.tradefed.device.connection.DefaultConnection
       ↳ com.android.tradefed.device.connection.AdbTcpConnection
         ↳ com.android.tradefed.device.connection.AdbSshConnection


SSH ブリッジを介した ADB 接続。

概要

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

AdbSshConnection(DefaultConnection.ConnectionBuilder builder)

パブリック メソッド

CommandResult deleteSnapshotGce(String user, String snapshotId)

Cuttlefish インスタンスのスナップショットを削除しようとする

GceAvdInfo getAvdInfo()

作成されたリモート VM から GceAvdInfo を返します。

AbstractTunnelMonitor getGceTunnelMonitor()

デバイスの AbstractTunnelMonitor を返します。

void getSshBugreport()

デバイスに直接 SSH 接続して、リモート バグレポートをキャプチャします。

getTombstones()

Cuttlefish には、Tombstone をリモートホストに転送して直接取得できる特別な機能があります。

void initializeConnection()

デバイスの接続を初期化します。

void notifyAdbRebootCalled()

doAdbReboot が呼び出されたことを通知します。

CommandResult powerwash()

GCE インスタンスの Powerwash を試行します。

CommandResult powerwashGce(String user, Integer offset)

GCE インスタンスの Powerwash を試行します。

void reconnect(String serial)

デバイスへの接続を再接続します。

void reconnectForRecovery(String serial)

リカバリ ルーティンのためにデバイスへの接続を再確立します。

CommandResult restoreSnapshotGce(String user, Integer offset, String snapshotId)

Cuttlefish インスタンスのスナップショットの復元を試行します。

CommandResult snapshotGce(String user, Integer offset, String snapshotId)

Cuttlefish インスタンスのスナップショットを作成しようとする

void tearDownConnection()

接続をクリーンアップします。

保護されたメソッド

long getCurrentTime()

現在のシステム時刻を返します。

void launchGce(IBuildInfo buildInfo, MultiMap<String, String> attributes)

ビルド情報に基づいて実際の gce デバイスを起動します。

void waitForTunnelOnline(long waitTime)

トンネル モニターが実行されているかどうかを確認します。

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

AdbSshConnection

public AdbSshConnection (DefaultConnection.ConnectionBuilder builder)

パラメータ
builder DefaultConnection.ConnectionBuilder

パブリック メソッド

deleteSnapshotGce

public CommandResult deleteSnapshotGce (String user, 
                String snapshotId)

Cuttlefish インスタンスのスナップショットを削除しようとする

パラメータ
user String: AVD を実行しているホスト ユーザー。該当しない場合は null

snapshotId String

戻り値
CommandResult スナップショットの削除の試行の CommandResult を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

getAvdInfo

public GceAvdInfo getAvdInfo ()

作成されたリモート VM から GceAvdInfo を返します。ステータスに関係なく返品していただくようお願いいたします。

戻り値
GceAvdInfo

getGceTunnelMonitor

public AbstractTunnelMonitor getGceTunnelMonitor ()

デバイスの AbstractTunnelMonitor を返します。

戻り値
AbstractTunnelMonitor

getSshBugreport

public void getSshBugreport ()

デバイスに直接 SSH 接続して、リモート バグレポートをキャプチャします。

getTombstones

public  getTombstones ()

Cuttlefish には、Tombstone をリモートホストに転送し、直接取得できる特別な機能があります。

戻り値

initializeConnection

public void initializeConnection ()

デバイスの接続を初期化します。

例外
DeviceNotAvailableException
TargetSetupError

notifyAdbRebootCalled

public void notifyAdbRebootCalled ()

doAdbReboot が呼び出されたことを通知します。

Powerwash

public CommandResult powerwash ()

GCE インスタンスの Powerwash を試行する

戻り値
CommandResult Powerwash の試行の CommandResult を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

powerwashGce

public CommandResult powerwashGce (String user, 
                Integer offset)

GCE インスタンスの Powerwash を試行する

パラメータ
user String: AVD を実行しているホスト ユーザー。該当しない場合は null

offset Integer: ホスト内の AVD のデバイス番号オフセット(該当しない場合は null

戻り値
CommandResult Powerwash の試行の CommandResult を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

reconnect

public void reconnect (String serial)

デバイスへの接続を再確立します。

パラメータ
serial String: デバイスのシリアル番号。

例外
DeviceNotAvailableException

reconnectForRecovery

public void reconnectForRecovery (String serial)

デバイスへの接続を再確立して復元ルーティンを実行します。

パラメータ
serial String: デバイスのシリアル番号。

例外
DeviceNotAvailableException

restoreSnapshotGce

public CommandResult restoreSnapshotGce (String user, 
                Integer offset, 
                String snapshotId)

Cuttlefish インスタンスのスナップショットの復元を試行する

パラメータ
user String: AVD を実行しているホスト ユーザー。該当しない場合は null

offset Integer: ホスト内の AVD のデバイス番号オフセット(該当しない場合は null

snapshotId String: スナップショット ID

戻り値
CommandResult スナップショットの復元の試行の CommandResult を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

snapshotGce

public CommandResult snapshotGce (String user, 
                Integer offset, 
                String snapshotId)

Cuttlefish インスタンスのスナップショットを作成する

パラメータ
user String: AVD を実行しているホスト ユーザー。該当しない場合は null

offset Integer: ホスト内の AVD のデバイス番号オフセット(該当しない場合は null

snapshotId String

戻り値
CommandResult スナップショット試行の CommandResult を返します。

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

tearDownConnection

public void tearDownConnection ()

接続をクリーンアップします。

保護されたメソッド

getCurrentTime

protected long getCurrentTime ()

現在のシステム時刻を返します。テスト用に公開されています。

戻り値
long

launchGce

protected void launchGce (IBuildInfo buildInfo, 
                MultiMap<String, String> attributes)

ビルド情報に基づいて実際の gce デバイスを起動します。

パラメータ
buildInfo IBuildInfo

attributes MultiMap

例外
TargetSetupError

waitForTunnelOnline

protected void waitForTunnelOnline (long waitTime)

トンネル モニターが実行されているかどうかを確認します。

パラメータ
waitTime long

例外
DeviceNotAvailableException