ffx target list
lists the visible targets. Four kinds of targets are listed:
mDNS
USB
user
-mode emulator targetsffx target add
The fundamental behavior of ffx target list
is to discover targets. Depending on configuration options, it gathers the information about targets in one of two ways, via the daemon, and directly:
When mDNS
and/or USB
discovery is enabled (via the discovery.mdns.autoconnect
and fastboot.usb.disabled
configuration options, respectively), ffx target list
will ask the ffx
daemon what targets it has discovered, and report that information. Whatever is cached by the daemon will be reported to the user.
When both the above discovery options are disabled, ffx target list
will perform local discovery: it will do its own mDNS
, USB
, emulator, and manual target discovery. It will actively broadcast mDNS
requests, and scan USB
devices. Because targets don't always respond to mDNS
requests immediately, in this mode ffx target list
waits for a period (by default, 2000 milliseconds, configurable via discovery.timeout
), in order to give time for targets to respond.
The output of ffx target list
includes information about each discovered target, including:
core.x64
)Product
or Fastboot
)Depending on the information available, any of these may be listed as “unknown”.
When performing local discovery, ffx target list
must actively probe each discovered target to determine its state and remote control status. Depending on various factors, this probe may take multiple seconds, but see below for controlling this behavior.
If a nodename is provided, the information given will be restricted to that device. Note that when local discovery is used, a full mDNS
query and USB
scan is performed to find the named device, but see below for controlling this behavior.
The following options only have an effect when performing local discovery:
--no-mdns
: do not do an mDNS
broadcast--no-usb
: do not do a USB
scan--no-probe
: do not make a connection to targets to probe for their type, state, and remote control statusThe output can be restricted by address type:
--no-ipv4
: do not return IPv4
addresses--no-ipv6
: do not return IPv6
addressesffx target list
can provide the information in a variety of formats. By default it produces a formatted table. However, the format can be controlled with the following options:
--format simple|s
: tabular format--format tabular|table|tab|t
: tabular format--format addresses|addrs|addr|a
: addresses only--format name-only|n
: names only--format json|JSON|j
: JSON
format