Tetheron roadmap
The project was called Tether when this plan was written (November 2026) and the text below keeps that name. It began as an analogue of Microsoft Phone Link for Linux; the scope has since grown beyond that. Status sections under each milestone say what has shipped.
Context
Goal: a fully functional, clean-room analogue of Microsoft Phone Link (Windows) + Link to Windows (Android) for consumer Debian/Ubuntu-family desktops, with the highest achievable feature parity. Two products: Tether for Android (Kotlin/Compose) and Tether for Linux (Rust daemon + GTK4/libadwaita app + CLI). Clean room = reproduce publicly observable behaviour only; no reverse engineering of Microsoft binaries/protocols. Open-source components are reused where licence-compatible (GPL-3.0-or-later project).
Research (three parallel agents, Nov 2026) and the Q&A below fixed the strategy. Summary of what the research established:
- Phone Link’s “best” tier (app streaming, mirroring, clipboard, drag-drop, hotspot) exists only where Link to Windows is a privileged OEM system app. The only route to that tier for us is shell uid via adb (scrcpy model). Everything else (notifications, SMS/MMS, BT calls, photos, files, media) is reachable from a normal app.
- Call audio is only possible over Bluetooth HFP with the PC as hands-free unit; PipeWire ≥1.0 handles audio, call control goes over our own channel via
TelecomManager. - KDE Connect’s protocol is a poor transport to inherit (LAN-only, 50 ports, UDP broadcast, TOFU TLS, 2025 CVEs); its plugin schemas are a good reference. Prior Linux attempts (Sefirah, Vortex, Linksy) validate the daemon + Kotlin shape but none is polished.
- CompanionDeviceManager association is required day one: it exempts our notification listener from Android 15 OTP redaction and grants background-run eligibility.
Decisions (ADRs to be written in docs/adr/)
| # | Decision | Choice |
|---|---|---|
| 0001 | Repo & stacks | Monorepo. Android: Kotlin 2.x + Jetpack Compose, minSdk 34, targetSdk 35. Linux: Rust (tokio, rustls, prost, zbus, gtk4-rs/libadwaita). Shared .proto schemas. |
| 0002 | Wire protocol | Greenfield. TLS 1.3 over TCP, fixed port 7360; u32-BE length-prefixed protobuf Envelope; control connection + on-demand secondary TLS connections for bulk streams (icons, files, later video/audio). Relay-agnostic: a connection is any byte stream carrying the same TLS session. QUIC deferred. |
| 0003 | Identity & pairing | Self-signed ECDSA P-256 certs (Android: AndroidKeyStore hardware-backed; Linux: rcgen key file 0600). Device id = SHA-256(SPKI) hex. Pinning after pairing. Pairing = nonce exchange + 6-digit SAS from SHA-256(fpA‖fpB‖nonceA‖nonceB), confirmed on both sides; or QR (desktop shows tether://pair?... with address + one-time secret, phone proves HMAC). |
| 0004 | Discovery | mDNS _tether._tcp (Linux via Avahi D-Bus, Android via NsdManager) + UDP beacon on 7360 fallback + manual IP + QR. Both sides listen; connection dedupe by lower device id. |
| 0005 | Android background | Foreground service type connectedDevice (prerequisite CHANGE_WIFI_MULTICAST_STATE), self-managed CDM association after pairing, battery-optimisation exemption requested in onboarding, Samsung “never sleeping apps” guidance. No wake locks except during transfers. |
| 0006 | Linux process model | tetherd (systemd user service, owns transport, exposes D-Bus org.tether.Daemon), tether (GTK4/libadwaita app, D-Bus client), tether-cli. Desktop notifications via org.freedesktop.Notifications; tray via StatusNotifierItem. |
| 0007 | Privilege tiers | Normal tier (no adb) and Enhanced tier (shell helper launched by desktop over adb; our APK’s dex doubles as the app_process server). Enhanced unlocks mirroring, app streaming, clipboard read, permission auto-grants, OTP notifications, phone audio. Every feature declares its tier. |
| 0008 | Distribution | Android: APK on GitHub releases, never Play. Linux: .deb on GitHub releases first, Flatpak later (amended 2026-12-04; no F-Droid or apt repository for now; a tarball with an install script for Fedora, Arch and others). |
| 0009 | Licence | GPL-3.0-or-later for everything. |
| 0010 | Reachability | LAN first; transport path-agnostic; self-hostable relay in a later milestone. |
| 0011 | SMS | Non-default SMS app (read/send/receive; no mark-read/delete), like Phone Link. |
| 0012 | Disconnect | Disconnect{hold_seconds} frame; both sides hold auto-reconnect until the user acts or the peer dials in. |
| 0013 | Desktop data layer (M2) | SQLite cache per device inside tetherd, paged D-Bus getters + change signals, MPRIS player per phone, clipboard set by the GTK app (Wayland best-effort). |
| 0015 | Calls | Control/call log over Tether; audio via PipeWire native HFP HF (BlueZ pairing + PipeWire links); fallback audio on phone. |
| 0014 | Bulk streams | One secondary TLS connection per stream: StreamOpen header + raw bytes; 10 s out-of-order window; 4 concurrent per peer. |
User answers that drove these: greenfield protocol; adb-only mirroring; LAN-first relay-ready; full calls in v1; sideload-only; Rust+GTK4; .deb; GPL-3; Samsung One UI test phone (Xiaomi later); Cinnamon X11 now, GNOME Wayland preferred going forward; Milestone 1 = pairing + notifications + battery; name Tether; opportunistic shell helper; minSdk 34; solo, aggressive full-time pace, heavy parallel subagents, ADRs, finish M1 this session.
Local environment (verified)
Linux Mint 22.2 (Ubuntu 24.04 base), X11 Cinnamon, GNOME Wayland session available. Installed: adb 35 (adb pair capable), kdeconnectd running (different ports, no clash), PipeWire 1.0.5 with bluez5 SPA + mSBC/LC3 codecs, BlueZ 5.72, avahi active, GTK 4.14.5, libadwaita 1.5 dev available via apt, GStreamer 1.24 (gtk4paintablesink not packaged: use the gst-plugin-gtk4 Rust crate statically), Rust 1.93, OpenJDK 21, Node 24. Missing: Android SDK/cmdline-tools, Gradle (wrapper will fetch), protobuf-compiler, libgtk-4-dev/libadwaita-1-dev headers, pkg-config-visible libei (not needed for M1). No phone attached yet.
Samsung caveat (from research): Wireless Debugging toggle resets after reboot and One UI 6+ “Auto Blocker” blocks adb; both must be covered by Enhanced-tier onboarding (M4), not M1.
Repository layout
linux-phonelink/ (git init here; name "Tether")
LICENSE (GPL-3.0-or-later) README.md CONTRIBUTING.md
docs/adr/0001-...0011-*.md docs/reference/protocol.md docs/reference/feature-parity.md
proto/tether/v1/*.proto # single source of truth
desktop/ # Cargo workspace
Cargo.toml
crates/tether-proto # prost codegen from ../../proto
crates/tether-core # identity, tls, framing, pairing, discovery, session, capability registry, plugin trait
crates/tetherd # daemon: D-Bus service, config, plugins (battery, notifications, deviceinfo, ping)
crates/tether-gtk # libadwaita app
crates/tether-cli
packaging/debian/ # control, rules, tetherd.service (user), ufw profile, desktop file, icons
packaging/systemd/tetherd.service
android/ # Gradle (Kotlin DSL), single :app module for M1
app/src/main/java/org/tether/android/{core,transport,pairing,discovery,service,features/{battery,notifications},ui,onboarding}
app/src/main/proto -> ../../../../proto (Wire codegen)
.github/workflows/{desktop.yml,android.yml}
Protocol v1 (M1 subset, proto/tether/v1/)
Envelope { uint64 seq; oneof msg { Hello, Ping, Pong, PairRequest, PairResponse, PairConfirm, PairReject, DeviceInfo, Battery, NotificationPosted, NotificationRemoved, NotificationAction, NotificationDismiss, IconRequest, IconBlob, StreamOpen } }Hello { device_id, name, kind(DESKTOP|PHONE), protocol_version=1, capabilities[] }sent by both right after TLS. Unpaired peers may only exchange Hello/Pair*/Ping.PairRequest { nonce(32B), qr_proof? }→PairResponse { nonce }→ both compute SAS → user confirms →PairConfirm/PairReject. 60 s timeout.Battery { level, charging, low },DeviceInfo { model, manufacturer, os_version, phone_number? }.NotificationPosted { key, package, app_name, title, text, big_text, sub_text, when_ms, category, ongoing, clearable, silent, conversation, icon_hash, actions[ {index, title, remote_input, result_key} ], messages[ {sender, text, ts} ] };NotificationRemoved { key, reason };NotificationAction { key, index, reply_text? }(index −1 = content intent “open on phone”);NotificationDismiss { key }; icons by hash (IconRequest→IconBlob{hash, png}), LRU cache on desktop.- UDP beacon
Beacon { device_id, name, kind, tcp_port, protocol_version }broadcast every 5 s while discoverable. - mDNS TXT:
id,name,kind,pv.
Milestone 1 (this session): pairing + notifications + battery, end to end
Deliverable: install the .deb on this Mint box, sideload the APK on the Samsung, discover, pair by QR or SAS, phone notifications appear as desktop notifications with working actions/replies/dismiss sync, battery shown in app + tray, survives phone screen-off/Doze and Wi-Fi reconnect.
Work streams run in parallel by subagents after I lay down the proto + skeletons:
Stream A — Rust core + daemon (tether-core, tetherd, tether-cli)
- Identity: rcgen P-256 self-signed cert, id = SHA-256(SPKI); store under
$XDG_DATA_HOME/tether/. - TLS: rustls 0.23 server+client with custom verifier (accept any self-signed → record fp; enforce pinned fp for paired ids). Framing codec (length-prefixed prost). Session state machine: Connecting → Hello → Unpaired/Paired → Ready; ping every 15 s, drop at 45 s; exponential reconnect.
- Discovery: Avahi D-Bus publish+browse via zbus proxies (
org.freedesktop.Avahi.Server,EntryGroup,ServiceBrowser,ResolveService); UDP beacon send/listen; manual address list in config. - Pairing handler (SAS + QR secret), trusted-device store (TOML), D-Bus signals for UI.
- Plugins:
battery(state + low-battery desktop notification),notifications(map toorg.freedesktop.Notificationswithreplaces_id, actions, icon files from blob cache; desktop dismiss →NotificationDismiss; action click →NotificationAction; reply actions surface as “Reply” that asks UI to open reply box),deviceinfo. - D-Bus API
org.tether.Daemonat/org/tether/Daemon:Devices,StartDiscovery,AddManualAddress,RequestPair(id),ConfirmPair(id, accept),GetPairingSas(id),GeneratePairingQr(); per-device object/org/tether/Devices/<id>: propsName, Kind, Paired, Connected, Battery(level, charging),Unpair(),SendNotificationAction,DismissNotification, signalsNotificationPosted/Removed. tether-cli:devices,pair <id>,qr,unpair,notify-test,log.- Tests: codec round-trip, pairing SAS vectors (shared with Android test vectors), in-process two-endpoint handshake + pairing + notification flow.
Stream B — Android app
- Gradle project, Wire protobuf codegen from
proto/, Compose Material3, Hilt or manual DI (manual; avoid overengineering), kotlinx-coroutines, CameraX + ZXing for QR. - Identity in AndroidKeyStore (EC P-256, self-signed),
SSLContextwith KeyStore KeyManager + pinning TrustManager (same rules as desktop). Framing codec + session state machine mirroring Stream A. Shared SAS test vectors. - Discovery:
NsdManagerdiscover_tether._tcp+ register own service; UDP beacon listen/send with multicast lock; manual IP entry; QR scan. TetherServiceforeground service (connectedDevice), persistent low-priority notification,BOOT_COMPLETEDrestart,ConnectivityManager.NetworkCallbackfor reconnect,START_STICKY.- Features:
BatteryReporter(ACTION_BATTERY_CHANGED),NotificationListener(NotificationListenerService: posted/removed, filter ongoing/group-summary/media/own, per-app blacklist, icon PNG + hash cache, MessagingStyle extraction, actions + RemoteInput reply via PendingIntent,cancelNotificationon desktop dismiss, content intent open). - Onboarding (Compose): welcome → POST_NOTIFICATIONS → notification access (detect restricted-settings state, explain “Allow restricted settings”) → battery optimisation exemption → Samsung sleeping-apps tip → find PC (list/QR/manual) → SAS confirm → CDM self-managed
associate()→ done. Main screen: PC card (connected/paired, battery sent), notification sync toggle, per-app filter list, disconnect/unpair. - Unit tests for codec/pairing; instrumentation smoke test optional.
Stream C — GTK app, packaging, docs
tether-gtk: libadwaitaAdwApplicationWindowwith sidebar of devices; device page shows battery, connection, notification list (with inline reply entry, dismiss, open-on-phone); pairing dialog shows QR (qrcodecrate → cairo) + SAS; manual-address dialog; preferences (per-app notification toggles, notification display on/off). Tray viaksniStatusNotifierItem (battery % + menu).- Packaging:
cargo-debmetadata,tetherd.serviceuser unit (enabled viasystemctl --userin postinst viadeb-systemd-helper), ufw application profile for 7360/tcp+udp,.desktop+ icon, apt repo scripts stub. - ADRs 0001–0011,
docs/reference/protocol.md,docs/reference/feature-parity.md(Phone Link feature × Tether status × tier), README with install/onboarding. - CI workflows (cargo fmt/clippy/test; gradle assembleDebug).
Integration (me, after streams): build .deb, install, build APK, adb install once phone is on USB or wireless, run through onboarding on the Samsung, fix issues, tag v0.1.0.
Environment setup required at execution start (network downloads): sudo apt install libgtk-4-dev libadwaita-1-dev protobuf-compiler libdbus-1-dev pkg-config build-essential, cargo install cargo-deb, Android cmdline-tools + platforms;android-35 + build-tools into ~/Android/Sdk, Gradle wrapper fetch, Rust crates fetch. Confirm with user before sudo apt install.
Milestone 1 status (2026-11-08)
Built and verified end to end on Linux Mint 22.2 (Cinnamon/X11) + Galaxy A55 (Android 16, One UI 8.5):
- Discovery via UDP beacon and Avahi mDNS; manual address and QR URI generation.
- Mutual TLS 1.3 between rustls and Conscrypt with hardware-backed P-256 identity on the phone.
- SAS pairing (desktop-initiated, confirmed on both sides), trusted store persisted, reconnect after daemon restart in ~1 s.
- Notifications: Gmail, WhatsApp, SMS mirrored with icons; replies to WhatsApp and SMS from the desktop delivered; dismiss from desktop removes on phone and clears desktop list;
adb shell cmd notification posttest notifications arrive within ~2 s. - Battery level + charging state shown on desktop.
- Resilience: connection held and notifications delivered during forced Doze with screen off; reconnect within ~1 s after Wi-Fi off/on.
- .deb packaged; GTK app runs against the live daemon.
Field findings and fixes:
- AndroidKeyStore TLS signing requires
DIGEST_NONEon the key (Conscrypt signs CertificateVerify pre-hashed). Fixed with automatic key regeneration. - The TLS listener must run whenever the app is visible so a desktop can dial before anything is trusted. Fixed (service starts on app foreground).
REQUEST_COMPANION_SELF_MANAGEDissignature|privilegedon this build; self-managed CDM association is unavailable to sideloaded apps. Onboarding step now skips itself; see ADR 0005 amendment. Bluetooth-filter association planned for M3; OTP visibility moves to the enhanced tier (M4).- Unpairing while the peer was offline left the peer believing it was still paired; it reconnected every second and both UIs flickered. Fixed on both sides: restricted frames on an unpaired session are ignored and answered with one
Unpair, pendingUnpairnotices are delivered on next contact,Unpairis allowed on unpaired sessions, and the phone applies real backoff when a session dies right afterHello(docs/reference/protocol.md “Stale trust”). - GTK app showed stale device state (no Disconnect/Unpair buttons, no SAS) after the daemon restarted while the app was open: the app rebuilt its device objects but kept pages bound to the orphaned objects. Fixed (pages re-bind when the object instance changes).
- QR URI now carries only real LAN addresses (no docker/veth bridges) and compact percent-encoding.
Not yet verified: GNOME Wayland session, phone reboot autostart, low-battery alert (needs a real discharge), QR scan path end to end (SAS path used), .deb install via dpkg (daemon was run from the build tree).
Known bugs and pending verification at hand-off are tracked in docs/handoff.md
(“Known bugs / open UX issues” and “Pending verification”). The user chose to proceed to
Milestone 2 and fix the pair/unpair/disconnect issues alongside it.
Cross-session continuity
This plan file is the canonical roadmap. At the start of execution it is copied into the repo as docs/roadmap.md and kept in sync; each milestone closes with a roadmap update and an ADR for any decision that changed. Future sessions read docs/handoff.md first, then docs/roadmap.md, docs/adr/, and docs/reference/feature-parity.md. Every feature in the parity matrix records: Phone Link behaviour, Tether status (planned/partial/done), tier (normal/enhanced), milestone.
Milestone 2 — Messages & everyday sync (normal tier)
Deliverable: desktop Messages app at Phone Link parity (threads, SMS/MMS send/receive with attachments, contact names/photos, emoji/GIF-free but image attach), media controls, DND, find-my-phone, signal, clipboard, file send both ways, Photos gallery. No cap at 30 days / 2000 photos (configurable).
Protocol additions (proto/tether/v1/messages.proto, contacts.proto, media.proto, files.proto, photos.proto, misc.proto):
- Conversations:
ConversationsRequest{since_ms}→ConversationList{threads[{thread_id, addresses[], snippet, date_ms, unread, message_count, archived}]};MessagesRequest{thread_id, before_ms, limit}→Messages{thread_id, messages[]};MessageEvent{message}pushed on ContentObserver change;Message{id, thread_id, addresses[], body, date_ms, type INBOX|SENT|DRAFT|OUTBOX|FAILED|QUEUED, read, sub_id, attachments[{part_id, mime, size, thumb_hash}]};SendMessage{request_id, addresses[], body, sub_id, attachments[{name, mime, size}]}followed by oneStreamOpen{purpose=ATTACHMENT, request_id, index}per attachment;SendMessageResult{request_id, ok, error, message_id};AttachmentRequest{part_id}→ stream. - Contacts:
ContactsRequest{known[{uid, version_ts}]}→ContactsDelta{upserts[{uid, version_ts, vcard}], deleted[]}; photos as blobs by hash via existingIconRequest/IconBlobgeneralised toBlobRequest/Blob. - Media:
MediaSessions{sessions[{id, package, app_name, title, artist, album, art_hash, playing, position_ms, duration_ms, can_seek, can_next, can_prev}]},MediaCommand{session_id, PLAY|PAUSE|TOGGLE|NEXT|PREV|STOP|SEEK{pos_ms}},PhoneVolume{stream MUSIC|RING|CALL, level, max},SetPhoneVolume. - Misc:
DndState{filter ALL|PRIORITY|ALARMS|NONE},SetDnd;RingPhone{start};Connectivity{sims[{sub_id, carrier, network_type, level_0_4}], wifi_ssid, wifi_level};Clipboard{text | image_hash}both directions. - Files:
FileOffer{transfer_id, files[{name, size, mime, mtime_ms}]}→FileAccept{transfer_id, accepted, save_dir_hint}→ per fileStreamOpen{purpose=FILE, transfer_id, index};TransferProgress{transfer_id, bytes};TransferCancel;ShareText{text|url, open}. - Photos:
MediaQuery{kind IMAGE|VIDEO|SCREENSHOT|ALL, limit, before_ms, album}→MediaItems{items[{id, name, mime, date_ms, size, w, h, duration_ms, thumb_hash, album}]};ThumbnailRequest{id, max_px}→Blob;MediaFetch{id}→ stream;MediaDelete{ids[]}→MediaDeleteResult(Android 14:MediaStore.createDeleteRequestneeds on-phone confirm unlessMANAGE_EXTERNAL_STORAGE, which we hold as sideload).
Android work: permissions READ_SMS, SEND_SMS, RECEIVE_SMS, RECEIVE_MMS, RECEIVE_WAP_PUSH, READ_CONTACTS, READ_PHONE_STATE, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, MANAGE_EXTERNAL_STORAGE (opt-in step), ACCESS_NOTIFICATION_POLICY (DND, settings deep-link). SmsRepository over Telephony.Sms/Mms/Threads + ContentObserver; SmsManager.sendMultipartTextMessage, MMS via Klinker android-smsmms (Apache-2.0) or own PDU encoder + sendMultimediaMessage; sent/delivered PendingIntents → results. ContactsRepository (vCard export via ContactsContract + photo). MediaSessionManager.getActiveSessions (listener component). NotificationManager.setInterruptionFilter. RingPhone: play alarm-stream ringtone at max volume + vibrate, full-screen activity to stop. Connectivity via TelephonyManager per SIM + WifiManager. Clipboard: receive → ClipboardManager.setPrimaryClip; send → Quick Settings tile + share-sheet target + “Send clipboard” notification action. Share-sheet target activity (ACTION_SEND, ACTION_SEND_MULTIPLE) → FileOffer to chosen PC. MediaStore queries with thumbnails via ContentResolver.loadThumbnail. Received files → Downloads/Tether/.
Desktop work: SQLite cache (rusqlite) per device for threads/messages/contacts/media index; Messages view (thread list with avatars, conversation bubbles, attachment previews, composer with contact autocomplete, GTK EmojiChooser, attach files/recent phone photos, send progress/failure); Contacts cache + search; media widget on device page + MPRIS player org.mpris.MediaPlayer2.tether_<id> so desktop media keys and applets control phone playback; DND switch, Ring phone button, signal/SIM display in header; Photos grid (thumbnails lazy, infinite scroll, drag-out via GtkDragSource with on-demand fetch to temp, open with default app, save, delete with confirm, screenshots tab); Send files (file chooser, drop target on device page and tray menu), receive to ~/Downloads/Tether/ with notification + “Open folder”; clipboard sync (GTK clipboard watch when app/daemon has focus on Wayland, X11 via XFixes selection events in daemon) with per-direction toggles; D-Bus API extensions; Cinnamon/GNOME tray parity (AppIndicator fallback note in docs).
Verification: send/receive SMS and MMS with image both ways with real carrier; thread list matches phone’s Messages app; contact names + photos resolve; play/pause Spotify from desktop and via media keys; DND toggle reflects on phone; Ring phone rings even when silent; drag a photo from Photos grid to Nemo; delete a photo from desktop; send 3 files PC→phone via drop and phone→PC via share sheet; clipboard text PC→phone instant, phone→PC via tile.
Milestone 2 status (closed 2026-11-11, released as 0.2.0)
Released as v0.2.0 (CI-built .deb, signed APK). Tests: desktop 84 (core 18 unit + 24 integration incl. the pair/unpair/disconnect matrix, tetherd 16, GTK 26), Android 55 unit tests; clippy (stable 1.99), fmt and lint clean.
Verified on the Galaxy A55: pairing survives app upgrades; all 18 capabilities negotiated; full thread/message sync (57/57 threads) with live updates for sent and received SMS; SMS send and receive on a real carrier; 447 contacts with photos; photo index, thumbnails, fetch and delete without a phone prompt (all-files access); volumes, DND state, SIM/connectivity; clipboard synced automatically both ways (phone side via the one-time adb grants, ADR-0013 amendment); 3 MB file desktop → phone byte-identical; Disconnect hold on both sides and Connect resume (ADR-0012); GTK app against the real daemon.
Changes during M2 testing: the phone observed only content://mms-sms/, which the platform does not notify for SMS changes, so live updates never fired (now observes content://sms and content://mms too); clipboard became automatic in both directions instead of “send” buttons; photo delete falls back to removing the file when the provider refuses.
Carried over to M3 verification: MMS send on a carrier, media sessions/MPRIS with a playing phone, Ring, phone → desktop files via the share sheet, drag-out to Nemo, GNOME Wayland session, desktop notifications for messages and files. Deferred: DND-aware delivery and quiet hours, per-app badges, wallpaper header. Checklist: docs/contributing/checklists/milestone-2.md.
Milestone 3 — Calls (normal tier + Bluetooth)
Deliverable: incoming-call banner with answer/decline, dialer with contact search, 90-day+ call log, in-call window (mute, hangup, transfer to phone), audio over Bluetooth HFP with PC as hands-free unit, media auto-pause, ringtone on PC.
Protocol: CallState{calls[{id, number, display_name, photo_hash, state RINGING|DIALING|ACTIVE|HOLDING|ENDED, direction, start_ms}]}; CallCommand{ANSWER|REJECT|HANGUP|DIAL{number}|MUTE{on}|ROUTE{BT|PHONE}}; CallLogRequest{since_ms} → CallLog{entries[{id, number, name, type INCOMING|OUTGOING|MISSED|REJECTED, date_ms, duration_s}]}; BtIdentity{mac, name} both ways for pairing automation.
Android: TelephonyCallback.CallStateListener + READ_CALL_LOG broadcast extras for number; TelecomManager.acceptRingingCall()/endCall() (ANSWER_PHONE_CALLS); dial via TelecomManager.placeCall (CALL_PHONE); mute via AudioManager.setMicrophoneMute; route via AudioManager.setCommunicationDevice(BT device) (API 31+) with fallback to automatic HFP routing; DTMF impossible for non-dialer apps → in-call keypad marked Enhanced-tier/unsupported (documented gap, Phone Link also lacks */# on Samsung); CallLog provider reads; contact photo lookup.
Desktop: BlueZ D-Bus (org.bluez.Adapter1/Device1/Agent1): guided pairing flow from protocol-exchanged MAC (start discovery, pair with passkey confirm shown on both, trust, connect HFP), auto-reconnect HFP when phone connects over Wi-Fi; PipeWire: detect HFP source/sink nodes (pw-dump/libpipewire or wpctl-equivalent via pipewire-rs), switch default sink/source during call, restore after; ringtone via GStreamer playbin on PC speakers; incoming-call banner (GTK window always-on-top + freedesktop notification with Answer/Decline actions); in-call window with timer, mute, hangup, transfer-to-phone (ROUTE PHONE + disconnect SCO); dialer with contact search/history; call log view; pause MPRIS players on RINGING, resume after; optional use of org.pipewire.Telephony when PipeWire ≥1.4 is detected (future distros).
Risks: HFP role negotiation (ensure PipeWire takes HF role, phone AG; disable hfp_ag role in WirePlumber config if conflicting), SCO/mSBC quality on specific adapters, Samsung audio routing to BT only when BT is “active for calls” (user guidance). Verification: call from another phone → banner within 1 s → answer on PC → two-way audio through PC → hangup on PC; outgoing dial from desktop; missed call appears in log and as notification; transfer to phone mid-call.
Milestone 3 status (released as 0.3.0 on 2026-11-15)
Built on all three stacks (contract 1910c34, Android 4470b82, desktop bbdbf4f, GTK c98c57f). Tests: desktop 131 passing, Android 84; clippy clean on stable 1.99. Verified on the A55: calls/calls.dial/calllog/bluetooth negotiated, call log synced with contact names, Bluetooth state reported. Pending a human: real incoming/outgoing calls (checklist docs/contributing/checklists/milestone-3.md K1–K7), Bluetooth pairing and HFP audio on the PC (B1–B6), the PipeWire profile name (audio-gateway vs headset-head-unit) on real hardware, One UI call-companion binding via telecom add-or-remove-call-companion-app.
Update 2026-11-15: call audio verified on the A55 with the laptop’s own speakers and microphone, both call directions (incoming and outgoing), two-way audio clear and without echo, switching This PC / Phone / Speaker from the in-call window. Three fixes got it there: the daemon recognises PipeWire’s stream-class HFP nodes and follows the graph during a call, the phone’s in-call service is bound through the app-op MANAGE_ONGOING_CALLS (the telecom add-or-remove-call-companion-app route has no effect on One UI 8.5), and the daemon runs a WebRTC echo canceller on the microphone path. Details and open items: docs/notes/2026-11-15-call-audio-spike.md, ADR-0015 amendment. Tests: desktop 134 passing, Android unit tests passing. Still open from the checklist: K4–K5 and B5 were not walked through formally, the grant after a phone reboot, GNOME Wayland.
Released as 0.3.0 on 2026-11-15 after a final test with the release .deb (audio switching and echo cancellation confirmed in the daemon log). Carried over as known issue: occasional static-like noises during PC calls, see the open items in the spike notes.
Milestone 4 — Enhanced tier via adb (mirroring, app streaming, audio, grants)
Deliverable: one-time “Enhanced setup” on phone (Developer options → Wireless Debugging; Samsung Auto Blocker off) + desktop-driven adb pair; thereafter desktop launches our shell helper whenever the phone is reachable and unlocks: whole-screen mirroring with input, per-app streaming windows, phone audio to PC, clipboard phone→PC, auto-grants (notification access, RECEIVE_SENSITIVE_NOTIFICATIONS, battery whitelist, MANAGE_EXTERNAL_STORAGE), screen-off-while-mirroring, phone as webcam.
Shell helper: new entry point org.tether.shell.Main inside the same APK, started with adb shell CLASSPATH=$(pm path org.tether.android) app_process / org.tether.shell.Main --token …; connects back to the daemon (via adb reverse or LAN TLS with one-time token) and speaks a Shell* message family. Uses reflection/AIDL stubs for IInputManager.injectInputEvent, DisplayManager/SurfaceControl virtual displays (trusted flags), MediaCodec surface encoding (H.264 default, H.265/AV1 option), AudioRecord with REMOTE_SUBMIX/playback capture + Opus, IClipboard read (shell package), appops/pm grant/cmd notification allow_listener/settings put/dumpsys deviceidle whitelist. Desktop restarts the helper on drop; detects Wireless Debugging reset after reboot and prompts; USB fallback (adb over cable) always available. Samsung Knox: document app_process quirks (configuration controller fix as in scrcpy).
Protocol: ShellHello{abilities[]}; MirrorStart{target MAIN|NEW_DISPLAY{w,h,dpi}, codec, bitrate, max_fps, max_size, screen_off, show_touches} → StreamOpen{purpose=VIDEO, mirror_id} carrying codec-config + framed access units with PTS; MirrorStop; InputEvent{touch{action, pointer_id, x, y, pressure} | key{action, keycode, meta} | scroll{x, y, hscroll, vscroll} | text{utf8}} targeted by display_id; AppListRequest → AppList{apps[{package, label, icon_hash, launchable}]}; StartApp{package, display_id}; AudioStart{source OUTPUT|PLAYBACK_DUP, codec OPUS} → stream; ClipboardRead → Clipboard; GrantRequest{items[]} → GrantResult; CameraStart{facing, size, fps} → video stream for webcam.
Desktop: adb integration (require distro adb ≥34; locate binary; adb mdns services or Avahi browse _adb-tls-pairing._tcp/_adb-tls-connect._tcp; pairing wizard where user types the 6-digit code shown by phone); mirror window with GStreamer pipeline appsrc ! h264parse ! (vah264dec|avdec_h264) ! gtk4paintablesink (statically linked gst-plugin-gtk4), input mapping (left=tap, right=back, middle=home, scroll, long-press, keyboard incl. text commit, clipboard paste), window resize → --flex-style display resize; App Streaming: launcher grid from AppList, one NEW_DISPLAY per app in its own GTK window, “Pin to desktop” writes .desktop launching tether app <pkg>; Phone audio toggle (GStreamer opusdec ! pipewiresink); Webcam: CameraStart → decode → v4l2sink to v4l2loopback device with module/DKMS detection and install guidance; Enhanced setup wizard in app + CLI tether enhance.
Verification: pair wirelessly once; reboot phone → desktop detects helper missing and guides; mirror at ≤100 ms perceived latency on LAN; type into a phone app from PC keyboard; open WhatsApp in a separate window via app streaming while phone screen stays off; phone audio plays through PC; OTP SMS notification visible on desktop on Android 15 after grant; clipboard copied on phone appears on PC without any phone interaction; webcam appears in a video call app.
Milestone 4 phasing and status (started 2026-11-15)
Research: docs/notes/m4-research-shell-helper.md, docs/notes/m4-research-desktop.md. Decisions: ADR-0016 (adb integration), ADR-0017 (shell helper), ADR-0018 (media pipeline). Contract: proto/tether/v1/enhance.proto, shell.proto, docs/reference/protocol.md “Enhanced tier”, docs/reference/dbus-api.md “Milestone 4 additions”.
Changes against the plan above: QR pairing first with the 6-digit code as fallback; private adb server; the helper token goes over stdin, not argv; main-display capture through DisplayManager.createVirtualDisplay only; RECEIVE_SENSITIVE_NOTIFICATIONS is an app-op, not a pm grant; the app list comes from the normal app; audio sink is pulsesink; grants include MANAGE_ONGOING_CALLS (M3) and WRITE_SECURE_SETTINGS (lets the app re-arm Wireless debugging after a reboot).
- M4.1 adb set-up (QR/code pairing, USB), device linking, helper lifecycle with probed abilities, auto-grants, clipboard through the helper, whole-screen mirroring with input, screen off, stay awake; Enhanced set-up wizard, mirror window,
tether-cli enhance/mirror. Status 2026-11-15: built on all three stacks on branchm4-enhanced. Verified on the A55 over USB: linking, helper with all five abilities, grants read-back, H.264 mirror stream into the mirror window’s decoder (nvh264dec), input events in the phone’s input queue, screen off and its restore after a killed helper, clipboard through the helper. Tests: desktop 200, Android 109. Not yet verified: Wireless debugging pairing by QR and by code, Wi-Fi reconnect after a port change, re-arm after a phone reboot, Auto Blocker, typing/paste/scroll into real apps, rotation, measured latency, Wayland, VA-API decoders. Update: Wireless debugging verified by the user on 2026-11-15 (QR pairing, mirroring over Wi-Fi) after the stale-port and re-arm fixes. - M4.2 (started 2026-11-15; contract in
shell.proto/enhance.proto,docs/reference/protocol.md“App streaming and phone audio”,docs/reference/dbus-api.md) app streaming (virtual display per app, launcher grid, pin to desktop), phone audio on the PC. Status 2026-11-15: built on all three stacks. Verified on the A55: ten helper abilities, the app list (through the daemon), an app in its own window (Calculator on a virtual display, decoded in the app window), several mirrors at once, resize,app_closed, typing into app displays, all three audio sources at the helper level (Opus decodes, real audio). Tests: desktop 234, Android unit tests passing. Not yet verified: phone audio played through the daemon on the PC, the Apps tab and pinning against the real phone,StartAppon the main display, an app already open on the phone’s own screen, landscape-only apps, Wayland window class. Open contract gaps: no “keep the app on the phone when the window closes” option;Mirrors[].display_idis always 0. M4.1 and M4.2 released as 0.4.0 on 2026-11-16, with the unverified M4.2 items listed in the release notes and indocs/notes/2026-11-15-m4-session-notes.md. - M4.3 (started 2026-11-28; ADR-0019; contract in
shell.proto“Camera”,docs/reference/protocol.md“Phone as webcam”,docs/reference/dbus-api.md“M4.3 members”) phone as webcam: camera capture in the shell helper, daemon-owned pipeline into a v4l2loopback device, guided module set-up through polkit, webcam controls in the app andtether-cli webcam. Changes against the plan above: the camera stream goes to the daemon on its own helper connection, not throughStreamOpen; orientation is a user setting applied on the desktop; no normal-tier (foreground service) camera and no PipeWire camera node in this phase. Status 2026-11-28: built on all three stacks on branchm4.3-webcam. Verified on the A55 (now Android 17, sdk 37) through a debug daemon over USB: abilitycamera, four cameras listed,Webcamon tostreaming(camera 0, 1280 x 720 at 30 fps,nvh264dec), frames read back from/dev/video42as YUYV 1280 x 720, switch to the front camera and rotation while a reader held the device, switch off releases the camera on the phone. At helper level: start to first key frame 0.84 to 1.47 s, bitrate/torch/zoom/key-frame changes,busy,camera_disconnectedwhen another client opens the camera, release after a killed helper. Tests: desktop workspace passing (tetherd105,tether-gtk124), Android 128. Not yet verified:SetUpWebcamthroughpkexecfrom the installed service (the unit hasNoNewPrivileges, so the daemon goes throughsystemd-run --user),persist/remove, the camera in a real call app or browser, the GTK webcam group and set-up dialog against the real daemon, the picture itself (tests only counted frames and luma statistics), phone locked or screen off, the camera privacy switch (camera_disabled), Wi-Fi transport, Wayland. Found on the way:v4l2sinkneeds the device’s own colorimetry in the caps (the daemon queries the sink pad); v4l2loopback 0.12.7 has nov4l2loopback-ctl add, so a module that is already loaded without our device cannot be extended (0.13+ only). Update 2026-11-28, checked by the user with the debug build: the “Webcam” group in the app, the camera listed and working in a call app, and the webcam over Wireless debugging with the cable unplugged (after pairing again; the pairing from 2026-11-15 had stopped working, probably through the phone’s update to Android 17). Still not verified:SetUpWebcamthroughpkexecfrom the installed service,persist/remove, phone locked or screen off, the camera privacy switch, Wayland, measured latency.
Milestone 5 — Files, phone-side controls, resume, relay, Flatpak, iOS spike
- Files in file manager:
FileOpsprotocol (ListDir, Stat, Read{off,len}, Write, Mkdir, Rename, Delete, Trash), phone side overjava.io.FilewithMANAGE_EXTERNAL_STORAGE(SAF fallback if denied), desktop FUSE filesystem viafusermounted at~/Tether/<phone>with Nemo/Nautilus sidebar bookmark, 30-day trash folder semantics like Phone Link, thumbnails viaThumbnailRequest. - Phone-side PC controls:
PcState{battery, network, locked}to phone;PcCommand{LOCK | SEND_CLIPBOARD | OPEN_URL}(lock viaorg.freedesktop.ScreenSaver/loginctl lock-session); phone UI gets PC card, send files, clipboard history, start mirroring from phone. - Cross-device resume: phone “Continue on PC” share target + browser URL hand-off → desktop opens URL/app mapping (Spotify URI → spotify, WhatsApp → web.whatsapp.com); desktop → phone “Open on phone” for URLs. Documented as partial parity (no OEM task-continuity API).
- Instant hotspot: spike only. Normal apps cannot start tethering; shell
cmd wifi start-softap/svcpaths tested on Samsung; if impossible, fall back to “turn on hotspot” deep link + saved Wi-Fi credentials push to PC via NetworkManager. Decision recorded in ADR. - Relay (reachability phase 2):
tether-relaycrate: devices authenticate with their identity key, rendezvous by paired-id, relay forwards opaque TLS bytes (end-to-end encryption preserved, relay cannot read); phone keeps the FGS socket to the relay with adaptive keepalive (no FCM, no Play dependency); desktop always connected; UDP hole-punch optional later; Docker image + docs for self-hosting; optional hosted default configurable in both apps; sameEnvelopeprotocol, zero plugin changes. - Flatpak: manifest with
--share=network --socket=wayland --socket=fallback-x11 --socket=pulseaudio --allow=bluetooth --system-talk-name=org.bluez --talk-name=org.freedesktop.Notifications --talk-name=org.freedesktop.Avahi --device=all, bundledadb; document features degraded in sandbox. - Wayland/GNOME polish: GNOME Shell extension (indicator + quick settings toggle) consuming the daemon D-Bus API; KDE Plasma applet optional; portal RemoteDesktop for phone→PC remote input (reverse mousepad) optional.
- iOS spike: BlueZ ANCS (GATT client), obexd MAP/PBAP clients, HFP via PipeWire → decide whether “Tether for iPhone (basic)” ships; no iOS app.
Milestone 6 — Release hardening
Localization (gettext + Android string resources), accessibility (GTK a11y labels, TalkBack), opt-in diagnostics/log export, crash-free soak test (48 h connected), docs site, parity matrix complete, v1.0.0.
Verification (M1)
cargo testindesktop/(codec, pairing vectors, in-process handshake)../gradlew testinandroid/.- Install .deb:
systemctl --user status tetherdactive;tether-cli deviceslists nothing;tether-cli qrprints QR URI. - Sideload APK on Samsung (USB
adb installor copy). Onboarding grants notification access + battery exemption; CDM dialog appears and association is created. - Discovery: phone lists this PC within 5 s on same Wi-Fi; PC lists phone. Manual IP path tested with mDNS disabled.
- Pair via QR; unpair; pair via SAS (digits identical on both screens; mismatch test by rejecting).
- Notifications: send a Telegram/SMS/WhatsApp message to phone → desktop notification with icon within 1 s; click “Reply”, type, send → message delivered from phone; dismiss on desktop → gone on phone; dismiss on phone → desktop notification closes; “Open on phone” launches app on phone.
- Battery: unplug/plug charger → tray and app update; drop below 15 % → desktop low-battery alert.
- Resilience: phone screen off 15 min → still connected or reconnects within 10 s of screen-on; toggle phone Wi-Fi → reconnects; restart
tetherd→ phone reconnects; reboot phone → service auto-starts and reconnects. - GNOME Wayland session: log in, confirm notifications, tray fallback behaviour, app renders.
Later: finish the rename to Tetheron
Since December 2026 the project, its documentation and the app titles say
Tetheron. Everything a program or another device identifies us by still says
tether, so that existing installations and pairings keep working. Renaming
those is one coordinated, breaking release with a migration, not something to
do piecemeal:
- binaries and the package:
tether,tetherd,tether-cli, the.debname,tetherd.service, the ufw profileTether; - Rust crates
tether-*and theorg.tether.shell/org.tether.androidKotlin packages; - D-Bus names
org.tether.Daemon*, the app idorg.tether.Tether, icons and the desktop entry; - the Android application id
org.tether.android(a new id is a new app to Android: users reinstall and pair again); - paths (
~/.config/tether,~/.local/share/tether,~/Downloads/Tether), environment variablesTETHER_*, the mDNS service_tether._tcp, thetether://pairing URI and the virtual camera label “Tether Phone Camera”; - remaining user interface text and log tags that say Tether.