Community-driven coverage of elementary OS — news, guides & forums
Dark abstract low-poly geometric landscape with layered triangular facets in deep navy, charcoal, and muted teal, illuminated by a soft electric-blue glow near the horizon

News roundups, tutorials, application guides, and forums — built by users, for users of the elegant Linux distribution.

elementary weekly
#20
Latest roundup · 18 Apr 2015
Freya Release
Final
Covered in weekly #19 & #20
Forum Topics
Active
Installation, customization & more

Transferring files between Android and elementary OS with MTP

Plugging an Android smartphone into a Linux laptop should be straightforward. The Media Transfer Protocol that Google selected for Android has been a standard USB device class for years, so most desktops treat a connected phone like a removable media player. Elementary OS, built on Ubuntu and paired with the Pantheon desktop, ships with the Files application ready to browse USB mass storage and many MTP devices out of the box. The Pantheon team also baked in support for smb and MTP backends through the GVFS layer so that a phone plugged into the USB-C port appears in the sidebar much like a thumb drive.

There is one common source of confusion for newcomers, however. The phrase Android File Transfer usually refers to the official Google desktop client for macOS, which exists because Apple removed native MTP support long ago. That tool is not available for elementary OS, and there is no need to install it. A handful of community-maintained programs fill the same role on Linux, and the operating system can also be coaxed into using the phone's storage without extra software. Knowing which path to take depends on the phone model, the kernel version in play, and whether the user prefers a graphical workflow or a terminal session.

The question comes up often among hobbyists in Sydney and Melbourne who want to back up weekend photos from a coastal walk at Bondi or footage captured along the Great Ocean Road. The setup can also matter for anyone relying on Telstra or Optus 4G as their main connection at home, where cloud uploads are metered and a quick USB pull is often faster than waiting for a slow upload over a congested cell tower. Choosing the right approach keeps the workflow smooth without spending a cent on additional software.

Understanding MTP and how elementary OS handles it

Media Transfer Protocol is the USB specification that Android adopted in place of the older USB mass storage class. Instead of exposing the phone as a raw block device, which would force the filesystem driver to run on the computer, MTP talks to the phone's media database and exposes individual files and folders through a structured API. The benefit is that the phone can keep managing its own storage while the computer only sees named files. The drawback is that the protocol is finicky on systems that have a thin abstraction layer, and Linux historically has had a few rough edges around unlocking phones and handling many concurrent file operations.

Elementary OS handles the protocol through the GVFS layer that comes with the Files application. When a phone is plugged in and set to "File transfer" mode in the Android notification shade, the Pantheon Files sidebar normally shows the device as a separate volume. Under the hood, gvfs-mtp and libmtp translate the device's MTP responses into the GVFS virtual filesystem, which means other GTK applications can also access the photos. This is why an image viewer like the built-in Image Viewer or any flatpak app that supports the xdg-portal can open pictures directly, as long as the underlying permissions are correct.

The native support works well for straightforward tasks: copying JPEG photos from a weekend barbecue, pulling voice memos recorded at a community club meeting, or dragging the latest tax documents from the Downloads folder of the phone onto the desktop. Where it falls short is large batch operations, renaming many files in quick succession, or accessing the phone over a flaky USB hub. Those situations are when dedicated MTP clients or a manual FUSE mount start to make sense.

Preparing your system before plugging in the phone

The kernel on a current elementary OS release already has the right modules for most Android phones, but a few extra libraries make the experience less brittle. Installing libmtp9, libmtp-common, gvfs-backends and gvfs-fuse through AppCenter or with sudo apt install pulls in everything that GTK applications need to negotiate the protocol cleanly. For users running elementary OS 7 or later, most of these packages are preinstalled, so the only extra step is usually sudo apt install gvfs-fuse, which ensures mtp:// URIs can be mounted as a virtual filesystem anywhere on the desktop.

Before connecting the handset, it is worth checking the cable itself. Many cheap cables sold at JB Hi-Fi or Officeworks are charge-only and lack the data wires. A cable that works on a friend's Windows laptop is not always a guarantee on Linux, since some handsets renegotiate the data role based on the USB descriptors they see. Trying a different cable is the first thing to try when a phone refuses to show up in the Files sidebar at all.

On the phone side, the steps are similar regardless of whether the user is on a Pixel running stock Android or a Samsung with One UI. Pull down the notification shade after plugging in, tap the USB charging notification, and switch the mode to "File transfer" rather than "Charging this device" or "Photo transfer (PTP)". PTP is meant for cameras and only exposes the DCIM folder, which catches people out when their Videos or Documents folder appears empty. Keeping the phone unlocked the first time the device is connected also matters, because most manufacturers refuse to give the computer access to storage while the lock screen is active.

Comparing the MTP tools you can use on elementary OS

Several free utilities exist for users who want a richer MTP experience or who need to recover when the native Files integration misbehaves. The table below summarises the four options that come up most often on the elementary OS community forums, including the port of Android File Transfer originally written for macOS that has been packaged for Linux. Each one has a different blend of features, so picking the right tool depends on whether the goal is quick browsing, scripted backups, or completely replacing the Files sidebar.

Tool Interface Installation on elementary OS Works with locked phone Wireless option Best suited to
Files (Pantheon) GTK desktop app Preinstalled No No Day-to-day browsing of photos and documents
gMTP GTK graphical client sudo apt install gmtp Yes, read-only No Bulk transfers and folder creation from a desktop app
Android File Transfer (Linux port) Qt graphical client AppImage from GitHub releases Yes, full access No Users who want a familiar macOS-style interface
jmtpfs / simple-mtpfs FUSE mount in terminal sudo apt install jmtpfs or simple-mtpfs Yes, read-only or full depending on flags No Scripting transfers or using any file manager
KDE Connect KDE + Android companion app sudo apt install kdeconnect, plus Android app N/A (no MTP) Yes, over Wi-Fi Avoiding the cable entirely

The Files application remains the most polished choice for occasional use because it already knows how to draw thumbnails, handle .nomedia folders, and respect the photo library structure of a phone that mirrors images through the cloud. gMTP, by contrast, exposes a fuller filesystem tree and lets a user create new folders, which is something the Files MTP backend sometimes refuses to do on Samsung phones. The Android File Transfer port is a community-driven build that wraps libmtp behind a Qt interface, and it tends to cope better with large video files than Pantheon Files because it streams them in chunks rather than buffering the entire clip. jmtpfs and simple-mtpfs sit one level down: they do not have a UI of their own, they simply mount the phone as a folder, after which any file manager, including Pantheon Files in its regular local mode, can browse it without speaking MTP at all.

Mounting the phone as a folder with jmtpfs

For Linux users who prefer repeatable, scriptable transfers, mounting the phone through FUSE is the most reliable option. The jmtpfs tool was written for exactly this purpose and remains available in the elementary OS repositories. Installing it is a single sudo apt install jmtpfs command, after which the user creates a mountpoint somewhere writable, often under $HOME/phone or /mnt/phone, with mkdir -p.

The actual mount is done with a command such as jmtpfs ~/phone, which uses FUSE to expose the phone's storage at that path. From there, files can be copied with rsync, edited with a text editor, or transcoded with HandBrake in the same way as any local folder. Because the protocol is still MTP under the FUSE layer, transfers are sequential and there is a small overhead, but for backing up an entire photo library or pulling a folder of tax PDFs the experience is close enough to a USB mass storage drive that it rarely matters. The mount survives disconnections poorly, so it is wise to fusermount -u ~/phone before unplugging to avoid corrupted partial files.

A lighter alternative is simple-mtpfs, which only takes a couple of dependencies and is often the choice for users who want a one-off mount without pulling in the full jmtpfs package set. Both tools rely on libusb for the actual USB communication, which is one reason that getting the relevant kernel modules in order tends to matter less than picking the right cable and the right phone-side setting. Some Australian contributors to the elementary OS community have started writing small systemd units around jmtpfs so that the phone mounts automatically on login whenever the cable is connected, which is a tidy solution for users who do most of their work in a single home office.

Skipping the cable entirely with local file sharing

For many Australians, the desktop PC at home is wired into a National Broadband Network connection, and the phone lives mostly on Wi-Fi. In that situation, dragging a cable across the living room feels unnecessary. Local network file sharing tools sidestep MTP altogether and let the phone talk directly to elementary OS over the same router that streams the cricket, plays ABC iview, and serves the household printer.

KDE Connect is the long-standing option. It pairs with an Android companion app through a PIN handshake, exposes the phone's battery level and notifications to the desktop, and provides a virtual filesystem that any file manager can browse. Files in the phone's SD card or internal storage appear under kdeconnect:// in the Files sidebar, complete with thumbnail previews. LocalSend is a simpler, dependency-light alternative that focuses exclusively on file transfers and works between Linux, macOS, Windows, Android, and iOS without any account. PairDrop, the community fork of Snapdrop, runs entirely in the browser and only needs a shared room name to ferry a quick photo across to the laptop while sitting in a café in Fitzroy or waiting for the next train at Flinders Street Station.

These wireless options consume data on the local network rather than the mobile carrier, which matters when Telstra or Optus plans are tightly capped and NBN uploads are unmetered. They also avoid the lock-screen quirk that catches users on MTP, because the phone does not need to be unlocked once the connection is paired. The trade-off is that transfers are usually limited to the home or office Wi-Fi speed, so a 4 GB video file is still much faster over a recent USB-C cable than over a typical 802.11ac router. For someone commuting between Sydney and Newcastle or back from a regional trip through the Hunter Valley, having both wired and wireless paths ready covers the moments when the Wi-Fi cuts out.

Fixing the most common MTP problems

A handful of well-known issues tend to derail otherwise simple transfers. The phone is not detected at all, the Files sidebar shows an empty device, the connection drops after a few files, or the system insists that the phone is a camera and only shows the DCIM folder. Each of those symptoms has a corresponding remedy that the elementary OS community has refined over the years.

When nothing shows up, the cable is the first suspect, followed by the USB mode setting on the phone. If both are correct but the device still does not appear, mtp-detect run from a terminal will tell whether libmtp can see the phone at all, which usually points to a missing udev rule. Pulling the udev rules from the libmtp source tree and dropping them into /etc/udev/rules.d/ often resolves the issue on older handsets that do not advertise the modern MTP interface. For Samsung phones in particular, installing jmtpfs as a fallback covers cases where the Pantheon Files backend fails silently. Locked phones tend to drop the connection at random, and the workaround is either to keep the screen unlocked during long transfers or to install a tool like gMTP that holds the connection open more reliably.

Driver mismatches occasionally appear after a kernel update that comes through the elementary OS AppCenter. Reinstalling the gvfs-backends package and rebooting usually restores the sidebar entry, and rolling back to the previous kernel is a last resort that Australian users rarely need thanks to the conservative update cadence of elementary itself. For those juggling multiple phones, a small udev rule per vendor keeps the workflow predictable and saves the troubleshooting cycle for more interesting problems such as slow USB hubs on older Thunderbolt docks that some office desks still hide behind their monitor arms.

The cleanest path for most people is to try the bundled Files application first, fall back to gMTP or the Android File Transfer port if the sidebar lets them down, and reserve jmtpfs for scripted or recurring transfers. Keeping the Android companion apps for KDE Connect or LocalSend installed alongside the wired options covers the rare cases when a phone insists on charging only and refuses to expose storage. With those tools in the toolbox, moving photos from a sunny afternoon at St Kilda Beach to the Pantheon desktop is a matter of plugging in, choosing the right mode on the phone, and waiting a few seconds for the connection to stabilise.

Browse the News Archive
Latest Updates

From the elementary weekly series

Low-poly faceted abstract render in dark charcoal and electric blue tones, suggesting a news bulletin or announcement
elementary news

elementary weekly #20

The first week with the final Freya release — community reactions, tips, and early impressions gathered in one roundup.

Abstract low-poly geometric scene in midnight blue and soft cyan, conveying a live broadcast or event atmosphere
elementary news

elementary SPECIAL

A live Hangouts event with the elementary OS founders, held on 11 April 2015, discussing the Freya final release.

Low-poly faceted render in deep navy and muted teal with subtle amber highlights, suggesting a tutorial or guide
Tips and Tricks

Timeshift Guide

How to use Timeshift — the intuitive system restore utility for elementary OS — to recover from configuration mishaps.

Explore

Topics & Resources

Dive into guides, application recommendations, and community discussions covering every aspect of elementary OS.