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 |
Connessione adb su bridge ssh.
Riepilogo
Costruttori pubblici | |
---|---|
AdbSshConnection ( DefaultConnection.ConnectionBuilder builder) |
Metodi pubblici | |
---|---|
GceAvdInfo | getAvdInfo () Restituisce |
GceSshTunnelMonitor | getGceSshMonitor () Restituisce il |
void | getSshBugreport () Cattura una segnalazione di bug remota tramite ssh direttamente nel dispositivo. |
getTombstones () Cuttlefish ha una funzione speciale che porta le lapidi all'host remoto dove possiamo ottenerle direttamente. | |
void | initializeConnection () Inizializzare la connessione del dispositivo. |
void | notifyAdbRebootCalled () Notifica quando viene chiamato doAdbReboot. |
CommandResult | powerwash () Tentativo di eseguire il powerwash di un'istanza GCE |
CommandResult | powerwashGce (String user, Integer offset) Tentativo di eseguire il powerwash di un'istanza GCE |
void | reconnect (String serial) Ristabilire la connessione al dispositivo. |
void | reconnectForRecovery (String serial) Ristabilire la connessione al dispositivo per la routine di ripristino. |
CommandResult | restoreSnapshotGce (String user, Integer offset, String snapshotId) Tentativo di ripristinare lo snapshot di un'istanza di Cuttlefish |
CommandResult | resumeGce (String user, Integer offset) Tentativo di riprendere un'istanza di Cuttlefish |
CommandResult | snapshotGce (String user, Integer offset, String snapshotId) Tentativo di eseguire lo snapshot di un'istanza di Cuttlefish |
CommandResult | stopGce (String user, Integer offset) Tentativo di arrestare un'istanza di Cuttlefish |
CommandResult | suspendGce (String user, Integer offset) Tentativo di sospendere un'istanza di Cuttlefish |
void | tearDownConnection () Pulisci la connessione. |
Metodi protetti | |
---|---|
long | getCurrentTime () Restituisce l'ora corrente del sistema. |
void | launchGce ( IBuildInfo buildInfo, MultiMap <String, String> attributes) Avvia il dispositivo gce effettivo in base alle informazioni sulla build. |
void | waitForTunnelOnline (long waitTime) Controlla se il monitor del tunnel è in esecuzione. |
Costruttori pubblici
AdbSshConnection
public AdbSshConnection (DefaultConnection.ConnectionBuilder builder)
Parametri | |
---|---|
builder | DefaultConnection.ConnectionBuilder |
Metodi pubblici
getAvdInfo
public GceAvdInfo getAvdInfo ()
Restituisce GceAvdInfo
dalla VM remota creata. Restituisce indipendentemente dallo stato in modo da poter controllare le informazioni.
ritorna | |
---|---|
GceAvdInfo |
getGceSshMonitor
public GceSshTunnelMonitor getGceSshMonitor ()
Restituisce il GceSshTunnelMonitor
del dispositivo.
ritorna | |
---|---|
GceSshTunnelMonitor |
getSshBugrereport
public void getSshBugreport ()
Cattura una segnalazione di bug remota tramite ssh direttamente nel dispositivo.
getTombstones
publicgetTombstones ()
Cuttlefish ha una funzione speciale che porta le lapidi all'host remoto dove possiamo ottenerle direttamente.
ritorna | |
---|---|
inizializzaConnessione
public void initializeConnection ()
Inizializzare la connessione del dispositivo.
Lancia | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
notifyAdbRebootCalled
public void notifyAdbRebootCalled ()
Notifica quando viene chiamato doAdbReboot.
powerwash
public CommandResult powerwash ()
Tentativo di eseguire il powerwash di un'istanza GCE
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di powerwash |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
powerwashGce
public CommandResult powerwashGce (String user, Integer offset)
Tentativo di eseguire il powerwash di un'istanza GCE
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di powerwash |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
riconnettersi
public void reconnect (String serial)
Ristabilire la connessione al dispositivo.
Parametri | |
---|---|
serial | String : il numero di serie del dispositivo. |
Lancia | |
---|---|
DeviceNotAvailableException |
reconnectForRecovery
public void reconnectForRecovery (String serial)
Ristabilire la connessione al dispositivo per la routine di ripristino.
Parametri | |
---|---|
serial | String : il numero di serie del dispositivo. |
Lancia | |
---|---|
DeviceNotAvailableException |
ripristinareSnapshotGce
public CommandResult restoreSnapshotGce (String user, Integer offset, String snapshotId)
Tentativo di ripristinare lo snapshot di un'istanza di Cuttlefish
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
snapshotId | String : l'ID dell'istantanea |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di ripristino dello snapshot |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
curriculumGce
public CommandResult resumeGce (String user, Integer offset)
Tentativo di riprendere un'istanza di Cuttlefish
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di ripresa |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
snapshotGce
public CommandResult snapshotGce (String user, Integer offset, String snapshotId)
Tentativo di eseguire lo snapshot di un'istanza di Cuttlefish
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
snapshotId | String |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di snapshot |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
stopGce
public CommandResult stopGce (String user, Integer offset)
Tentativo di arrestare un'istanza di Cuttlefish
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di arresto |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
sospendere
public CommandResult suspendGce (String user, Integer offset)
Tentativo di sospendere un'istanza di Cuttlefish
Parametri | |
---|---|
user | String : l'host che esegue l'utente di AVD, null se non applicabile. |
offset | Integer : l'offset numerico del dispositivo dell'AVD nell'host, null se non applicabile |
ritorna | |
---|---|
CommandResult | restituisce CommandResult dei tentativi di sospensione |
Lancia | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
TearDownConnection
public void tearDownConnection ()
Pulisci la connessione.
Metodi protetti
getCurrentTime
protected long getCurrentTime ()
Restituisce l'ora corrente del sistema. Esposto per test.
ritorna | |
---|---|
long |
launchGce
protected void launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes)
Avvia il dispositivo gce effettivo in base alle informazioni sulla build.
Parametri | |
---|---|
buildInfo | IBuildInfo |
attributes | MultiMap |
Lancia | |
---|---|
TargetSetupError |
waitForTunnelOnline
protected void waitForTunnelOnline (long waitTime)
Controlla se il monitor del tunnel è in esecuzione.
Parametri | |
---|---|
waitTime | long |
Lancia | |
---|---|
DeviceNotAvailableException |