Mounting the Xoom in Linux (as well as adb)

Search This thread

JanetPanic

Senior Member
Oct 17, 2005
579
50
Rockville, MD
The xoom can mount just fine on Linux but it is an MTP not a Mass Storage device.

Disclaimer: I am not responsible for any damage to your device, computer, relationship, etc.... The following is meant as a guideline and worked for me but as always use your head.

I did this on my Kubuntu Maverick laptop, but it should apply to most *buntus plus debian. Other flavors should be similar, post a request and I will help if I can. I am familiar with Suse and RHEL/Centos as well but beyond those it will be guess work.

The first thing I would recommend doing is making the device read/write to normal users.
Code:
sudo touch /etc/udev/rules.d/51-android.rules 
echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"22b8\", MODE=\"0666\"" |sudo tee -a /etc/udev/rules.d/51-android.rules 
sudo /etc/init.d/udev restart
NOTE: This also "fixes" adb so it is useable with the xoom as a normal user. If that is all you want you can stop here.
NOTE 2: You could also set an OWNER rather than changing MODE but I chose the most common route for this example/

Now install either mtp-tools or mtpfs for mounting using FUSE. Since I went the fuse route that is what I will conver here. (I installed the mtp-tools package but beyond using it to debug getting mtpfs to work I have never used it before.)
Assuming you already have fuse configured, for (k|x)ubuntu or debian :
Code:
sudo apt-get install mtpfs
If you do not have fuse already configured then do that first. Look it up online if you have any questions. If you get stuck I will try and help but this post is not about how to configure FUSE.

After that it is simple. Plugin your xoom and from the command line type:
Code:
mtpfs mountpoint
and to dismount it
Code:
fusermount -u mountpoint

so in my case I mount it in a subdirectory under home called xoom
Code:
mtpfs /home/janetpanic/xoom

fusermount -u /home/janetpanic/xoom

I have confirmed moving files to and from the actual directories but not from the meta "playlists" directory. I hope that helps...

EDIT: Fixed Typo... had "(idVendor)" instead of the correct "{idVendor}"
 
Last edited:

sogrady

Senior Member
Nov 20, 2010
55
15
Thanks for sharing your workaround. Unfortunately, it's no joy here. After following the procedure described, the terminal returned no error, but on trying to open the Xoom directory via Nautilus, I received the following message:

Code:
Error: Error stating file '/home/sog/Xoom': Transport endpoint is not connected
Please select another viewer and try again.

Unmounting proceeds without error.

Distribution: Ubuntu Lucid x64
 

JanetPanic

Senior Member
Oct 17, 2005
579
50
Rockville, MD
Did you connect your xoom before or after you mounted? The most likely problem is the undeveloped configuration .

Change the line in 51-android.rules to

Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", SYMLINK+="libmtp-%k", MODE="0666"
[\code]

Restart udev and then do a "ls -lah /dev/libmtp*" with the device attached and list the output.  I need to figure out if the problem is the udev rule or elsewhere.

If the ls does not show any files then send the result of "lsusb |grep Motorola"  which better list a line or there is something weird going on.

Sent from my Xoom using XDA App
 
Last edited:

sogrady

Senior Member
Nov 20, 2010
55
15
Updated 51-android.rules as directed, then:

sog@bishop:~$ ls -lah /dev/libmtp*
lrwxrwxrwx 1 root root 15 2011-02-27 19:59 /dev/libmtp-1-4 -> bus/usb/001/004

sog@bishop:~$ lsusb | grep Motorola
Bus 001 Device 004: ID 22b8:70a8 Motorola PCS
 

ydaraishy

Senior Member
Jun 27, 2010
204
53
Wait, you aren't able to get the Xoom to mount as a mass storage device?

ed. The leaked Xoom manual suggests it support mass storage. Phew. You were scaring me there a bit.
 
Last edited:

sogrady

Senior Member
Nov 20, 2010
55
15
as far as I know, it's been confirmed that the current stack does not support mass storage, only mtp.
 

ydaraishy

Senior Member
Jun 27, 2010
204
53
Can someone try running this attached apk to see if it enables mass storage? (It just runs enable, it won't run disable, so I don't know what will happen, it might cause apps to crash but rebooting should fix it, standard disclaimers apply, you run this at your own risk, etc., etc., etc.)

I don't have a Xoom, otherwise I'd try this myself.

Relevant code snippet for those interested:
Code:
StorageManager s = (StorageManager)getSystemService(Context.STORAGE_SERVICE);
Class c = s.getClass();
Method m = null;
try 
{
   m = c.getMethod("enableUsbMassStorage", (Class[]) null);
   m.invoke(s);
} 
catch(Exception e) 
{
   // TODO Auto-generated catch block
   e.printStackTrace();
}

There may even be an easier way to achieve this -- I can't verify for myself because Honeycomb isn't in AOSP -- it doesn't work in the sim, but it might on a device: run adb shell, then run "am start -n com.android.systemui/.usb.UsbStorageActivity".
 

Attachments

  • USBEnabler.apk
    13.6 KB · Views: 192
Last edited:

bigrushdog

Inactive Recognized Developer
Apr 23, 2007
3,547
7,244
Can someone try running this attached apk to see if it enables mass storage? (It just runs enable, it won't run disable, so I don't know what will happen, it might cause apps to crash but rebooting should fix it, standard disclaimers apply, you run this at your own risk, etc., etc., etc.)

I don't have a Xoom, otherwise I'd try this myself.

There may even be an easier way to achieve this -- I can't verify for myself because Honeycomb isn't in AOSP -- it doesn't work in the sim, but it might on a device: run adb shell, then run "am start -n com.android.systemui/.usb.UsbStorageActivity".

I ran the activity manager command and it brought up the usb mass storage screen but did not mount on computer. Also ran the apk but did not mount. Awesome job though. keep fighting the good fight ;)
 

JanetPanic

Senior Member
Oct 17, 2005
579
50
Rockville, MD
Updated 51-android.rules as directed, then:

sog@bishop:~$ ls -lah /dev/libmtp*
lrwxrwxrwx 1 root root 15 2011-02-27 19:59 /dev/libmtp-1-4 -> bus/usb/001/004

sog@bishop:~$ lsusb | grep Motorola
Bus 001 Device 004: ID 22b8:70a8 Motorola PCS

Well that is interesting . You have read write privileges on the xoom. Sounds like it is a fuse configuration issue. Do you have any other fuse file systems you run?


Sent from my Xoom using XDA App
 

ydaraishy

Senior Member
Jun 27, 2010
204
53
I ran the activity manager command and it brought up the usb mass storage screen but did not mount on computer. Also ran the apk but did not mount. Awesome job though. keep fighting the good fight ;)

Damn it. Looks like I actually need a device to get it working, and the AOSP drop. It's so moronic why they disabled mass storage.

Hmm. Can someone run, from adb shell, the output from "mount", and "ls /sys/devices/platform" for me?
 
Last edited:

ydaraishy

Senior Member
Jun 27, 2010
204
53
Never mind. Mass storage has been defined out of the stingray (Xoom) kernel. It's not even in the default kernel.

To get mass storage support, be prepared to build your own kernel and reflash the device (once that's done, the am command above or the enabler app will work properly).
 
Last edited:

sogrady

Senior Member
Nov 20, 2010
55
15
I've founded a working(ish) solution. This Xoom forum post details an approach that permits transfer of video/music/etc to the Xoom via Linux.

Couple of caveats:

1. The gnomad2 application is very unstable. Crashes frequently.
2. It appears to be write-only: I have not been able to delete files from the Xoom using this interface.
 

lshantz

New member
Apr 6, 2011
1
0
Phoenix, AZ
Thanks for the instructions to connect to a xoom tablet via Linux! However, I'm using Opensuse 11.3 and 11.4 on two different systems. I did install the mtp-tools with no issues, however, there is NO file by the name of mtpfs. A search on the net does not reveal it either. Where do I get this, or what package is it part of? Thanks again. If I can't get this tablet to connect to my linux box, I will have to take it back, since I do NOT use winbloze or Mac. Pretty short sited of Motorola IMHO.
 
Last edited:

orionshock

Senior Member
Mar 4, 2011
143
8
Personally, I've given up on MTP + Linux Combo. I just use a straigt FTP transfer over wifi ( FTP Server on tablet ). It's about the same speeds.
 

stlsaint

Member
Mar 4, 2011
49
4
killeen
any headway on this...

i am getting the: Transport endpoint is not connected error still and i have no real experience with FUSE so im stuck to using windows for any transferring.
 

JanetPanic

Senior Member
Oct 17, 2005
579
50
Rockville, MD
i am getting the: Transport endpoint is not connected error still and i have no real experience with FUSE so im stuck to using windows for any transferring.

try following the directions in this thread:

http://xdaforums.com/showthread.php?t=981774

They are basically a superset of what I posted. If you still have trouble after that post in either thread (this one or that one) and I will try and help as best I can.
 

stlsaint

Member
Mar 4, 2011
49
4
killeen
followed the thread up unto the fstab part as i dont wan to edit my fstab without confirmation that it will work. But i get the exact same error with the endpoint text. I am trying this on Crunchbang linux which is based off debain the same way ubuntu is. I am probably going wrong with FUSE somehow but i have never messed with it so i dont know how to troubleshoot it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    The xoom can mount just fine on Linux but it is an MTP not a Mass Storage device.

    Disclaimer: I am not responsible for any damage to your device, computer, relationship, etc.... The following is meant as a guideline and worked for me but as always use your head.

    I did this on my Kubuntu Maverick laptop, but it should apply to most *buntus plus debian. Other flavors should be similar, post a request and I will help if I can. I am familiar with Suse and RHEL/Centos as well but beyond those it will be guess work.

    The first thing I would recommend doing is making the device read/write to normal users.
    Code:
    sudo touch /etc/udev/rules.d/51-android.rules 
    echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"22b8\", MODE=\"0666\"" |sudo tee -a /etc/udev/rules.d/51-android.rules 
    sudo /etc/init.d/udev restart
    NOTE: This also "fixes" adb so it is useable with the xoom as a normal user. If that is all you want you can stop here.
    NOTE 2: You could also set an OWNER rather than changing MODE but I chose the most common route for this example/

    Now install either mtp-tools or mtpfs for mounting using FUSE. Since I went the fuse route that is what I will conver here. (I installed the mtp-tools package but beyond using it to debug getting mtpfs to work I have never used it before.)
    Assuming you already have fuse configured, for (k|x)ubuntu or debian :
    Code:
    sudo apt-get install mtpfs
    If you do not have fuse already configured then do that first. Look it up online if you have any questions. If you get stuck I will try and help but this post is not about how to configure FUSE.

    After that it is simple. Plugin your xoom and from the command line type:
    Code:
    mtpfs mountpoint
    and to dismount it
    Code:
    fusermount -u mountpoint

    so in my case I mount it in a subdirectory under home called xoom
    Code:
    mtpfs /home/janetpanic/xoom
    
    fusermount -u /home/janetpanic/xoom

    I have confirmed moving files to and from the actual directories but not from the meta "playlists" directory. I hope that helps...

    EDIT: Fixed Typo... had "(idVendor)" instead of the correct "{idVendor}"