LinuxCommandLibrary

sfdk-device

Manage and update device firmware

TLDR

Display the registered devices

$ sfdk device list
copy

Execute a command on a device by name or index
$ sfdk device exec [device-name-or-idx] [command]
copy

Run an interactive shell on a device by name or index
$ sfdk device exec [device-name-or-idx]
copy

SYNOPSIS

sfdk device <subcommand> [options...]
Alternatively,
sfdk device <subcommand> --help
for subcommand specific options.

PARAMETERS

flash
    Flashes a Sailfish OS image onto the connected device.

list
    Lists all detectable Sailfish OS devices and their IDs.

ssh
    Establishes an SSH connection to a specified Sailfish OS device.

status
    Displays the current status of a connected Sailfish OS device.

targets
    Manages SDK targets (SDK toolchains, APIs) installed on the device.

setup
    Guides the user through the initial setup process for a new device connection.

reset
    Resets the device connection state, often used for troubleshooting.

DESCRIPTION

sfdk-device, more accurately invoked as
sfdk device
, is a crucial subcommand of the Sailfish OS SDK command-line tool (sfdk). It provides comprehensive functionalities for interacting with and managing physical Sailfish OS devices (smartphones, tablets) during development. Developers use it to flash new operating system images onto devices, establish SSH connections for remote debugging and file transfer, manage SDK build targets installed on the device, and monitor device status. This tool streamlines the development workflow by providing a unified interface for device setup, provisioning, and troubleshooting, essential for building and testing applications within the Sailfish OS ecosystem.

CAVEATS

The sfdk-device command is exclusive to the Sailfish OS SDK environment and requires the SDK to be properly installed and configured. Using the
flash
subcommand incorrectly can potentially brick your device, making it unrecoverable. Always ensure you are using the correct image for your device model and follow official documentation carefully.

DEVICE IDENTIFICATION

Many
sfdk device
subcommands (like
status
or
ssh
) can optionally take a device ID as an argument. If multiple devices are connected, specifying the ID ensures the command operates on the intended device. The device ID can be found using
sfdk device list
.

SDK TARGETS

SDK targets are specific build environments (e.g., Sailfish OS versions, architectures) that can be installed directly onto a development device. This allows for native compilation and testing on the device itself. The
sfdk device targets
subcommand is used to manage these installations.

HISTORY

The
sfdk device
functionality has been an integral part of the Sailfish OS SDK since its early development by Jolla. It was introduced to provide developers with robust command-line tools for managing development devices, facilitating efficient testing and deployment of applications and system components on actual hardware.

SEE ALSO

sfdk(1), ssh(1)

Copied to clipboard