I am having trouble to access the filesystem on my phone (it's a samsung / google galaxy nexus). It just worked in previous version of Ubuntu, but now it appears empty whether it is mounted with MTP or PTP. I have followed a few guides on building and reinstalling libmtp etc without success. This answer did not help for me, either, and gMTP just hangs when I click the connect button. I know I can use wifi e.g. airdroid to access my photos, but this is too slow and a bit clumsy for me, and downloaded photos lose their original timestamps.

Has anyone had success connecting to this phone on 12.04 ??

  • Do any of the answers here help? Sep 3, 2012 at 7:10
  • nope ` ` ` ` ` `
    – wim
    Sep 3, 2012 at 7:32
  • Did you try banshee, i have Samsung Galaxy s2, and with banshee it works fine. pictures/music/videos. try that out :)
    – blade19899
    Sep 3, 2012 at 7:50
  • just tried, my device doesn't show up in banshee
    – wim
    Sep 3, 2012 at 14:03
  • 1
    no, my phone is stock as a rock
    – wim
    Oct 4, 2012 at 14:13

3 Answers 3



First, install the necessary packages:

sudo apt-get install mtp-tools mtpfs

A bit of elbow grease

Connect your Android phone to your computer. On your phone, open up the notification drawer, and click on USB Connection type. Make sure that MTP is selected.

MTP Mode

Now, run these commands on Ubuntu:

mtp-detect | grep idVendor
mtp-detect | grep idProduct

Note down the numbers written in front of idVendor and idProduct. You'll need those later on.

Now, run this command:

gksu gedit /etc/udev/rules.d/51-android.rules

A Gedit window should open up. Type this text in it, all in a single line:

SUBSYSTEM=="usb", ATTR{idVendor}=="VENDORID", ATTR{idProduct}=="PRODUCTID", MODE="0666"

Replace VENDORID with the idVendor you had noted down earlier. Similarly, replace PRODUCTID with the idProduct you had noted down.

Save and close the file.

Disconnect your phone and run these commands:

sudo service udev restart
sudo mkdir /media/androiddevice
sudo chmod a+rwx /media/androiddevice
sudo adduser yourusername fuse

Replace yourusername with your Ubuntu user name. Now, run this command:

gksu gedit /etc/fuse.conf

In the Gedit window, remove the # at the beginning of the last line (the one that begins with #user_allow_other). Close and save the file.

Restart your computer, and then run these three commands:

echo "alias android-connect=\"mtpfs -o allow_other /media/androiddevice\"" >> ~/.bashrc
echo "alias android-disconnect=\"fusermount -u /media/androiddevice\"" >> ~/.bashrc
source ~/.bashrc

Reconnect your phone, make sure it's still in MTP mode, and then run this command:



You may now browse your Android phone's contents using Nautilus. Just fire up the file manager, and then in the side bar click on your phone's name to browse your phone's filesystem just like you would with a USB stick. You can add, remove and modify files just like a normal file system.

Phone filesystem

You might have noticed, however, that you cannot use the Nautilus eject icon to disconnect the phone. Instead, to safely remove the phone, you need to run the command:


From now on, you will need to run android-connect to mount your phone and then android-disconnect to safely remove your phone. Everything else should be handled automatically.

Note: These two commands won't require root permissions to run. All users who are members of the fuse user group should be able to run these commands without root access.

You're done

That's it! You've successfully connected your Ice Cream Sandwich phone to your Ubuntu computer.

Source: OMG! Ubuntu!

  • 2
    I have already tried the OMGubuntu guide and it did not work properly for me
    – wim
    Oct 5, 2012 at 0:17
  • What didn't work? Give details.
    – SirCharlo
    Oct 5, 2012 at 12:02
  • Can anyone suggest a fix for the 'connect'/'disconnect' issue?
    – david6
    Oct 8, 2012 at 7:02
  • trying to browse on the mounted share just hangs .. and the only way to unfreeze it i've found is to unplug the cable
    – wim
    Oct 9, 2012 at 13:03
  • To have this work, mtp-detect must return some device, am i wrong? @SirCharlo
    – merveotesi
    Jul 26, 2014 at 20:54

As I wrote in this thread, there are several solutions.

Given that you don't have a rooted phone, you can't install Samba Filesharing and have traditional samba shares on your phone.

But looking at this thread, it seems that ASTRO File Manager plus its SMB Module can work even without root access (not tested by me, can't confirm). AirDroid could be another alternative to test.


As an alternative way to transfer data between them, you could try to use Ubuntu One on both your PC and your mobile device (tablet or phone).


You must log in to answer this question.

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