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
| Key | CLI key | Type | Default | Effect |
|---|---|---|---|---|
name | name | string | host name, or Linux | Name this desktop announces to phones. Must not be empty. |
discoverable | discoverable | boolean | true | Announce this desktop through mDNS and the UDP beacon. |
show_desktop_notifications | desktop-notifications | boolean | true | Show the phone’s notifications as desktop notifications. |
message_notifications | message-notifications | boolean | true | Show a desktop notification for a new incoming message. |
manual_addresses | array of strings | [] | host or host:port entries the daemon dials at start. tether-cli add appends to it. | |
port | integer | 7360 | TCP port of the listener and UDP port of the beacon. | |
download_dir | download-dir | string | "" | Directory for received files. Empty means ~/Downloads/Tether, or $XDG_DOWNLOAD_DIR/Tether when that variable is set. A leading ~/ is expanded. |
auto_accept_files | auto-accept-files | boolean | true | Accept files offered by paired devices without asking. |
clipboard_sync | clipboard-sync | string | "both" | Direction of clipboard sync: off, to_phone, from_phone or both. |
call_audio_on_pc | call-audio-on-pc | boolean | true | Move call audio to the desktop when a call connects and the Bluetooth hands-free link is up. |
call_echo_cancel | boolean | true | Run PipeWire’s echo canceller while call audio uses the desktop’s default speakers and microphone. | |
call_ringtone | call-ringtone | boolean | true | Play a ringtone on the desktop for incoming calls. |
pause_media_on_call | pause-media-on-call | boolean | true | Pause desktop media players (MPRIS) while a call rings or is in progress. |
adb_server | string | "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_port | integer | 5038 | Port of the private adb server. | |
adb_path | string | "" | 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_source | string | "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) | integer | 30 | Frame 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.
| Key | Type | Default | Effect |
|---|---|---|---|
blocked_packages | array of strings | [] | Android package names whose notifications are not shown on the desktop. Changed in the app’s per-app list. |
sync_messages | boolean | true | Sync SMS and MMS from this phone. |
sync_contacts | boolean | true | Sync contacts from this phone. |
sync_photos | boolean | true | Index this phone’s gallery. |
bt_address | string | "" | Bluetooth address of the phone. Written by the daemon after Bluetooth pairing. |
adb_serial | string | "" | Hardware serial of the adb device linked to this phone. Written by the enhanced set-up; empty means not set up. |
phone_audio | boolean | false | Play this phone’s audio on the desktop. The Play phone audio on this PC switch and tether-cli phone-audio. |
webcam (0.5.0) | boolean | false | Use 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) | integer | 0 | Clockwise rotation of the picture: 0, 90, 180 or 270. |
webcam_flip (0.5.0) | boolean | false | Mirror the picture horizontally. |
webcam_zoom (0.5.0) | float | 1.0 | Zoom 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.
| Key | Type | Default | Effect |
|---|---|---|---|
show_tray | boolean | true | Show a tray icon and keep the app running when the window is closed. |
window_width | integer | 900 | Width of the main window when it was last closed. |
window_height | integer | 640 | Height of the main window. |
window_maximized | boolean | false | Whether the main window was maximised. |
mirror_screen_off | boolean | false | Switch the phone’s own screen off when a mirror window opens. |
mirror_software_decoding | boolean | false | Do not use hardware video decoders in mirror windows. |
mirror_max_size | integer | 0 | Longest side of the mirrored phone screen in pixels. 0 means the phone’s own size. Does not apply to app windows. |
mirror_bitrate | integer | 0 | Video bitrate in bit/s. 0 means the phone’s default (8 Mbit/s). |
apps_show_system | boolean | false | Show preinstalled apps in the Apps tab. |
app_sizes | table | empty | Last window size of each phone app, by package name. Written by the app. |
app_recents | table | empty | Recently 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
| Path | Written by | Content |
|---|---|---|
$XDG_CONFIG_HOME/tether/config.toml | tetherd | Settings of the daemon |
$XDG_CONFIG_HOME/tether/gtk.toml | tether | Settings of the app |
$XDG_CONFIG_HOME/autostart/org.tether.Tether.desktop | tether | Autostart 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.key | tetherd | Private key of this desktop (PEM, mode 0600) |
$XDG_DATA_HOME/tether/identity.crt | tetherd | Certificate of this desktop (PEM). The device id is derived from it. |
$XDG_DATA_HOME/tether/trusted.toml | tetherd | Paired devices: id, name, kind, certificate, time of pairing (mode 0600) |
$XDG_DATA_HOME/tether/devices/<device id>/cache.db | tetherd | SQLite cache of one phone: threads, messages, attachments, contacts, gallery index, transfers, call log, app list |
$XDG_DATA_HOME/tether/adb/ | adb | Home directory of the private adb server; .android/ inside holds its key pair |
$XDG_DATA_HOME/applications/tether-<device8>-<package>.desktop | tether | Launcher 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>.png | tether | Icon of a pinned phone app |
$XDG_CACHE_HOME/tether/blobs/ | tetherd | Notification icons, cover art and app icons, named by their SHA-256 |
$XDG_CACHE_HOME/tether/devices/<device id>/thumbs/ | tetherd | Gallery thumbnails |
$XDG_CACHE_HOME/tether/devices/<device id>/media/ | tetherd | Originals fetched with Open or tether-cli fetch |
$XDG_CACHE_HOME/tether/devices/<device id>/attachments/ | tetherd | Fetched MMS attachments |
$XDG_CACHE_HOME/tether/devices/<device id>/contacts/ | tetherd | Contact photos |
$XDG_CACHE_HOME/tether/devices/<device id>/cameras.json (0.5.0) | tetherd | Camera list of the phone |
~/Downloads/Tether/ | tetherd | Received files (see download_dir). A file whose name exists is saved as name (2).ext. |
$XDG_RUNTIME_DIR/tether-echo-cancel.conf | tetherd | Temporary 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
| Path | Content |
|---|---|
/usr/bin/tetherd, /usr/bin/tether, /usr/bin/tether-cli | The three programs |
/usr/lib/systemd/user/tetherd.service | systemd user unit |
/usr/share/dbus-1/services/org.tether.Daemon.service | D-Bus activation file |
/etc/ufw/applications.d/tether | ufw application profile Tether (configuration file) |
/usr/share/applications/org.tether.Tether.desktop | Desktop entry of the app |
/usr/share/icons/hicolor/scalable/apps/org.tether.Tether.svg | App icon |
/usr/share/metainfo/org.tether.Tether.metainfo.xml | AppStream 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.
| Path | Content |
|---|---|
/usr/local/bin/tetherd, tether, tether-cli | The three programs |
/usr/local/bin/tether-uninstall | A copy of the install script. Run as root, it removes the files in this table. |
/usr/local/lib/systemd/user/tetherd.service | systemd user unit |
/usr/local/share/dbus-1/services/org.tether.Daemon.service | D-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-setup | Script 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.policy | polkit action for that script. Always at this path, where polkit reads actions. |
/etc/ufw/applications.d/tether | ufw 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.
| Path | Content |
|---|---|
/etc/modprobe.d/tether-webcam.conf | Options of the v4l2loopback module: one device labelled Tether Phone Camera |
/etc/modules-load.d/tether-webcam.conf | Loads 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.
| Property | Value |
|---|---|
| Type | dbus, bus name org.tether.Daemon |
| Command | /usr/bin/tetherd (package), /usr/local/bin/tetherd (tarball) |
| Start | WantedBy=default.target, After=graphical-session.target |
| Stop | With the graphical session (PartOf=graphical-session.target) |
| Restart | on-failure, after 2 s |
| Environment | RUST_LOG=info |
| Hardening | NoNewPrivileges=yes |
D-Bus
| Item | Value |
|---|---|
| Bus | Session bus |
| Service name of the daemon | org.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 app | org.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
| Port | Protocol | Direction | Use |
|---|---|---|---|
| 7360 | TCP | in and out | TLS 1.3 connection between desktop and phone. Both sides listen and both sides dial. Bulk transfers open further connections to the same port. |
| 7360 | UDP | in and out | Discovery beacon: a broadcast every 5 s while discoverable is on (every second during a search), and the listener for the phone’s beacons |
| 5353 | UDP | in and out | mDNS 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 |
| 5038 | TCP | loopback only | Private adb server of the daemon (adb_server_port) |
| 5037 | TCP | loopback only | Your own adb server; used for USB and with adb_server = "shared" |
| chosen by the phone | TCP | out | Wireless debugging: pairing port and connection port of the phone. The connection port changes whenever Wireless debugging is switched on. |
| chosen by the system | TCP | loopback only | Listener 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
| Item | Location | Content |
|---|---|---|
| Identity key | Android Keystore, alias tether-identity | EC P-256 key pair and self-signed certificate of the phone. The private key does not leave the keystore. |
| Paired desktops | files/trusted_desktops.json | Paired desktops with their certificates |
| Settings | Preferences DataStore tether_settings | See the table below |
| Icon cache | files/icons/ | Icons already sent to desktops |
| Temporary files | cache/mms/, cache/outgoing-mms/, cache/outgoing/ | MMS being sent and files shared to a desktop |
| Received files | Download/Tether/ on shared storage | Files 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
| Key | Default | Effect |
|---|---|---|
device_name | the phone’s name | Name the phone announces |
run_on_boot | on | Start the background service when the phone starts |
sync_notifications | on | Send notifications to desktops |
include_ongoing | off | Also send ongoing notifications |
blocked_packages | empty | Apps whose notifications are not sent |
sync_messages | on | Announce and serve messages |
sync_contacts | on | Announce and serve contacts |
sync_media | on | Announce and serve media sessions |
sync_photos | on | Announce and serve the gallery |
auto_accept_files | on | Save files from paired desktops without asking |
clipboard_enabled | on | Let desktops set the clipboard and send clipboard changes |
sync_calls | on | Announce and serve calls |
sync_call_log | on | Announce and serve the call log |
bluetooth_enabled | on | Report Bluetooth pairing and hands-free state |
The app also stores onboarding_done and recent_packages (apps that
posted notifications recently) for its own screens.