Google is committed to advancing racial equity for Black communities. See how.

fuchsia.developer.bridge

PROTOCOLS

Daemon

Defined in fuchsia.developer.bridge/daemon.fidl

AddTarget

Manually add a target that cannot be discovered via MDNS.

Request

NameType
ip TargetAddrInfo

Response

NameType
result Daemon_AddTarget_Result

Crash

Crashes the daemon. Primarily used for testing.

Request

NameType

Response

NameType

EchoString

Returns the input.

Request

NameType
value string[256]

Response

NameType
response string[256]

GetFastboot

Gets a fastboot proxy for the given target. The target param expects an exact match with a target's nodename.

If the target nodename is not included, this will return the remote control instance for the target iff there is only one target in the cache, else will return an error. If there are no targets in the cache, will wait until the client chooses to time out.

Request

NameType
target string[255]?
fastboot request<Fastboot>

Response

NameType
result Daemon_GetFastboot_Result

GetHash

Request

NameType

Response

NameType
response string[64]

GetRemoteControl

Gets a remote control proxy for the given target. The target param expects an exact match with a target's nodename.

If the target nodename is not included, this will return the remote control instance for the target iff there is only one target in the cache, else will return an error. If there are no targets in the cache, will wait until the client chooses to time out.

Request

NameType
target string[255]?
remote request<fuchsia.developer.remotecontrol/RemoteControl>

Response

NameType
result Daemon_GetRemoteControl_Result

GetSshAddress

Attempts to get the SSH address for a given target.

Waits for: 1.) A target of the given nodename to appear (if it hasn't already). 2.) For the target to have an SSH-friendly address.

Returns:

  • First address found for the target that satisfies step 2.

Errors:

  • Timeout error if steps 1 and 2 don't happen in time.
  • Cache error if a target has appeared but suddenly disappears before running the function to completion.

Request

NameType
target string[255]?
timeout zx/duration

Response

NameType
result Daemon_GetSshAddress_Result

GetVersionInfo

Request

NameType

Response

NameType
info VersionInfo

Hang

Hang the daemon. Primarily used for testing.

Request

NameType

Response

NameType

ListTargets

Lists targets by nodename. TODO(fxbug.dev/52798): Use an iterator instead of a limited vector.

Request

NameType
value string[255]

Response

NameType
response vector<Target>[512]

Quit

Make the daemon exit.

Request

NameType

Response

NameType
success bool

RemoveTarget

Manually remove a target from the target list.

If target_id doesn't match a device name, the daemon will try to interpret it as an IP.

Request

NameType
target_id string[255]

Response

NameType
result Daemon_RemoveTarget_Result

StreamDiagnostics

Creates an iterator over diagnostics data. At present, this means cached log data.

Note that there is some duplication in this API and the StreamDiagnostics API in RCS. This is because the surface for the daemon API needs to be slightly different:

  1. It needs to accomodate specifying a target.
  2. The error surface is accordingly slightly different.
  3. The parameters surface is currently different (SNAPSHOT_RECENT_THEN_SUBSCRIBE has no meaning in the diagnostics bridge) and have different evolution paths - for example, the daemon may eventually support multi-target log streaming.

Request

NameType
target string[255]?
parameters DaemonDiagnosticsStreamParameters
iterator request<fuchsia.developer.remotecontrol/ArchiveIterator>

Response

NameType
result Daemon_StreamDiagnostics_Result

Fastboot

Defined in fuchsia.developer.bridge/fastboot.fidl

ContinueBoot

Request

NameType

Response

NameType
result Fastboot_ContinueBoot_Result

Erase

Request

NameType
partition_name string[64]

Response

NameType
result Fastboot_Erase_Result

Flash

Request

NameType
partition_name string[64]
path string[256]
listener UploadProgressListener

Response

NameType
result Fastboot_Flash_Result

Oem

Request

NameType
command string[64]

Response

NameType
result Fastboot_Oem_Result

Reboot

Request

NameType

Response

NameType
result Fastboot_Reboot_Result

RebootBootloader

Request

NameType
listener RebootListener

Response

NameType
result Fastboot_RebootBootloader_Result

SetActive

Request

NameType
slot string[64]

Response

NameType
result Fastboot_SetActive_Result

Stage

Request

NameType
path string[256]
listener UploadProgressListener

Response

NameType
result Fastboot_Stage_Result

RebootListener

Defined in fuchsia.developer.bridge/fastboot.fidl

Callback event listener for when the device reboots to the bootloader.

OnReboot

Request

NameType

UploadProgressListener

Defined in fuchsia.developer.bridge/fastboot.fidl

Callback event listener for upload progress.

OnError

Request

NameType
error string

OnFinished

Request

NameType

OnProgress

Request

NameType
bytes_written uint64

OnStarted

Request

NameType
size uint64

STRUCTS

Daemon_AddTarget_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault

Daemon_GetFastboot_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault

Daemon_GetRemoteControl_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault

Daemon_GetSshAddress_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault
ip TargetAddrInfo No default

Daemon_RemoveTarget_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault
removed bool No default

Daemon_StreamDiagnostics_Response

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescriptionDefault

Fastboot_ContinueBoot_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_Erase_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_Flash_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_Oem_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_RebootBootloader_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_Reboot_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_SetActive_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

Fastboot_Stage_Response

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescriptionDefault

TargetIp

Defined in fuchsia.developer.bridge/target.fidl

NameTypeDescriptionDefault
ip fuchsia.net/IpAddress No default
scope_id uint32 No default

TargetIpPort

Defined in fuchsia.developer.bridge/target.fidl

NameTypeDescriptionDefault
ip fuchsia.net/IpAddress No default
scope_id uint32 No default
port uint16 No default

ENUMS

DaemonError

Type: uint32

Defined in fuchsia.developer.bridge/daemon.fidl

NameValueDescription
TARGET_CACHE_ERROR 1
TARGET_STATE_ERROR 2
RCS_CONNECTION_ERROR 3
TIMEOUT 4

A generic timeout error.

TARGET_CACHE_EMPTY 5

When querying for an unspecified target, the cache was empty.

TARGET_AMBIGUOUS 6

When querying for a target (specified or not), there were too many matches to be clear on which target was the intent of the query.

TARGET_NOT_FOUND 7

When querying for a target, no matches were found.

TARGET_IN_FASTBOOT 8

When attempting to connect to RCS on a Fastboot device.

NON_FASTBOOT_DEVICE 9

Fastboot device expected.

DiagnosticsStreamError

Type: uint32

Defined in fuchsia.developer.bridge/diagnostics.fidl

NameValueDescription
GENERIC_ERROR 1
MISSING_PARAMETER 2
TARGET_MATCH_FAILED 3
NO_MATCHING_TARGETS 4
NO_STREAM_FOR_TARGET 5

FastbootError

Type: uint32

Defined in fuchsia.developer.bridge/fastboot.fidl

NameValueDescription
PROTOCOL_ERROR 1
COMMUNICATION_ERROR 2
REDISCOVERED_ERROR 3
TARGET_ERROR 4
NON_FASTBOOT_DEVICE 5

RemoteControlState

Type: uint32

Defined in fuchsia.developer.bridge/target.fidl

Current known state of the remote control

NameValueDescription
UP 1
DOWN 2
UNKNOWN 3

StreamMode

Type: uint32

Defined in fuchsia.developer.bridge/diagnostics.fidl

NameValueDescription
SNAPSHOT_ALL 1
SNAPSHOT_RECENT_THEN_SUBSCRIBE 2
SNAPSHOT_ALL_THEN_SUBSCRIBE 3
SUBSCRIBE 4

TargetState

Type: uint32

Defined in fuchsia.developer.bridge/target.fidl

NameValueDescription
UNKNOWN 1
DISCONNECTED 2
PRODUCT 3
FASTBOOT 4

TargetType

Type: uint32

Defined in fuchsia.developer.bridge/target.fidl

NameValueDescription
UNKNOWN 1

TABLES

DaemonDiagnosticsStreamParameters

Defined in fuchsia.developer.bridge/diagnostics.fidl

OrdinalNameTypeDescription
1 stream_mode StreamMode
2 min_target_timestamp_nanos uint64

Target

Defined in fuchsia.developer.bridge/target.fidl

OrdinalNameTypeDescription
1 nodename string[255]
2 addresses vector<TargetAddrInfo>[256]
3 age_ms uint64
4 rcs_state RemoteControlState
5 target_type TargetType
6 target_state TargetState
7 product_config string[100]
8 board_config string[100]
9 serial_number string[256]
10 ssh_address TargetAddrInfo

ssh_address is the preferred address to use to connect to the device over SSH, and will include a port number if a custom SSH port number has been set.

VersionInfo

Defined in fuchsia.developer.bridge/version.fidl

OrdinalNameTypeDescription
1 commit_hash string[40]
2 commit_timestamp uint64
3 build_version string[100]

UNIONS

Daemon_AddTarget_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_AddTarget_Response
err DaemonError

Daemon_GetFastboot_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_GetFastboot_Response
err DaemonError

Daemon_GetRemoteControl_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_GetRemoteControl_Response
err DaemonError

Daemon_GetSshAddress_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_GetSshAddress_Response
err DaemonError

Daemon_RemoveTarget_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_RemoveTarget_Response
err DaemonError

Daemon_StreamDiagnostics_Result

Defined in fuchsia.developer.bridge/daemon.fidl

NameTypeDescription
response Daemon_StreamDiagnostics_Response
err DiagnosticsStreamError

Fastboot_ContinueBoot_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_ContinueBoot_Response
err FastbootError

Fastboot_Erase_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_Erase_Response
err FastbootError

Fastboot_Flash_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_Flash_Response
err FastbootError

Fastboot_Oem_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_Oem_Response
err FastbootError

Fastboot_RebootBootloader_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_RebootBootloader_Response
err FastbootError

Fastboot_Reboot_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_Reboot_Response
err FastbootError

Fastboot_SetActive_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_SetActive_Response
err FastbootError

Fastboot_Stage_Result

Defined in fuchsia.developer.bridge/fastboot.fidl

NameTypeDescription
response Fastboot_Stage_Response
err FastbootError

TargetAddrInfo

Defined in fuchsia.developer.bridge/target.fidl

NameTypeDescription
ip TargetIp
ip_port TargetIpPort

CONSTANTS

NameValueTypeDescription
MAX_BUILD_VERSION_LENGTH 100 uint16
MAX_GIT_COMMIT_LENGTH 40 uint16