Skip to content

Repository files navigation

Noscat for Android

The Android app for Noscat, which joins your devices into one private, end-to-end encrypted mesh with no account. From your phone you can:

  • join a mesh by scanning a code, and approve new devices,
  • chat, send and receive files, and share your clipboard,
  • open other devices' web services in the phone's browser, and forward their other ports (new in 0.8),
  • open a terminal on your computers,
  • choose who may send things to the phone.

Devices: this phone, then the other devices, each with Send a file, Terminal and More A conversation with another device Files: a file received from another device Services before any device offers one: the other devices' services show here, ready to open or forward

Version 0.10.0 runs Noscat 0.10.0.

Install

On a 64-bit ARM phone with Android 8.0 or later, download app-release.apk from the latest release and open it. Android asks you to allow installs from your browser or file manager the first time. To update, install the new APK over the old one: the phone stays in its mesh. Uninstalling the app deletes the phone's device identity, so it would have to join again as a new device.

Joining a mesh

The app cannot create a mesh yet; a device running the Noscat CLI does that (noscat mesh create <name>).

  1. On a device in the mesh, show its pairing code: Invite a device in the apps, or noscat mesh qr on a computer (noscat up prints it too).
  2. In the app, tap Scan pairing code (or paste the code). The phone sends that device a join request and waits up to three minutes.
  3. Approve the request on that device: Approve on the apps' Devices tab; on a CLI running noscat up in a terminal, type the invite npub1... line it prints; on a CLI running as a service, run noscat mesh requests and answer y. The phone joins and shows the device list.

Once in the mesh, the phone approves join requests too: a device that scans this phone's code (tap the logo at the top right, then Invite a device) shows up on the Devices tab with Approve and Decline. Check the short device ID against the joining device's screen before approving.

In a private mesh (noscat mesh private, on a members-only relay such as noscat-relay) the member's QR also names the mesh's relay, and the phone joins through it alone: nothing of it, not even its key package, reaches the public relays. Pasting works too with the whole code from noscat mesh qr. The phone's own Invite code names the relays too, so a phone can invite into a private mesh as well.

Every mesh needs one member reachable from the internet; on one Wi-Fi network, devices find each other directly.

Disconnect (the logo's sheet or Settings) takes the phone offline but keeps it in the mesh, even across restarts; Reconnect brings it back as the same device. Forget mesh (Settings) asks the other members to remove the phone, then deletes its identity and mesh data (received files stay); to come back, join again as a new device. If no member is online, the removal completes when one next comes online.

Devices and chat

Devices are listed this phone first, then by name; being online never moves a device. Tap a device to chat with it. Its row shows Send a file, Terminal on devices that offer one, and More (also a long press) for every action: chat, send a file, share the clipboard (shown to you before it is sent) and open a terminal. The Chat tab lists every member, latest conversation first. A message the other device never acknowledged is marked "not delivered": tap it to send the text again as a new message, or long-press any message for Copy and Delete (and Try again). Nothing is resent automatically, since the other device may have received it. When the phone switches networks (Wi-Fi to cellular and back), the app tells Noscat at once, so connections recover in seconds.

The Services tab lists the services the other devices offer (new in 0.8), grouped by device and also shown on each device's row; the ring around a service's icon is green while its device is online. A web service has Copy and Open, which opens it in the phone's browser at an address like http://grafana.home-server.localhost:7080 (Noscat serves those addresses on the phone while it is connected). A TCP service (SSH, a database) has Forward: a port on the phone that reaches it, for an SSH or database app (it starts as the service's own port, above 1024: 22 becomes 8022); running forwards are listed below with Copy and Stop (with Undo). A device can also offer a service on its own network, such as a printer or a NAS (new in 0.10): it shows as "on its network" and opens the same way. The phone itself offers no services.

Shared names (new in 0.10) give one name to a web app several devices run, such as a photo library on two servers: http://photos.shared.localhost:7080 opens the first device that answers, chosen in order in New shared name, and stays with it until it cannot be reached, then moves to the next. The devices share no data, so moving may need a new sign-in, and each can receive the site's login cookies: choose only devices you trust with that login. The name stays on the phone.

The logo at the top right shows the connection as a ring (green connected, amber connecting, red offline); tap it for the mesh, Invite a device, Settings and Disconnect. Settings > Diagnostics shows the event log; Copy copies it for a bug report. Debug builds also write Noscat's own log (starts, relays, connections) to noscat-debug.log in the app's files: adb shell run-as io.github.letdown2491.noscat cat files/noscat-debug.log.

Terminal and access

Terminal opens the device's shell full screen, running as that device's user on that device. The device may ask its owner first ("Waiting for ... to approve"); a device without the app (a server running the CLI) has no one to ask, so it offers a terminal only once it allows some device (noscat allow <device> control), and refuses every other device. The keyboard opens when the session starts (tap the screen to bring it back); a row of keys adds Esc, Ctrl, Alt, Tab, arrows, Home, End and Paste; drag to scroll back. Back ends the session. If a device refused, its Terminal button greys out. The phone itself hosts no terminal.

Settings > Network lists the mesh's STUN servers (ip:port, comma separated), from which its devices learn their public address; a change is shared with every member and used from each device's next start.

Access (open it from Settings, or from a device's menu on Devices) decides which devices may send files, messages and clipboard text to this phone. Devices lists them; choose one to allow or block its sending, or Block it, which refuses everything from it without removing it from the mesh and keeps its rules for when you unblock it. Defaults sets the rule for devices without their own, and names the devices a change affects before making it. A device's menu also has Block, after a confirmation. The rules stay on the phone.

Presence

Each device's dot says whether data can reach it: green, connected now; amber, online (its announcements arrive) but nothing can connect, usually because it is on another network and no member is reachable from the internet; grey, offline.

Building

Native Kotlin (Compose) over a Rust UniFFI bridge: the noscat-ffi crate from crates.io, with Noscat's patched nvpn-fips-core from its v0.10.0 tag. The protocol lives in the Noscat workspace, so there is no protocol code here. Roadmap and agent guidance are in AGENTS.md.

Two steps: the native bridge, then the app.

  1. Native bridge (cross-compiles the noscat-ffi crate in the podman container, mounts the host Android NDK, strips the .so into app/src/main/jniLibs/, and regenerates the Kotlin bindings):

    ./scripts/build-native.sh            # the published noscat-ffi (default 0.10.0)
    ./scripts/build-native.sh local      # or unreleased changes in ~/Documents/noscat
    

    Either way the Rust library is a debug build (stripped, not optimized), so transfers are slower than a release build (PROFILE=release, below).

  2. The app itself (needs the JDK 21 tarball in ~/opt):

    JAVA_HOME=$(echo ~/opt/jdk-21*) ./gradlew :app:assembleDebug --no-daemon
    

The APK lands in app/build/outputs/apk/debug/. Install it over USB or wireless debugging with ~/Android/Sdk/platform-tools/adb install -r app/build/outputs/apk/debug/app-debug.apk.

Release build

scripts/build-release.sh [version|local] builds the optimized native bridge (PROFILE=release: LTO, stripped after the bindings are generated) and a signed app/build/outputs/apk/release/app-release.apk. Signing reads keystore.properties at the repo root (never committed; see app/build.gradle.kts for its keys), which points at a keystore kept outside the repo. Back up both: an update must be signed with the same key, and a lost key means users uninstall and join again.

A release APK cannot be installed over a debug build (different signing keys): switching means uninstalling, which deletes the phone's device identity, so it joins the mesh again as a new device.

License

MIT

Releases

Packages

Contributors

Languages