How to mount Moto G on Ubuntu using MTP

Moto G is an Android smartphone that does not have a microSD slot. So, the storage of the smartphone cannot be extended. If you want to transfer files between your Ubuntu computer and the Moto G, there are 3 possible ways to do that: FTP over wireless, PTP over USB and MTP over USB.

If your Ubuntu computer has wireless, I highly recommend using FTP over wireless. It is convenient (no wires!), offers good transfer speed and the entire /sdcard contents are available for read and write.

If your Ubuntu computer does not have wireless, then your next option is to use a micro-USB-to-USB cable. The choices here are PTP and MTP. You can enable and switch between the two after you connect Moto G to your computer using a USB cable. If you enable PTP, then Moto G is automatically mounted as a partition in Nautilus. However, you will only be able to see the /sdcard/DCIM and /sdcard/Pictures directories. If you are transferring photos, then this option offers good transfer speed.

If your Ubuntu computer does not have wireless and you still want to read and write to the contents of /sdcard then the option left to you is MTP. Note that with MTP, Moto G takes a really long time to mount and the transfer speeds are really really low. It can take ages to transfer even a small file. You have been warned! 🙂

There are many solutions offered online to mount the contents of /sdcard using MTP. This solution is the only one that worked for me:

  • Install the MTP packages:
$ sudo apt-get install mtp-tools mtpfs
  • Connect Moto G using a USB cable to your computer. Make sure MTP is selected, and not PTP.

  • Find out the vendor ID and product ID of Moto G using mtp-detect. For my smartphone I got:

$ sudo mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
   Found 1 device(s):
   22b8:2e82 @ bus 1, dev 12
Attempting to connect device(s)
Android device detected, assigning default bug flags

You need to press Ctrl+C to stop the command. For the Moto G, you can see that the vendor ID is 22b8 and product ID is 2e82.

  • Open a new file /etc/udev/rules.d/51-android.rules using sudo and add this line:
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"
  • Restart the USB service and create a directory to mount the Moto G:
$ sudo service udev restart
$ sudo mkdir /media/motog
$ sudo chmod a+rwx /media/motog
$ sudo adduser your-user-name fuse
  • Open the /etc/fuse.conf file as sudo and uncomment the line for user_allow_other

  • Restart your computer. Connect back the Moto G to the computer.

  • You can now mount the /sdcard of your Moto G using this command:

$ mtpfs -o allow_other /media/motog/

Note that the mounting operation is slow and might take about a minute.

  • You can find all the directories and files in /sdcard of Moto G in /media/motog. You can read and write to these directories.

  • To unmount use this command:

$ fusermount -u /media/motog/

That is it! You may want to create aliases for the mount and unmount command to make it easy to use 🙂

Note: You will not get the USB mass storage option in Moto G since that can be provided for external storage, not for partitions from which the Linux kernel is currently running. And in any case, you will need root access on the phone to touch those directories.

Tried with: Moto G and Ubuntu 12.04

31 thoughts on “How to mount Moto G on Ubuntu using MTP

  1. This worked perfectly for me with the MotoG. Mounting took about 15 Seconds.

    My Nexus 7 however takes a little less time for some reason but is very unstable. It disconnects while transferring data sometimes. Any idea why?


    1. Max: I suggest using MTP only if your Linux comptuer does not have wireless. MTP is unbearably slow on my Ubuntu! I prefer FTP over wireless on my Ubuntu notebook.


  2. There’s a much simpler way – using wireless FTP – without having to, usually, manually edit settings. And that is to install Software Data Cable (Pro) – currently free – from Android Play. Does all the FTP server settings for you, and presents you with an FTP address to enter in either Windows Explorer or Gnome Nautilus File Manager if using a Linux Gnome distribution, to make the connection.

    No need for MTP or PTP for any file transfers.


  3. Thank you so much for this tutorial. Unfortunately my workstation is out of range from our local WiFi so MTP was the only solution in my case. Everything is working perfectly fine now. Transfer speeds aren’t fantastic but not too bad either.


  4. From 13.10 and up Ubuntu supports automatic mounting via gnome-gvfs. To get this running for the Moto G you might have to install a more recent libmtp version as described in the following askubuntu Q&A:

    You will also find instructions on installing a backport of the latest gnome-gvfs package on Ubuntu releases prior to 13.10 in the answer above. (worked fine for me on 12.04, transfer speeds are acceptable (~10 MB/s), connection is a bit buggy though, make sure not to copy too many files at once)


  5. Better method: use Philip Langdale’s ppa at:
    You do not need to create a ‘motog’ folder. You still need to have your user in the fuse group. You still need to uncomment the ‘user_allow_other’ line in /etc/fuse.conf.
    Alos, logout & login before connecting your usb cable. Nautilus will then automatically display the sdcard & phone folders. The desktop will show an Android icon. When you are finished with file transfers, right click the Android icon & select ‘unmount’.
    PS this works for my other phone (ZTE V790), so my guess is that it will work for other phones (e.g. Samsung) provided that you have the appropriate entry in /etc/udev/rules.d/51-android.rules


  6. Encontre una manera de hacer la conexión del moto g con linux usando QtADB lo pueden descargar desde aquí requiere que el teléfono esté rooteado y tener instalado BusyBox. que lo encuentran en el play store. permite tomar capturas de pantalla y administrar todos los archivos y apps incluidas las del sistema. y la transferencia de información es bastante rápida. Es necesario instalar android-tools en el pc. probado con Elementary os, Ubuntu en sus versiones mas recientes


  7. Hi Ashwin,

    I have followed step by step to install the device and also able to see motog folder, but whwnever I try to open it, I get the following error.
    Error: Error when getting information for file ‘/media/motog’: Transport endpoint is not connected
    Please select another viewer and try again.

    Please help me out.

    Thanks in advance.


    1. Navin: I don’t know what could be the reason for this error. Please try with a different USB cable and try on a different computer to see if any of those could be the problem.

      Also, note that transfer over MTP is extremely slow. Try FTP over wireless as an alternative.


  8. On ubuntu 14.04 there is a file called 69-libmtp.rules in /lib/udev/rules.d

    If you add the following and reboot, ubuntu recognises and mounts the mtp device in nautilus without the need for any of the above apart from adding the device to the 51-android.rules. The Fuse changes are not required. USB debugging should still be disabled.

    Moto G phone

    ATTR{idVendor}==”22b8″, ATTR{idProduct}==”2e82″, SYMLINK+=”libmtp-%k”, ENV{ID_MTP_DEVICE}=”1″, ENV{ID_MEDIA_PLAYER}=”1″


  9. Hi, i recomend to use AirDroid, you can get it on the smartphone from google play.
    Just install the App, connect the phone to your network and then you can access it from any host at the same network.


  10. Moto g is showing as a mounted device.
    But i am not able to access the moto g sd card.
    Plz help


  11. Dis is the error i get after mounting of moto g when i try to access it.

    Error: Error when getting information for file ‘/media/motog’: Transport endpoint is not connected
    Please select another viewer and try again.


  12. Many thanks, Ashwin, for this very helpful tutorial on mounting an android device to a laptop running Linuxmint 17.1. I am an 84 year old dinosaur and just received my first smartphone, a moto-E. I tried to connect to its OS vis MTP since there was no automatic connection and had failed until I found your posting. Earlier attempts to connect to a Kindle fire HD via MTP had failed. Perhaps I can use your method there as well.
    Now to learn how to finger-talk to the smartphone…


  13. ~$ sudo mtp-detect
    Unable to open ~/.mtpz-data for reading, MTPZ disabled.
    libmtp version: 1.1.8

    Listing raw device(s)
    No raw devices found.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.