2

I have an Android device (ICS) and it is visible and perfectly usable via ADB in Ubuntu 12.04. However Ubuntu can't mount it.

I can't find it on /mnt or /media. How is that possible?

I know there are tools for mounting in Ubuntu like Go-mtpfs but I don't understand how the device is connected perfectly with ADB and not mounted in Ubuntu.

Any ideas?

1

Android allows mounting of removable media over USB. Before the storage media is mounted on the host computer, the Android device unmounts it to ensure that only a single system has the storage media mounted at a time. That works fine for removable media.

When an Android device has only internal memory without any removable media (like the Galaxy Nexus and newer Nexus devices), the device cannot unmount its internal memory to let the host computer mount it. The Android OS requires use of the internal memory. Hence, mounting over USB does not work.

Some devies with internal memory only (like the Nexus S) worked around this problem by providing a separate storage partition not required by the Android OS. That separate partition could be unmounted by Android and allowed to be mounted on the host computer. Multiple storage partitions make it harder for users to manage their storage space. That is, one partition may fill up first while there is plenty of space in the other partition. So recent Nexus devices come only with a single partition in their internal memory which cannot be directly mounted on the host computer.

With such devices, mounting the internal memory on the host computer can be achieved with go-mtpfs using MTP and FUSE. I have tested the following on Ubuntu 12.04.1.

Setup:

$ sudo apt-get install golang fuse git-core libmtp-dev libfuse-dev
$ mkdir /tmp/go-mtpfs
$ export GOPATH=/tmp/go-mtpfs
$ go get github.com/hanwen/go-mtpfs
$ sudo mv /tmp/go-mtpfs/bin/go-mtpfs /usr/bin/
$ sudo adduser $USER fuse

Mount an Android device:

$ mkdir /tmp/AndroidDevice
$ go-mtpfs /tmp/AndroidDevice &

Use the mounted filesystem:

$ ls /tmp/AndroidDevice
Internal storage
$ ls /tmp/AndroidDevice/Internal\ storage/
...

Unmount:

$ fusermount -u /tmp/AndroidDevice

References:

  1. http://www.androidpolice.com/2011/11/18/impromptu-qa-session-with-android-engineer-dan-morrill-brings-to-light-reasons-behind-galaxy-nexus-lack-of-usb-mass-storage/
  2. http://blog.itsbilal.com/2012/12/connect-an-android-4-0-phonetablet-to-ubuntu-the-reliable-way/
| improve this answer | |
  • You can edit your post with the added information in your comment. And please also include a summary of the instructions in your answer - an answer should stand on its own without a link (EG, should have instructions), and links are best used to back up what you've said. – dotVezz Feb 3 '14 at 19:22
  • @dotVezz, My reputation does not allow me to include more than 2 links in my answer. The questioner said that he is aware of go-mtpfs. Hence I did not give detailed instructions for using go-mtpfs as an answer. He is asking why mounting does not work. He is not asking how to mount. – apricot Feb 3 '14 at 19:30
  • I didn't realize that low-rep users had a link limit. Still, if you feel that linking to instructions for go-mtpfs is pertinent, then I feel that writing them is pertinent. – dotVezz Feb 3 '14 at 20:56
  • @dotVezz, I deleted my comment and add it to the answer. – apricot Feb 4 '14 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.