Synchronising with a phone

AutoFileSync also keeps folders on an Android phone in step with the PC: photos reach the PC by themselves, a folder stays the same on both devices, or music goes from the PC to the phone. The phone needs the AutoFileSync app for this, and phone and PC must be on the same network: the phone on Wi-Fi, the PC on Wi-Fi or by cable on the same router.

Connecting a phone

  1. File → Connect phone… shows a QR code. It is valid for ten minutes and for one phone only.
  2. Install the app on the phone – from F-Droid or as an APK from welsch-software.com. The QR code takes you there as well.
  3. In the app, tap Scan QR code, point the camera at the code and confirm with Connect.
  4. The app asks for access to all files: Allow access leads to the Android setting where it is switched on. Without this access the PC can neither read nor write the phone's folders.

The PC then shows “… is connected ✓”. From now on PC and phone recognise each other by their certificates; a foreign device cannot pass itself off as either of them.

What is synchronised

Right after connecting, AutoFileSync asks what should happen with the phone. Folders on the PC and on the phone are suggested and can be changed.

Back up photos and videos to the PC Copies the photos and videos from DCIM/Camera to the PC. Photos deleted on the phone stay on the PC – so space can be freed on the phone.
Keep a folder the same on both devices Changes on one side reach the other, deletions and renames included. If a file was changed on both sides, both versions are kept; see Two-way synchronisation.
Music from the PC to the phone Copies the PC's music folder to the phone. Whatever disappears from that folder is removed from the phone as well.
Set up later Creates nothing. This can still be done later.

Each template creates an entirely ordinary synchronisation. Like any other, it can be edited, looked at in the preview and followed in the log.

A synchronisation of your own with the phone is created in the dialog of a synchronisation: the Phone… button next to Server… picks the phone and a folder on it. The list names the usual folders such as DCIM/Camera, Download or Music; another one can be typed in.

When synchronisation happens

A pass with the phone starts when the phone reports to the PC:

Two switches in the app decide when the phone reports in: Only on Wi-Fi (on at first) and Only while charging (off at first). Below 15 % battery the phone waits until it is on the charger. During a pass the phone shows the progress as a notification.

A phone that is away is not an error: AutoFileSync simply waits until it reports in again. If the phone cannot reach the PC for a whole day, it reminds you once with a notification.

If the PC gets a new address in the home network, the phone finds it again by itself. If the background service is running, it accepts phones even when nobody is logged in to the PC.

The phone's files are reachable for the PC only during a pass, and only with a password that is generated anew for every pass.

Connected phones

Edit → Phones… lists all connected phones.

Firewall

The phone reaches the PC through port 52381. A firewall on the PC must open this port for TCP and UDP. On Linux with ufw this is enough:

sudo ufw allow 52381

If nothing arrives within a minute while connecting, the dialog itself points to the firewall.

If it does not work