Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration and files

The settings of Tetheron, the files it reads and writes on the desktop, the service, the network ports and the data of the Android app. Entries marked 0.5.0 ship with the next release. The latest release is 0.4.1.

Settings of the daemon: config.toml

Path: $XDG_CONFIG_HOME/tether/config.toml (default ~/.config/tether/config.toml).

The daemon creates the file with default values when it does not exist. It reads the file once at start and writes the whole file again whenever a setting changes through the app, tether-cli or D-Bus. Edit the file by hand only while the daemon is stopped. A file that is not valid TOML stops the daemon at start. A key that is missing gets its default.

The column CLI key gives the name for tether-cli config. Keys without one can be changed in the file only, or through the place named in the description.

Global keys

KeyCLI keyTypeDefaultEffect
namenamestringhost name, or LinuxName this desktop announces to phones. Must not be empty.
discoverablediscoverablebooleantrueAnnounce this desktop through mDNS and the UDP beacon.
show_desktop_notificationsdesktop-notificationsbooleantrueShow the phone’s notifications as desktop notifications.
message_notificationsmessage-notificationsbooleantrueShow a desktop notification for a new incoming message.
manual_addressesarray of strings[]host or host:port entries the daemon dials at start. tether-cli add appends to it.
portinteger7360TCP port of the listener and UDP port of the beacon.
download_dirdownload-dirstring""Directory for received files. Empty means ~/Downloads/Tether, or $XDG_DOWNLOAD_DIR/Tether when that variable is set. A leading ~/ is expanded.
auto_accept_filesauto-accept-filesbooleantrueAccept files offered by paired devices without asking.
clipboard_syncclipboard-syncstring"both"Direction of clipboard sync: off, to_phone, from_phone or both.
call_audio_on_pccall-audio-on-pcbooleantrueMove call audio to the desktop when a call connects and the Bluetooth hands-free link is up.
call_echo_cancelbooleantrueRun PipeWire’s echo canceller while call audio uses the desktop’s default speakers and microphone.
call_ringtonecall-ringtonebooleantruePlay a ringtone on the desktop for incoming calls.
pause_media_on_callpause-media-on-callbooleantruePause desktop media players (MPRIS) while a call rings or is in progress.
adb_serverstring"private"private: the daemon runs its own adb server with its own key. shared: it uses your adb server. Any other value is treated as private.
adb_server_portinteger5038Port of the private adb server.
adb_pathstring""Path of the adb program. Empty means: search PATH, then $ANDROID_HOME/platform-tools, $ANDROID_SDK_ROOT/platform-tools and ~/Android/Sdk/platform-tools.
phone_audio_sourcestring"auto"How the shell helper captures phone audio: auto, output, playback or playback_dup. auto takes the first of the three that the phone supports.
webcam_size (0.5.0)string"1280x720"Picture size of the virtual camera: 1280x720, 640x480 or 1920x1080. Any other value means 1280x720.
webcam_fps (0.5.0)integer30Frame rate of the virtual camera, 5 to 60. Any other value means 30.
webcam_device (0.5.0)string""Device node of the v4l2loopback device to use. Empty means the device labelled Tether Phone Camera.

Per-device keys

Each device has a table [devices.<device id>]. A device without a table uses the defaults.

KeyTypeDefaultEffect
blocked_packagesarray of strings[]Android package names whose notifications are not shown on the desktop. Changed in the app’s per-app list.
sync_messagesbooleantrueSync SMS and MMS from this phone.
sync_contactsbooleantrueSync contacts from this phone.
sync_photosbooleantrueIndex this phone’s gallery.
bt_addressstring""Bluetooth address of the phone. Written by the daemon after Bluetooth pairing.
adb_serialstring""Hardware serial of the adb device linked to this phone. Written by the enhanced set-up; empty means not set up.
phone_audiobooleanfalsePlay this phone’s audio on the desktop. The Play phone audio on this PC switch and tether-cli phone-audio.
webcam (0.5.0)booleanfalseUse this phone as the webcam. The Use as webcam switch and tether-cli webcam.
webcam_camera (0.5.0)string"back"front, back or a camera id.
webcam_rotation (0.5.0)integer0Clockwise rotation of the picture: 0, 90, 180 or 270.
webcam_flip (0.5.0)booleanfalseMirror the picture horizontally.
webcam_zoom (0.5.0)float1.0Zoom factor.

Example

name = "study-pc"
discoverable = true
clipboard_sync = "from_phone"
manual_addresses = ["192.168.1.40"]

[devices.<device id>]
blocked_packages = ["com.example.game"]
sync_photos = false

Replace <device id> with the 64-character id of the phone.

Settings of the GTK app: gtk.toml

Path: $XDG_CONFIG_HOME/tether/gtk.toml (default ~/.config/tether/gtk.toml).

The app reads the file at start and writes it when a value changes. A file that cannot be parsed is ignored and the defaults apply.

KeyTypeDefaultEffect
show_traybooleantrueShow a tray icon and keep the app running when the window is closed.
window_widthinteger900Width of the main window when it was last closed.
window_heightinteger640Height of the main window.
window_maximizedbooleanfalseWhether the main window was maximised.
mirror_screen_offbooleanfalseSwitch the phone’s own screen off when a mirror window opens.
mirror_software_decodingbooleanfalseDo not use hardware video decoders in mirror windows.
mirror_max_sizeinteger0Longest side of the mirrored phone screen in pixels. 0 means the phone’s own size. Does not apply to app windows.
mirror_bitrateinteger0Video bitrate in bit/s. 0 means the phone’s default (8 Mbit/s).
apps_show_systembooleanfalseShow preinstalled apps in the Apps tab.
app_sizestableemptyLast window size of each phone app, by package name. Written by the app.
app_recentstableemptyRecently opened phone apps, by device id. Written by the app.

Files on the desktop

$XDG_CONFIG_HOME, $XDG_DATA_HOME and $XDG_CACHE_HOME default to ~/.config, ~/.local/share and ~/.cache.

Per-user files

PathWritten byContent
$XDG_CONFIG_HOME/tether/config.tomltetherdSettings of the daemon
$XDG_CONFIG_HOME/tether/gtk.tomltetherSettings of the app
$XDG_CONFIG_HOME/autostart/org.tether.Tether.desktoptetherAutostart entry that runs tether --background at login. Present while Start Tether in background at login is on in the app’s preferences.
$XDG_DATA_HOME/tether/identity.keytetherdPrivate key of this desktop (PEM, mode 0600)
$XDG_DATA_HOME/tether/identity.crttetherdCertificate of this desktop (PEM). The device id is derived from it.
$XDG_DATA_HOME/tether/trusted.tomltetherdPaired devices: id, name, kind, certificate, time of pairing (mode 0600)
$XDG_DATA_HOME/tether/devices/<device id>/cache.dbtetherdSQLite cache of one phone: threads, messages, attachments, contacts, gallery index, transfers, call log, app list
$XDG_DATA_HOME/tether/adb/adbHome directory of the private adb server; .android/ inside holds its key pair
$XDG_DATA_HOME/applications/tether-<device8>-<package>.desktoptetherLauncher of a pinned phone app. <device8> is the first eight characters of the device id.
$XDG_DATA_HOME/icons/hicolor/128x128/apps/tether-<device8>-<package>.pngtetherIcon of a pinned phone app
$XDG_CACHE_HOME/tether/blobs/tetherdNotification icons, cover art and app icons, named by their SHA-256
$XDG_CACHE_HOME/tether/devices/<device id>/thumbs/tetherdGallery thumbnails
$XDG_CACHE_HOME/tether/devices/<device id>/media/tetherdOriginals fetched with Open or tether-cli fetch
$XDG_CACHE_HOME/tether/devices/<device id>/attachments/tetherdFetched MMS attachments
$XDG_CACHE_HOME/tether/devices/<device id>/contacts/tetherdContact photos
$XDG_CACHE_HOME/tether/devices/<device id>/cameras.json (0.5.0)tetherdCamera list of the phone
~/Downloads/Tether/tetherdReceived files (see download_dir). A file whose name exists is saved as name (2).ext.
$XDG_RUNTIME_DIR/tether-echo-cancel.conftetherdTemporary PipeWire configuration of the echo canceller during a call

With adb_server = "shared" the daemon uses your own adb key in ~/.android/ and writes nothing to $XDG_DATA_HOME/tether/adb/.

Logs

Tetheron writes no log files. tetherd and tether log to standard error. When the daemon runs as the systemd user unit, the journal collects its output:

journalctl --user -u tetherd

The level is set with RUST_LOG (Command-line tools).

Files installed by the package

PathContent
/usr/bin/tetherd, /usr/bin/tether, /usr/bin/tether-cliThe three programs
/usr/lib/systemd/user/tetherd.servicesystemd user unit
/usr/share/dbus-1/services/org.tether.Daemon.serviceD-Bus activation file
/etc/ufw/applications.d/tetherufw application profile Tether (configuration file)
/usr/share/applications/org.tether.Tether.desktopDesktop entry of the app
/usr/share/icons/hicolor/scalable/apps/org.tether.Tether.svgApp icon
/usr/share/metainfo/org.tether.Tether.metainfo.xmlAppStream metadata
/usr/share/doc/tether/wireplumber/Optional WirePlumber configuration for call audio (51-tether.lua, 51-tether.conf, README.md). Never installed into a configuration directory.
/usr/libexec/tether/tether-webcam-setup (0.5.0)Script that creates the virtual camera; run as root through pkexec
/usr/share/polkit-1/actions/org.tether.webcam-setup.policy (0.5.0)polkit action org.tether.webcam-setup for that script; asks for an administrator password every time

Files installed by the tarball

The install script of the tarball (0.5.0) installs the same files under /usr/local, or under the directory given with --prefix. In the unit and in the D-Bus activation file it replaces /usr/bin/tetherd with the daemon’s installed path.

PathContent
/usr/local/bin/tetherd, tether, tether-cliThe three programs
/usr/local/bin/tether-uninstallA copy of the install script. Run as root, it removes the files in this table.
/usr/local/lib/systemd/user/tetherd.servicesystemd user unit
/usr/local/share/dbus-1/services/org.tether.Daemon.serviceD-Bus activation file
/usr/local/share/applications/, icons/, metainfo/Desktop entry, app icon and AppStream metadata, under the names the package uses
/usr/local/share/doc/tether/LICENSE, NOTICE and the optional WirePlumber configuration
/usr/libexec/tether/tether-webcam-setupScript that creates the virtual camera. Always at this path, which the daemon expects. Not installed when /usr is read-only.
/usr/share/polkit-1/actions/org.tether.webcam-setup.policypolkit action for that script. Always at this path, where polkit reads actions.
/etc/ufw/applications.d/tetherufw application profile Tether. Installed only when that directory exists.

Files written by the virtual camera set-up (0.5.0)

tether-cli webcam-setup persist and the Create it at every start choice in the app write two files as root. webcam-setup remove deletes them.

PathContent
/etc/modprobe.d/tether-webcam.confOptions of the v4l2loopback module: one device labelled Tether Phone Camera
/etc/modules-load.d/tether-webcam.confLoads v4l2loopback at boot

The set-up picks the first free device number from /dev/video42 to /dev/video63.

Service

systemd user unit

tetherd.service is a systemd user unit. The package and the tarball’s install script enable it for all users, so the daemon starts with each user’s session.

PropertyValue
Typedbus, bus name org.tether.Daemon
Command/usr/bin/tetherd (package), /usr/local/bin/tetherd (tarball)
StartWantedBy=default.target, After=graphical-session.target
StopWith the graphical session (PartOf=graphical-session.target)
Restarton-failure, after 2 s
EnvironmentRUST_LOG=info
HardeningNoNewPrivileges=yes

D-Bus

ItemValue
BusSession bus
Service name of the daemonorg.tether.Daemon
Object of the daemon/org/tether/Daemon, interface org.tether.Daemon1
Object of a device/org/tether/Devices/<device id>, interface org.tether.Device1
Activation file/usr/share/dbus-1/services/org.tether.Daemon.service
Application id of the apporg.tether.Tether (org.tether.Tether.Mock with --mock)

The activation file names SystemdService=tetherd.service: the first D-Bus call to org.tether.Daemon starts the user unit when it is not running. The interfaces are described in D-Bus API.

Network

Ports

PortProtocolDirectionUse
7360TCPin and outTLS 1.3 connection between desktop and phone. Both sides listen and both sides dial. Bulk transfers open further connections to the same port.
7360UDPin and outDiscovery beacon: a broadcast every 5 s while discoverable is on (every second during a search), and the listener for the phone’s beacons
5353UDPin and outmDNS through the Avahi daemon: service type _tether._tcp; for the enhanced tier also the phone’s _adb-tls-pairing._tcp and _adb-tls-connect._tcp
5038TCPloopback onlyPrivate adb server of the daemon (adb_server_port)
5037TCPloopback onlyYour own adb server; used for USB and with adb_server = "shared"
chosen by the phoneTCPoutWireless debugging: pairing port and connection port of the phone. The connection port changes whenever Wireless debugging is switched on.
chosen by the systemTCPloopback onlyListener that the shell helper reaches through adb reverse

The port key changes both 7360 entries on the desktop. The Android app always uses 7360. The connection, discovery and pairing are specified in Wire protocol.

Firewall profile

The package installs the ufw application profile Tether. The tarball’s install script installs it when ufw is present:

[Tether]
title=Tether
description=Tether phone link: TLS control connection and discovery beacon. mDNS (5353/udp) is covered by the Avahi/mDNS profile.
ports=7360/tcp|7360/udp

Neither changes firewall rules. The profile takes effect when you allow it:

sudo ufw allow Tether

Data of the Android app

ItemLocationContent
Identity keyAndroid Keystore, alias tether-identityEC P-256 key pair and self-signed certificate of the phone. The private key does not leave the keystore.
Paired desktopsfiles/trusted_desktops.jsonPaired desktops with their certificates
SettingsPreferences DataStore tether_settingsSee the table below
Icon cachefiles/icons/Icons already sent to desktops
Temporary filescache/mms/, cache/outgoing-mms/, cache/outgoing/MMS being sent and files shared to a desktop
Received filesDownload/Tether/ on shared storageFiles sent from a desktop

All items except the received files are in the app’s private storage and are removed when the app is uninstalled. The app excludes its data from Android backups (allowBackup="false").

Settings of the Android app

KeyDefaultEffect
device_namethe phone’s nameName the phone announces
run_on_bootonStart the background service when the phone starts
sync_notificationsonSend notifications to desktops
include_ongoingoffAlso send ongoing notifications
blocked_packagesemptyApps whose notifications are not sent
sync_messagesonAnnounce and serve messages
sync_contactsonAnnounce and serve contacts
sync_mediaonAnnounce and serve media sessions
sync_photosonAnnounce and serve the gallery
auto_accept_filesonSave files from paired desktops without asking
clipboard_enabledonLet desktops set the clipboard and send clipboard changes
sync_callsonAnnounce and serve calls
sync_call_logonAnnounce and serve the call log
bluetooth_enabledonReport Bluetooth pairing and hands-free state

The app also stores onboarding_done and recent_packages (apps that posted notifications recently) for its own screens.