How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol (MTP)


This tutorial will show how to access android devices using MTP in Ubuntu also show you how to access SD card contents.

MTP or media transfer protocol is an extension of Picture transfer protocol and implemented in Android marshmallow version. After marshmallow update, you can’t use the android devices as typical mass storage devices which you can just plugin and see the contents of internal storage and the SD card contents in file manager Thunar or Nautilus. This is due to the OS is unable to determine the MTP devices and also list of supported devices are not yet implemented.

Steps to access Android Devices in Ubuntu, Linux Mint

  • Install libmtp, FUSE file system for MTP enabled devices mtpfs using below commands
  • sudo apt-get install go-mtpfs
    sudo apt-get install libmtp
    sudo apt-get install mtpfs mtp-tools
  • Create a directory in /media using below command and change the permission for write
    sudo mkdir /media/MTPdevice
    sudo chmod 775 /media/MTPdevice
    sudo mtpfs -o allow_other /media/MTPdevice
  • Plug in your Android device using USB cable in Ubuntu.
  • In your Android device, swipe down from above in the home screen and click Touch for more options. In the next menu, select option “Transfer File (MTP)“.
  • MTP Option1

    MTP Option2

  • Run below command in terminal to find out the device ID etc. You can see the VID and PID in the command output for your device. Note down these two numbers.
  • $ mtp-detect
    mtp-detect Command Output

    mtp-detect Command Output

  • Open the android rules file using text editor using below command.
  • sudo gedit /etc/udev/rules.d/51-android.rules
  • Type below line using your device’s VID and PID in the 51-android.rules file. Save and close the file.
  • SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"
  • Run below command to restart the device manager.
  • sudo service udev restart
  • Next steps are mainly needed to access the contents of external SD card memory of your android device. I had to do these because the file manager was NOT showing the contents of the SD card. This is not a solution though but it is a work-around which works for most of the users as per this Google forum post and worked for my Motorola G 2nd Gen with SanDisk SD card.
    • Safely remove your connected device in Ubuntu.
    • Turn off the device. Remove the SD card from the device.
    • Turn on the device without the SD card.
    • Turn off the device again.
    • Put the SD card back in and turn on the device again.
  • Reboot your Ubuntu machine and plug-in your android device.
  • Now you can see the contents of your android device internal storage and the SD card contents.
  • MTP Device Contents in Ubuntu

    MTP Device Contents in Ubuntu


Above tutorial worked on Ubuntu Trusty, Android Marshmallow, Motorola G 2nd gen. In my opinion, MTP is very slow compared to good old options.

You may also like...

  • Jeremy Lansman

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package libmtp
    and that is after apt-get update. Gone and left us hanging.

  • Alexander Tolstoy

    I wonder if there’s a way to speed up MTP performance in Linux?

    • MTP is slow in my test in old USB ports. Try using USB2.0 ports or higher.

Translate »