[Guide] Mount Internal Storage in Ubuntu

Search This thread

roberj13

Member
Feb 28, 2010
32
23
First, I didn't know if this should go in development or general since most of the people who are going to be on Ubuntu will be devs, but hopefully this will be useful for everyone.

Honeycomb changed a lot of things. Most of the changes are awesome (as we know) but some of them have made certain things frustrating. Honeycomb marked the move from USB Mass Storage to MTP (media transfer protocol). Although for Windows users it actually works pretty well, for Linux users it doesn't...at least at first.

If anyone has hooked up their Xoom to a Ubuntu box then they know at first nothing happens. There is no selection on the tab to "mount" USB Mass Storage because it is not supported (which I thought Honeycomb was supposed to support both so this may change) It's like the computer doesn't even recognize anything is plugged in.

So this was very frustrating but I have put together a solution. Previously I was using a GUI interface called gMTP to connect to the Xoom and transfer files. This was an ok solution and it worked but I would still rather just use it in Nautilus like every other drive I use. Ok so starting here I will just post the commands and then explain after so no code gets lost.

Start with installing a needed program for all of this to work
Code:
sudo apt-get install mtpfs
Next we will create the device rules, so Ubuntu recognizes it as a USB device.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
NOTE: Some of you may have already added the Vendor ID. If you don't this file will start off blank and then you need to add this next line. If it does not come up blank, then make sure you have a line with Vendor ID 22b8 and 18d1 (for bootloader which uses a different VendorId) and you are all set.

Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
You might need to start a new terminal for this change to take effect for adb and bootloader access.

make the mount point and take ownership:
Code:
sudo mkdir /media/xoom
sudo chown user:user /media/xoom

NOTE: "user" in the above code is literally your user name for your box.

ANOTHER NOTE: if you stopped here you could mount by typing mtpfs /media/xoom -o allow_other and unmount by typing fusermount -u /media/xoom...but that's no fun

add the mount point to your fstab:
Code:
sudo gedit /etc/fstab
In the first unused line available you might want to type a comment like:
Code:
# mount point for moto xoom
then add this line after it:
Code:
mtpfs     /media/xoom     fuse     user,noauto,allow_other      0      0
Next modify fuse.conf to allow_other:
Code:
sudo gedit /etc/fuse.conf
uncomment the last line which should read:

Code:
#user_allow_other
uncomment this line by removing the '#' symbol.

add your user to the fuse group:
Code:
sudo gedit /etc/group
a long file will open, press CTRL+F to bring up the find dialog and type
Code:
fuse
close the dialog and fuse should be selected and visible.
At the end of that line with no space add your user name.

Save that file. Close it.

Lastly reboot your computer.

Now when your computer restarts, if you look at your "Places" menu you will see a Drive marked with 'xoom'

Plug in your xoom, and click on xoom in Places.

Nautilus should open with all your files that you have on your device. It will also place a mounted drive icon on your desktop. If you would like to unmount, right click on that icon and click unmount.

As you can see this was a pain for me, but hopefully this solution will work for everybody. I know the instructions are really long but follow it and you will feel old school mounting your storage in your file browser.

NOTE: THIS WAS TESTED ON UBUNTU 10.10 ONLY, IF THIS WORKS FOR ANYONE ELSE PLEASE POST YOUR FINDINGS.

Also, I am fairly new to Linux actually, so if there is an easier way to mount the storage in nautilus let me know. This works for me and I just want to help out so please no flames.
 
Last edited:

roberj13

Member
Feb 28, 2010
32
23
Couple things I have also noticed with MTP, when you have the internal storage "mounted" you still actually have access to the files on the device. Plus the file transfer is a lot faster. Usually I had been getting about 4 Mb/s and now I get about 15. Of course this speed difference from what I am used to might be the internal storage vs. SDCard transfer rate diffs.

Last thing, is this might need to modified when the sdcard access comes since there is only one mount point specified.
 

roberj13

Member
Feb 28, 2010
32
23
not trying the artificial bump.

I guess no comments on 228 views means this is working?

Can someone chime'in if this worked for them so I can know'if it works'as is or needs to be tweaked.

Thanks
 

bigrushdog

Inactive Recognized Developer
Apr 23, 2007
3,547
7,244
I got mount up and running last night. Works like a champ. Great work. I was tired of pushing and FTP.
 

roberj13

Member
Feb 28, 2010
32
23
Thanks for the reply. Glad it worked for you too. One thing I need to add tonight to it is the fact that the xoom uses a different vendor'id when it's in the bootloader. The one vendor id if used alone will not recognize the xoom to use fastboot but ill update it when I get home.
 

quordandis

Senior Member
FWIW, the "mtpfs" package in 10.04 was broken when using the Xoom, and causing segfaults. I found the source and rebuilt that and now it's working OK.

So, I'm on 10.04 and not getting segfaults, but after pugging in (xoom is in usb debug mode) and click on xoom in places, ubuntu gives me the error "could not open location file:///media/xoom. Error stating file '/media/xoom': Permission denied"

Would love to get a copy of your recompiled 10.04 mtpfs package as a deb file...
 

Droid-Xer

Senior Member
Oct 4, 2010
135
26
El Paso
Most excellent guide!! Thanks you for taking the time to figure this out. I'm on 10.10 so I have nothing else to add.
 

filterking

Member
May 23, 2007
30
3
Works flawless on Ubuntu 10.10 running on an older Mac Pro
Thank you for posting the easy to follow guide.
 

sogrady

Senior Member
Nov 20, 2010
55
15
This is semi-working for me in that I can successfully mount and browse the device, but there are a few problems. One, it locks up Nautilus for 30-60 seconds (grayed out and unresponsive) though it does come back. Two, file transfer speeds are very poor.

I'm trying to load two movies totaling 1 GB right now and the copy dialog says 2hrs 56 min to transfer w/ a speed of 99.7 kb / sec. This is unreliable, however, as the copy dialog is frozen on those metrics.

Build is AMD64, distro is 10.10 upgraded from 10.4.

I appreciate the effort to document this, in spite of my issues. Let me know if anyone has suggestions for a fix and I'll try them.
 

sogrady

Senior Member
Nov 20, 2010
55
15
One day later and this solution is now working for me. The Xoom filesystem behaves oddly in Nautilus, with some files not appearing that have in fact been transferred to the device, but otherwise this is the best solution I've found.
 

orionshock

Senior Member
Mar 4, 2011
143
8
One day later and this solution is now working for me. The Xoom filesystem behaves oddly in Nautilus, with some files not appearing that have in fact been transferred to the device, but otherwise this is the best solution I've found.

I find it odd that Android dosn't play nicely with *nix.. considering they are cousins in the OS family. That it works sooo well with Windows instead offensive IMO
 

bigrushdog

Inactive Recognized Developer
Apr 23, 2007
3,547
7,244
One day later and this solution is now working for me. The Xoom filesystem behaves oddly in Nautilus, with some files not appearing that have in fact been transferred to the device, but otherwise this is the best solution I've found.


I've seen the same thing. Usually an unmount then mount will clear it up.
 

Crimton

Senior Member
Apr 30, 2010
809
30
Nashville
this did not work for me. i'm getting no application is registered as handling this file

i told nautilus to open it and its saying /media/xoom is not a folder
 
Last edited:

bbaldino

Member
Jun 5, 2009
16
0
Using this guide I'm able to mount fine, but I'm seeing a couple issues:

I have my music organized like this:
Artist
-----Artist - Album
----------Music files

When I copy over the top 'Artist' directory to the Xoom's Music folder it works, but, all of the music files have been directly placed in the Xoom's Music folder and the Artist and Artist - Album folders are empty, seems pretty weird?
EDIT: It looks like the Xoom (or MTP?) forces all music files into the root of the Music directory. Even if I try copying the artist folder to the root of the device the mp3 files end up in the Music folder.
EDIT take 2: Nevermind...the Android docs say nested directories are supported for music, and Windows preserves the directory structures fine.

I'm totally unable to copy over movies. I've transcoded a file into mp4 and it seems to copy over but, once the copy is finished the file doesn't show up on the Xoom.
EDIT bonanza: Looks like I'm also able to copy over movies fine through windows...so I guess all my problems are Linux related.
 
Last edited:

Kah-Neth

Senior Member
Dec 6, 2008
51
2
I keep gettting a "Transport endpoint is not connected" error when I try this. I am using 10.04 64-bit. Does anyone know how to resolve this?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    First, I didn't know if this should go in development or general since most of the people who are going to be on Ubuntu will be devs, but hopefully this will be useful for everyone.

    Honeycomb changed a lot of things. Most of the changes are awesome (as we know) but some of them have made certain things frustrating. Honeycomb marked the move from USB Mass Storage to MTP (media transfer protocol). Although for Windows users it actually works pretty well, for Linux users it doesn't...at least at first.

    If anyone has hooked up their Xoom to a Ubuntu box then they know at first nothing happens. There is no selection on the tab to "mount" USB Mass Storage because it is not supported (which I thought Honeycomb was supposed to support both so this may change) It's like the computer doesn't even recognize anything is plugged in.

    So this was very frustrating but I have put together a solution. Previously I was using a GUI interface called gMTP to connect to the Xoom and transfer files. This was an ok solution and it worked but I would still rather just use it in Nautilus like every other drive I use. Ok so starting here I will just post the commands and then explain after so no code gets lost.

    Start with installing a needed program for all of this to work
    Code:
    sudo apt-get install mtpfs
    Next we will create the device rules, so Ubuntu recognizes it as a USB device.
    Code:
    sudo gedit /etc/udev/rules.d/51-android.rules
    NOTE: Some of you may have already added the Vendor ID. If you don't this file will start off blank and then you need to add this next line. If it does not come up blank, then make sure you have a line with Vendor ID 22b8 and 18d1 (for bootloader which uses a different VendorId) and you are all set.

    Code:
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
    You might need to start a new terminal for this change to take effect for adb and bootloader access.

    make the mount point and take ownership:
    Code:
    sudo mkdir /media/xoom
    sudo chown user:user /media/xoom

    NOTE: "user" in the above code is literally your user name for your box.

    ANOTHER NOTE: if you stopped here you could mount by typing mtpfs /media/xoom -o allow_other and unmount by typing fusermount -u /media/xoom...but that's no fun

    add the mount point to your fstab:
    Code:
    sudo gedit /etc/fstab
    In the first unused line available you might want to type a comment like:
    Code:
    # mount point for moto xoom
    then add this line after it:
    Code:
    mtpfs     /media/xoom     fuse     user,noauto,allow_other      0      0
    Next modify fuse.conf to allow_other:
    Code:
    sudo gedit /etc/fuse.conf
    uncomment the last line which should read:

    Code:
    #user_allow_other
    uncomment this line by removing the '#' symbol.

    add your user to the fuse group:
    Code:
    sudo gedit /etc/group
    a long file will open, press CTRL+F to bring up the find dialog and type
    Code:
    fuse
    close the dialog and fuse should be selected and visible.
    At the end of that line with no space add your user name.

    Save that file. Close it.

    Lastly reboot your computer.

    Now when your computer restarts, if you look at your "Places" menu you will see a Drive marked with 'xoom'

    Plug in your xoom, and click on xoom in Places.

    Nautilus should open with all your files that you have on your device. It will also place a mounted drive icon on your desktop. If you would like to unmount, right click on that icon and click unmount.

    As you can see this was a pain for me, but hopefully this solution will work for everybody. I know the instructions are really long but follow it and you will feel old school mounting your storage in your file browser.

    NOTE: THIS WAS TESTED ON UBUNTU 10.10 ONLY, IF THIS WORKS FOR ANYONE ELSE PLEASE POST YOUR FINDINGS.

    Also, I am fairly new to Linux actually, so if there is an easier way to mount the storage in nautilus let me know. This works for me and I just want to help out so please no flames.
    1
    Linux users deserve to be able to transfer files to :/

    THIS ^^^

    Sent from my ADR6400L using XDA App