Move files and text

Transfer files between Android and Linux

Pair your Android phone with a Linux PC using the pdb command-line tool, then send files both ways over Wi-Fi, end-to-end encrypted.

Available in preview Updated Works on
  • Android
  • Linux

On Linux, Personal Device Bridge is a command-line tool called pdb. Run pdb serve --pair on the PC, scan the code with the Android app, and you can send files both ways: from the phone with Files, and from the terminal with pdb send. There is no desktop window on Linux, but the transfers are the same encrypted, resumable ones as on Windows.

At a glance

  • Runs on 64-bit (x86_64) Linux as a command-line tool.
  • Received files go to ~/Downloads/Personal Bridge, or wherever --download-dir points.
  • pdb send <device> <files or folders> sends files and whole folders.
  • pdb doctor checks the agent, firewall, ports and mDNS and prints a fix for each problem.

Step by step

  1. Install both sides

    Download the Linux command-line tool from this site and check that pdb --help runs. Install the Android APK on the phone.

  2. Open the firewall ports

    With ufw run sudo ufw allow 47820:47821/udp, sudo ufw allow 47822/tcp and sudo ufw allow 5353/udp. For firewalld, see Allow the app through the firewall.

  3. Start pairing on the PC

    Run pdb serve --pair. It keeps running, receives files and shows a pairing QR code and link.

  4. Pair from the phone

    On the phone tap Scan QR code and scan it, or get the link onto the phone and use Paste link instead. Approve only if the 6-digit codes match on both sides.

  5. Send in either direction

    On the phone tap Files and pick the Linux PC. In the terminal run pdb send <device> <file>; pdb devices lists the device names you can use.

Keep the PC ready to receive

The PC receives only while the background agent is running. pdb agent install starts it at sign-in for your user, without admin rights, and pdb agent status tells you whether it is running.

What the Linux version covers

  • On Linux the supported version is the pdb command-line tool, so everything on this page is done with pdb commands. pdb --help lists them all.
  • Beyond files, you can send clipboard text with pdb clip <device> and links with pdb url <device> <address>.
  • Received files land in ~/Downloads/Personal Bridge; add --download-dir to use another folder.

Questions

Is there a desktop app for Linux?

No. On Linux, Personal Device Bridge is the pdb command-line tool. The graphical desktop app is for Windows.

Pairing doesn’t work although both are on the same Wi-Fi. What now?

Run pdb doctor, which checks the firewall, ports and mDNS and suggests fixes. Guest Wi-Fi often isolates devices; see Fix Wi-Fi client isolation (guest and public Wi-Fi).

Can a Linux PC also talk to a Windows PC?

Yes. Two PCs pair with a link: run pdb serve --pair on one and pdb pair "pdb://pair?d=…" with that link on the other, or, in the Windows app’s Add device screen, paste it under Paste a link from another device and click Connect.

Does it work when the phone is away from home?

Yes. Once paired, the devices connect over the internet automatically, still end-to-end encrypted (Connect over the internet).