61

How does one connect an MTP device to Ubuntu via USB? Many popular devices, such as all Android 4.0 phone, have only MTP or PTP as a connection option, no USB mass storage anymore.

Considering the popular Samsung S3: connecting as either MTP or PTP: neither allows one to see pictures saved as default by phone camera to DCIM folder on external SD card. Similar problems with previous models (with Android 2.x) were solvable by 'usb utilities' in wireless & networking settings, but this is no longer present in Android 4.0.

0

15 Answers 15

50

Install gmtp, and use it to connect to the phone or tablet :

sudo apt-get install gmtp
6
  • 3
    Awesome, still works for S5 and Kubuntu 15.10 Feb 11, 2016 at 20:20
  • 1
    Works with Ubuntu 16.04 LTS (as of June 2018)
    – champost
    Jun 17, 2018 at 21:28
  • "Unable to open raw device?" - on Ubuntu 20.04
    – jaromrax
    Dec 7, 2020 at 16:31
  • Worked for me on Ubuntu 20.04
    – ken
    Jan 21, 2021 at 14:38
  • Works for me also Ubuntu 20.04 and Files(nautilus) can also "mount" the mtp device without error. Before gmtp installed there was a /var/crash/_usr_libexec_gvfsd-mtp.1000.crash...
    – gaoithe
    May 2, 2021 at 11:41
17

You just install jmtpfs (via sudo apt-get install jmtpfs). After connecting your phone via USB, enable the MTP file transfer on your phone and it will show up as USB device on your computer. You can then access the whole file system (and not only the pictures, as with PTP) of your Android device.

This worked for me with (K)Ubuntu 14.04 LTS and my Motorola Moto G.

5
  • 1
    Allright, working fine for my in UbuntuSTudio 16.04 x386 with SAMSUNG Galaxy J5 (Only I have to restart the PC for working) Aug 5, 2016 at 2:22
  • It worked very well with my setup too - Kubuntu 16.04 & Samsung Galaxy Core Prime Feb 4, 2017 at 11:56
  • Does not work with Ubuntu 18.04 and Moto G :( Dec 29, 2018 at 22:14
  • It works on 18.04 but the whole computer blocks whenever I do even just some simple command like ls android. Why is it so slow?! Feb 28, 2020 at 19:01
  • Works fine with Ubuntu 20.10 and Volla Phone on Ubuntu Touch (OTA 15).
    – mark
    Dec 20, 2020 at 16:42
16

Try the "AirDroid" App from Play Store. It allows you to use a browser based interface (on your computer) to transfer files from a Windows/Linux pc. Since it's browser based UI, no need to install anything on the pc side.

4
  • 9
    AirDroid wants excessive permissions like contact list. For file transfer? Oct 27, 2018 at 21:20
  • @GuidoKanschat may be to send file to their contact no :P Feb 1, 2019 at 11:42
  • 2
    I think this is not an accepted answer.
    – amrezzd
    Oct 12, 2020 at 6:47
  • Try Windows, it work pretty well, I means if passing by the cloud is your solution, why not using any Google Drive nor OneDrive or Owncloud, ... After all, Syncthing might be a better solution than AirDroid.
    – JOduMonT
    May 13, 2021 at 21:27
10

Have a look at this:

http://forum.xda-developers.com/showthread.php?t=1643757

And this:

http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/

Changing from MTP to PTP (camera transfer mode) also works with nautilus, at least with the built-in memory.

2
7

I have been able to do this using the following:

$ sudo apt-get install mtp-tools mtpfs
$ mkdir phone
...Connect phone, set usb mode to MTP...
$ sudo mtpfs -o allow_other phone
...Trying to do anything with the new filesystem right now will take a minute or so, just be patient...
...Finally, you can access your phone and do whatever, then...
$ sudo umount phone

Here is the version this worked on:

$ mtpfs --version
FUSE library version: 2.8.6
fusermount version: 2.8.6
using FUSE kernel interface version 7.12

I haven't had perfect success with it, but I was able to get some files off of the phone. I imagine this will get better as newer software is released.

3
  • This works fine on Quantal, but not on Precise :( I think the version of libmtp is too old
    – KayEss
    Dec 16, 2012 at 8:07
  • @KayEss I'm on 12.04 (PP) and it worked without issue, so YMMV I guess Sep 3, 2014 at 21:15
  • 1
    only approach that worked out of the box!!
    – Pa_
    Jan 5, 2018 at 19:33
3

There is no GUI needed for file transfer (No One on Ubuntu is interested in making a GUI for only file transfer). And there is no need for plugins for Nautilus either. I Use Samsung Galaxy Mini (Android 2.2 ~ Froyo), and I'm doing file transfer so far by three ways, Bluetooth connection, Cable connection or using Ubuntu One app.

For cable connection you can do it easily as plug the cable, wait a while and choose mass storage mode. Access and File Transfer via Nautilus. If you want to make the phone as modem, go here: http://shiliarr95z.weebly.com/2/post/2011/07/connecting-samsung-galaxy-mini-android-phone-to-ubuntu-1104-as-modem.html.

For Bluetooth Connection, you can go here : http://shiliarr95z.weebly.com/2/post/2011/08/howto-transfer-files-via-bluetooth-laptop-to-samsung-galaxy-mini-android-phone-vice-versa.html a bit complicated but fun as well.

Using Ubuntu app is the easiest one. On the phone side,just go to Android market and install the Ubuntu one app. photo sharing runs in the background in an instant. On the Ubuntu side, just register yourself on Ubuntu One (click the envelope icon and choose Ubuntu One). And, You Have GUI on the phone side (On the Ubuntu side, you got only an OSD Message)

3

For the technically noob (including me) I found just copying the file(s)/Photo(s) from the SD and pasting it to the DCIM on the phone memory will allow me to copy using the USB camera mode. Then delete the phone file once you download to PC if you need want to clear the phone memory.

  1. Go to My Files.
  2. Select extSDCard
  3. In this example I will select DCIM
  4. Press the settings button on bottom left.
  5. Select Copy.
  6. Check box of files to be copied.
  7. Press copy on top right.
  8. Exit back to My Files. 9 Select sdcard0
  9. In this example I will select DCIM
  10. Press paste in top right.
  11. Exit out, select camera mode in the USB option and you should be able to transfer using simple "my computer".
2

Android USB

From the home screen press Menu > Settings > Connect to PC > in this menu, make sure "Ask Me" is selected, if you want it to pop-up and ask you what connection type you want when you plug into the computer.

Or you can set a default action from this menu as well. You can set it to Charge Only, HTC Sync, Disk Drive, Mobile Broadband Connect.

Then Ubuntu will simply detect it as a MTP.

2

If you can't transfer songs through Rhythmbox you can, like others have pointed out, transfer files using mass storage.

On my Samsung Galaxy S II you do it by going: Applications->Settings->Connection settings->USB mass storage

Then if you plug in the USB cable it should prompt you to go to USB mass storage mode. If you say yes your phone will be available through Nautilus.

2

I have found one more application named "Qlix". You can download it from ubuntu software center.

It is for transferring files from PC to Android mobile phone.

Thanks

2

Transfer files between Ubuntu PC and your Android phone via wifi:

Xender application on your android phone allows you to transfer files between Android and PC.

Steps:

  • Install Xender application on your Android device from playstore.

  • Create wifi hotspot on your Ubuntu pc by following this method and turn it on.

  • Connect your phone to pc via the created hotspot.

  • Now open xender application and select "Connect PC" option on the settings menu.

  • It will generate an address, (Like an ip-address).

  • Put that address on your web-browser.Now you can transfer files between your phone and PC.

    enter image description here

2

The git master branch of libmtp supports the S3. If you know how to install / compile from source, you can use this until a new version is released.

I'm not on an Ubuntu machine right now, so I unfortunately can't give exact instructions regarding dependencies for compiling, etc. But it should be along the following lines:

git clone git://libmtp.git.sourceforge.net/gitroot/libmtp/libmtp
cd libmtp

sudo apt-get install libtool libusb-dev checkinstall

./autogen.sh  (answering yes to any questions)
./configure --prefix=/usr/
make
sudo checkinstall  (answering any questions)

Then, you should probably make it into a .deb package, so you can install it without breaking dependencies of the programs you want to use. I'm out of my knowledge, but Compiling source into a DEB package seems to provide info.

1

I installed Android File Transfer for Linux - MTP on Kubuntu and worked

0

I had a similar issue, my Note4 was working but my S8 was not. To fix that I installed the usual go-mtpfs and gvfs-fuse, but mainly limesuite-udev fixed everything.

sudo apt install -y go-mtpfs gvfs-fuse limesuite-udev

Of course your USB Preferences as to be set for File Transfer or MTP.

0

I found a solution from reddit, and it's working for me. You need to install these four packages:

  • mtp-tools
  • jmtpfs
  • libudisks2-dev
  • gvfs-backends

And then reboot. In my case, I've tried to download jmtpfs from another answer here and it's not working, so after I found this solution, I installed the rest of packages (only libudisks2-dev was missing from my machine), and without rebooting my machine, thunar finally detected my phone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .