Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,769,165 Members 37,647 Now Online
XDA Developers Android and Mobile Development Forum

Mounting the Xoom in Linux (as well as adb)

Tip us?
 
JanetPanic
Old
(Last edited by JanetPanic; 27th February 2011 at 05:10 PM.)
#1  
Senior Member - OP
Thanks Meter 50
Posts: 589
Join Date: Oct 2005
Location: Rockville, MD
Default Mounting the Xoom in Linux (as well as adb)

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}"
The Following 3 Users Say Thank You to JanetPanic For This Useful Post: [ Click to Expand ]
 
sogrady
Old
#2  
Member
Thanks Meter 12
Posts: 32
Join Date: Nov 2010
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
Old
(Last edited by JanetPanic; 28th February 2011 at 12:31 AM.)
#3  
Senior Member - OP
Thanks Meter 50
Posts: 589
Join Date: Oct 2005
Location: 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
 
sogrady
Old
#4  
Member
Thanks Meter 12
Posts: 32
Join Date: Nov 2010
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
Old
(Last edited by ydaraishy; 28th February 2011 at 02:56 AM.)
#5  
Senior Member
Thanks Meter 54
Posts: 204
Join Date: Jun 2010
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.
 
sogrady
Old
#6  
Member
Thanks Meter 12
Posts: 32
Join Date: Nov 2010
as far as I know, it's been confirmed that the current stack does not support mass storage, only mtp.
 
ydaraishy
Old
#7  
Senior Member
Thanks Meter 54
Posts: 204
Join Date: Jun 2010
Quote:
Originally Posted by sogrady View Post
as far as I know, it's been confirmed that the current stack does not support mass storage, only mtp.
Which stack, Linux or Honeycomb's? Where is it confirmed?

Non-working mass storage is a potential deal breaker.
 
sogrady
Old
#8  
Member
Thanks Meter 12
Posts: 32
Join Date: Nov 2010
honeycomb's. see here or here for details.
 
ydaraishy
Old
#9  
Senior Member
Thanks Meter 54
Posts: 204
Join Date: Jun 2010
Thanks for the links.

This is a real WTF.
 
ydaraishy
Old
(Last edited by ydaraishy; 28th February 2011 at 07:58 AM.)
#10  
Senior Member
Thanks Meter 54
Posts: 204
Join Date: Jun 2010
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".
Attached Files
File Type: apk USBEnabler.apk - [Click for QR Code] (13.6 KB, 172 views)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Remote Control Your Android Device with Monitordroid

The Android OS showsgreat potential in many areas. One of most interesting things that … more

Intel Partners with Unity to Support Android on Intel-Based Devices

Intel, largely known for their long-standing reputation as the king of … more

Device Review: Samsung Gear Live

Recently, Google announced Android Wear to the world. Android Wear is the Android-based initiative from … more

Forums Added for the Nvidia Shield Tablet and Sharp Aquos Crystal

Just a few days ago, wetook an in depth look at theNvidia Shield Tabletand … more