AdbSsh接続

public class AdbSshConnection
extends AdbTcpConnection

java.lang.オブジェクト
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)

パブリックメソッド

GceAvdInfo getAvdInfo ()

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

AbstractTunnelMonitor getGceTunnelMonitor ()

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

void getSshBugreport ()

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

getTombstones ()

Cuttlefish には、墓石をリモート ホストに運び、直接取得できる特別な機能があります。

void initializeConnection ()

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

void notifyAdbRebootCalled ()

doAdbReboot が呼び出されたときに通知します。

CommandResult powerwash ()

GCE インスタンスをパワーウォッシュしようとします

CommandResult powerwashGce (String user, Integer offset)

GCE インスタンスをパワーウォッシュしようとします

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)

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

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

AdbSsh接続

public AdbSshConnection (DefaultConnection.ConnectionBuilder builder)

パラメーター
builder DefaultConnection.ConnectionBuilder

パブリックメソッド

getAvdInfo

public GceAvdInfo getAvdInfo ()

作成されたリモート VM からGceAvdInfoを返します。情報を検査できるよう、ステータスに関係なく返品します。

戻り値
GceAvdInfo

getGceTunnelMonitor

public AbstractTunnelMonitor getGceTunnelMonitor ()

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

戻り値
AbstractTunnelMonitor

getSshバグレポート

public void getSshBugreport ()

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

墓石を取得する

public  getTombstones ()

Cuttlefish には、墓石をリモート ホストに運び、直接取得できる特別な機能があります。

戻り値

接続の初期化

public void initializeConnection ()

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

投げる
DeviceNotAvailableException
TargetSetupError

通知AdbRebootCalled

public void notifyAdbRebootCalled ()

doAdbReboot が呼び出されたときに通知します。

パワーウォッシュ

public CommandResult powerwash ()

GCE インスタンスをパワーウォッシュしようとします

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

投げる
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

パワーウォッシュGce

public CommandResult powerwashGce (String user, 
                Integer offset)

GCE インスタンスをパワーウォッシュしようとします

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

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

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

投げる
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

再接続する

public void reconnect (String serial)

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

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

投げる
DeviceNotAvailableException

回復のために再接続する

public void reconnectForRecovery (String serial)

回復ルーチンのためにデバイスへの接続を再接続します。

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

投げる
DeviceNotAvailableException

復元スナップショットGce

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

スナップショットGce

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

接続を破棄する

public void tearDownConnection ()

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

保護されたメソッド

現在の時刻を取得する

protected long getCurrentTime ()

現在のシステム時刻を返します。テストのために露出しました。

戻り値
long

起動Gce

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

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

パラメーター
buildInfo IBuildInfo

attributes MultiMap

投げる
TargetSetupError

トンネルオンラインを待つ

protected void waitForTunnelOnline (long waitTime)

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

パラメーター
waitTime long

投げる
DeviceNotAvailableException