ADR-0008: Distribution: sideload + own F-Droid repo; .deb first, Flatpak later
- Status: accepted (amended twice on 2026-12-04)
- Date: 2026-11-08
- Deciders: maintainer
- Tags:
packaging,android,linux,release
Context
Android. Tether needs permissions and behaviours that Google Play policy
either forbids for a non-default-handler app or gates behind a declaration
review: READ_SMS/RECEIVE_SMS/SEND_SMS and READ_CALL_LOG outside the
default-handler role (Phone Link is allowed as an OEM/partner exception),
MANAGE_EXTERNAL_STORAGE for the file explorer and photo deletion,
QUERY_ALL_PACKAGES for the app list and icons, REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,
and a second entry point designed to be run as shell (ADR-0007). Play would
also force Play App Signing and a developer account. Sideloading is the only
honest route and it is what the project’s target users already do.
F-Droid’s main repository is attractive (reproducible builds, trust) but has lead times of days to weeks per release and strict dependency rules; we use only FOSS dependencies (Wire, CameraX, ZXing, kotlinx, Compose) so inclusion is possible later, but it must not gate releases. The F-Droid client supports third-party repositories added by URL or QR, with signed indexes and automatic updates, which gives us an update channel without a store.
Linux. The target is the Debian/Ubuntu family (Mint 22.2 = Ubuntu 24.04 base:
GTK 4.14, libadwaita 1.5; Debian 13 has newer). A .deb is what those users
install, and it is the only format that can ship a systemd user unit, a D-Bus
activation file, a ufw application profile and a dependency on the distro’s
avahi-daemon and adb without the user configuring anything. cargo-deb
builds it from Cargo metadata with no debian/ boilerplate.
Flatpak is the right long-term format for the GTK app, but the daemon is awkward
in a sandbox today: it must own a session bus name, talk to Avahi and BlueZ,
spawn adb, mount FUSE in M5, and be started by systemd/D-Bus activation outside
the portal model. Doing that well is a milestone of its own (M5). Snap is disabled
on Mint by default; AppImage cannot install unit/D-Bus files.
A Launchpad PPA requires source packages built on Launchpad, i.e. vendoring every
crate and a debian/rules that drives Cargo offline, which is substantial
maintenance for no user-visible gain over a self-hosted apt repository of binary
.debs served over HTTPS with our own signing key.
Decision
- Android: release APKs are sideloaded. They are attached to GitHub
Releases and published in a Tether-run F-Droid repository (
fdroidserver, signed index, repo URL and QR in the README). Never Google Play. Submission to F-Droid’s main repository is welcome later but not a release gate. APKs are signed with a project key whose certificate fingerprint is published so users can verify. - Linux: one Debian package
tetherbuilt bycargo-debfrom thetetherdcrate’s metadata, containingtetherd,tether,tether-cli,tetherd.service(user unit),org.tether.Daemon.service(D-Bus activation), theufwapplication profile, desktop entry, icon and AppStream metainfo.Depends: libgtk-4-1, libadwaita-1-0, avahi-daemon, adb(+$autoshared libs);Recommends: ufw. Published via GitHub Releases and a self-hosted apt repository (repreprooraptly, seedesktop/packaging/README.md). Supported: Ubuntu 24.04+ and derivatives, Debian 13+. - Flatpak for the GTK app (and, if feasible, the daemon) in M5; a PPA only if a contributor wants to maintain it. No Snap, no AppImage.
- Versions: one
vX.Y.Ztag produces both the APK and the.deb; the protocol version is independent (ADR-0002).
Consequences
Positive
- No store policy can block a feature; releases are as fast as CI.
- The
.debintegrates with the system exactly as a distro package would (unit, D-Bus, firewall profile, dependencies) and can be removed cleanly. - The F-Droid repo gives Android users automatic updates with a FOSS client.
Negative / risks
- Sideloading means users must allow “Install unknown apps” and, on Android 13+,
“Allow restricted settings” for notification access. Mitigation:
docs/how-to/set-up-android-permissions.mdand in-app detection of those states. - We hold the APK signing key and the apt/F-Droid repo keys; losing them means a new app identity. Mitigation: offline backup, documented in the release runbook (M6).
- Only Debian-family Linux is supported in M1; Fedora/Arch users must build from source until Flatpak (M5). Accepted per the project’s target.
cargo-debcannot express everythingdhcan (e.g. user-unit enablement), so we ship hand-writtenpostinst/prerm. Mitigation: scripts are minimal, idempotent and never fail the install.
Alternatives considered
- Google Play: policy-incompatible permissions and shell entry point. Rejected.
- F-Droid main repo only: release latency and no control over timing. Rejected as the sole channel; welcome as an addition.
- Flatpak first: daemon/systemd/Avahi/BlueZ/adb/FUSE integration is not sandbox-friendly yet. Deferred to M5.
- Launchpad PPA: source-build requirement and crate vendoring maintenance. Deferred unless a maintainer appears.
- Snap / AppImage: unit and D-Bus activation files cannot be installed; Snap is off by default on Mint. Rejected.
- Separate
tetherd,tether-gtk,tether-clipackages: more correct for a distro, but every user wants all three andcargo-debbuilds one package per crate; a split can happen when a distro packager asks for it.
Amendment (2026-12-04): GitHub releases only, for now
The project does not run an F-Droid repository or an apt repository, and neither is planned for the next releases. Both were part of this decision and neither was built.
- Android: the signed APK is attached to GitHub releases of
tetheron/tetheron. Installing it from the desktop withadb installis the recommended route, since the desktop package depends onadband the same USB debugging set-up serves the enhanced tier. Still never Google Play. - Linux: the
.debis attached to the same GitHub release. Flatpak remains planned.
Running our own repositories means keeping signing keys and an index online and current for every release. That is not worth it for a project of this size yet; the question can be reopened when there are users asking for automatic updates.
Amendment (2026-12-04): a tarball with an install script for other distributions
The decision left Fedora and Arch users to build from source until the Flatpak. Building needs the Rust toolchain and the development headers, and it leaves the unit, the D-Bus activation file, the polkit action and the desktop entry for the user to place by hand.
- Linux: each release also carries
tether-<version>-linux-x86_64.tar.gz: the three release programs that go into the.deb, the same data files, andinstall.sh(desktop/packaging/build-tarball.sh,desktop/packaging/tarball/). - The script installs under
/usr/local, enables the user unit globally and installs a copy of itself astether-uninstall. It checks dependencies and prints thednforpacmancommand. It does not run a package manager. - The
.debstays the supported form for the Debian family. The tarball is offered for Fedora 40 and newer and for Arch Linux, untested by the project at the time of writing.
Considered and not chosen:
- An RPM and a PKGBUILD. They would declare dependencies and remove cleanly through the package manager. Each needs a build and a test environment the project does not have, and an RPM is tied to a Fedora release. A tarball covers both families with one artefact. Either can be added when someone maintains it.
- Installing dependencies from the script. A script run as root that
calls
dnforpacmanwith a list that may be out of date is harder to trust and to debug than a command the user reads and runs. - Static or bundled libraries. GTK and GStreamer have to match the desktop’s own. The tarball links to the system’s libraries and requires versions at least as new as those of the build machine (Ubuntu 24.04: glibc 2.39, GTK 4.14, libadwaita 1.5).
Consequences: files under /usr/local are not tracked by a package manager,
so updates and removal go through the script. The webcam helper and the
polkit action must still go to /usr, because the daemon and polkit look
there. On systems with a read-only /usr they are not installed and the
virtual camera cannot be created. The app’s and the daemon’s hints for
missing packages have to know three sets of package names; they take them
from the crate tether-distro, which reads /etc/os-release.