Skip to content

Rsync daemon fails to start if PTY not allocated on Android #1068

Description

@schuelermine

I’m running a static build of Rsync for ARM that I built using Nix (nixpkgs#pkgsCross.aarch64-android.pkgsStatic.rsync) on an Android phone (specifically a Google Pixel 10 Pro XL running GrapheneOS) via ADB.

Rsync fails to start if it’s launched without a PTY. ADB shell creates a PTY if it’s run without a specific command and thus launches an interactive shell, but doesn’t otherwise (unless you pass -tt). The way I go about driving an ADB shell is usually by launching the noninteractive shell and piping a script to it due to ADB’s strange handling of arguments.

I’m running Rsync with the following command line:

/data/local/tmp/rsync --daemon --no-detach --config=/data/local/tmp/rsyncd.conf --verbose --log-file=/data/local/tmp/rsyncd.log

The config file reads:

address = 127.0.0.1
port = 60873
[user]
path = /storage/emulated/0/
read only = false

The log file shows the following error message:

2026/08/30 17:31:02 [9693] malformed address : Name does not resolve
2026/08/30 17:31:02 [9693] connect from UNKNOWN ()
2026/08/30 17:31:02 [9693] rsync: [Receiver] failed to set socket option SO_KEEPALIVE: Permission denied (13)

Rsync itself prints to stderr:

@RSYNCD: 32.0 sha512 sha256 sha1 md5 md4
@ERROR: protocol startup error

I’m not sure if this an Rsync bug or an ADB or Android bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions