SyncThing Android fork: SyncThing as messaging app

https://github.com/fmorea/syncthing

EtherMesh is a feature-rich Android application that transforms peer-to-peer file synchronization into a powerful decentralized communication platform. Built upon the robust Syncthing engine, EtherMesh introduces the LinkThing framework, enabling serverless, peer-to-peer applications through a unique “Everything is a File” philosophy.

:test_tube: The “LinkThing” Protocol

EtherMesh turns synchronization into a distributed database and message bus. Inspired by the Unix philosophy, the LinkThing protocol operates on the principle that “Everything is a File.”

Instead of relying on real-time sockets or centralized servers, EtherMesh uses an eventual consistency model to sync application state via carefully structured files in a dedicated synchronization folder.

:scroll: File-Based Gossip

EtherMesh uses a naming convention for files to manage state without a central database:

  • Messages: {unix_timestamp}_{device_id}.msg (Text content stored inside).

  • Replies: {unix_timestamp}_{device_id}_{reply_timestamp}_{reply_device_id}.msg.

  • Acknowledgments: {timestamp}_{sender_id}_{receiver_id}.ack (Used for delivery and read receipts).

  • Network Topology: {node_a}_{node_b}.net (Used for “Beacons” to discover and map the decentralized mesh).

:speech_balloon: Decentralized Chat

A full-featured P2P chat is built directly into EtherMesh:

  • Serverless: Messages are gossiped across the mesh.

  • Rich Media: Supports attachments (images/files) and audio recordings.

  • Reliable: Acknowledgments (.ack files) ensure you know when a peer has received your message.

  • Event-Driven: Uses FileObserver for near-instant updates as soon as the underlying engine delivers a new file.

:chess_pawn: Demo: Decentralized Chess

Included in the app is a proof-of-concept Chess game:

  • Global State Sync: Uses a .chess state file to maintain board state across peers.

  • State-Sync Transport: Optimized with non-blocking I/O to handle concurrent file updates.

  • Offline-First: Make your move while offline; it will automatically sync to your opponent whenever you are both back online.

:hammer_and_wrench: Technical Details

  • Native Core: Bundles the official Syncthing Go binary (v1.x+) compiled for Android architectures.

  • LinkThing Transport: Implemented via LinkThingRepository and LinkThingChessTransport, which monitor the local filesystem for changes synced from peers.

  • Foreground Service: Runs as a reliable Android Foreground Service (SyncthingService) with support for Android 14+ dataSync service types.

  • Architecture: Clean separation between the Go binary, the REST API communication layer, and the modern UI.

:package: Getting Started

  1. Install the APK on two or more Android devices.

  2. Setup: Grant the necessary file permissions (All Files Access is recommended for seamless syncing).

  3. Pair Devices: Open the “Show My ID” QR code on one device and scan it with the other, or simply tap them together if they have NFC enabled.

  4. Chat & Play: Use the built-in Chat to communicate and start a Chess game to see EtherMesh in action.

Please – it’s “Syncthing.” No capital “t”.

Looks interesting. It reminds me of DecSync which similarly uses synced folders as a mechanism for storing address books, calendars, etc., without a central server.