Sony Updates AOSP Sources to Android 5.0.1

Just a few days ago, Sony did an utterly fantastic job by pushing out numerous device trees for … more

Stop Your Screen From Turning Off with KeepItOn

We all know the feeling of reading a news article orrather longdocument, when our screen … more

The XDA LG QPair Developer Challenge Voting Has Begun!

It seems like it was just yesterday that weannounced that we had paired up with LGto … more

Major Update for the Sony Smartwatch 2 Brings DND and More

With the wearables landscape now dominated by Android Wear and Pebble, its … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Mounting the Xoom in Linux (as well as adb)

OP JanetPanic

27th February 2011, 04:52 PM   |  #1  
OP Senior Member
Flag Rockville, MD
Thanks Meter: 50
 
589 posts
Join Date:Joined: Oct 2005
More
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 by JanetPanic; 27th February 2011 at 06:10 PM.
The Following 3 Users Say Thank You to JanetPanic For This Useful Post: [ View ]
28th February 2011, 12:32 AM   |  #2  
Member
Thanks Meter: 16
 
49 posts
Join Date:Joined: 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
28th February 2011, 01:24 AM   |  #3  
OP Senior Member
Flag Rockville, MD
Thanks Meter: 50
 
589 posts
Join Date:Joined: Oct 2005
More
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 by JanetPanic; 28th February 2011 at 01:31 AM.
28th February 2011, 02:04 AM   |  #4  
Member
Thanks Meter: 16
 
49 posts
Join Date:Joined: 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
28th February 2011, 03:44 AM   |  #5  
Senior Member
Thanks Meter: 54
 
204 posts
Join Date:Joined: 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.
Last edited by ydaraishy; 28th February 2011 at 03:56 AM.
28th February 2011, 04:32 AM   |  #6  
Member
Thanks Meter: 16
 
49 posts
Join Date:Joined: Nov 2010
as far as I know, it's been confirmed that the current stack does not support mass storage, only mtp.
28th February 2011, 04:43 AM   |  #7  
Senior Member
Thanks Meter: 54
 
204 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by sogrady

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.
28th February 2011, 05:03 AM   |  #8  
Member
Thanks Meter: 16
 
49 posts
Join Date:Joined: Nov 2010
honeycomb's. see here or here for details.
28th February 2011, 05:13 AM   |  #9  
Senior Member
Thanks Meter: 54
 
204 posts
Join Date:Joined: Jun 2010
Thanks for the links.

This is a real WTF.
28th February 2011, 08:36 AM   |  #10  
Senior Member
Thanks Meter: 54
 
204 posts
Join Date:Joined: 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)
Last edited by ydaraishy; 28th February 2011 at 08:58 AM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes