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.
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.
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
I got mount up and running last night. Works like a champ. Great work. I was tired of pushing and FTP.
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.
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.
kcrudup said:
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.
Click to expand...
Click to collapse
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...
I found this deb package for mtpfs 0.9-1 that you can try
mtpfs_0.9-1_amd64.deb
roberj13 said:
I found this deb package for mtpfs 0.9-1 that you can try
mtpfs_0.9-1_amd64.deb
Click to expand...
Click to collapse
Unfortunately, that's not gonna work for me. I'm 32-bit.
Ill keep looking, for some reason the 64-bit was the only one there.
roberj13 said:
Ill keep looking, for some reason the 64-bit was the only one there.
Click to expand...
Click to collapse
Thanks! If i could ge this to work, it would totally be awesome!
--Q
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.
Works flawless on Ubuntu 10.10 running on an older Mac Pro
Thank you for posting the easy to follow guide.
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.
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.
sogrady said:
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.
Click to expand...
Click to collapse
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
sogrady said:
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.
Click to expand...
Click to collapse
I've seen the same thing. Usually an unmount then mount will clear it up.
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
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.
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?
i already set up adb and the sdk
now i need help setting up udev.
can anyone please explain it to me in a way a noob can understand?
teh5abiking said:
i already set up adb and the sdk
now i need help setting up udev.
can anyone please explain it to me in a way a noob can understand?
Click to expand...
Click to collapse
Here you go.
Yeah, I tried that tutorial.
Didn't work for me.
Sent from my T-Mobile G2 using XDA App
I installed 11.04 recently and ADB seemed to work right out of the box.
Have you tried:
Code:
adb devices
I grepped the rules.d directory for 0bb4 and came up with this, in 40-usb-media-players.rules
Code:
ATTRS{idVendor}=="0bb4" , ATTRS{idProduct}=="0c94" , ENV{ID_MEDIA_PLAYER}="htc_vision"
"lsusb" returns (among other devices)
Code:
Bus 002 Device 007: ID 0bb4:0c91 High Tech Computer Corp.
Note that the product ID is different.
For 10.10, I think I had to update the udev files, but support for the vision might already be baked into 11.04. If "adb devices" returns a serial number, you're all set. If it doesn't let us know what pops up.
I found this:
http://eddieringle.com/udev-rules-for-adb-in-ubuntu-11-04-natty-narwhal/
I'm not sure what to say? I don't have the 99-android rules and adb works fine. Maybe you didn't have enough permissions to change the udev files when you installed ADB/SDK?
maybe reboot or restart udev or unplug/plug your device?
Code:
sudo service udev restart
I don't see how it didn't work. That tutorial worked for me just fine.
Sent from a Western Union telegram.
You need to reboot your computer for it to work.
Sent from my HTC Vision using XDA Premium App
Well, I did get adb to work just fine on my Acer Aspire One.
I had to mix the tutorial on the Cyanogenmod wiki with a tutorial that was for the G1/Magic/Droid/N1/i7500.
It's working great.
The one on the android dev page didn't work for me because of some deep internal stuff that was going on with my laptop. as explained by my good friend Chris who's actually a registered Android developer. I forgot exactly what it was, but it had to do with the security features of Ubuntu that collide with something that's in my laptop.
For others looking for info with adb on natty, the SYSFS is deprecated (if you are following the tutorial on the android site). You should be using ATTRS instead. Also, the rule can be 51 or 99.
Here is mine (i have an nvidia pad and an htc phone):
Code:
[email protected]:/etc/udev/rules.d$ cat 51-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
And don't forget to restart udev. Unplug the device, do the command below and then plug back in. HTH.
Code:
sudo /etc/init.d/udev restart
I'm trying to get my system back to where it was before I lost everything. My files, notes, tools, etc. were gone but I've managed to get about 80% of it up again. In order to get my computer to talk to my VK815, I'm pretty sure I need a good udev rule. I think there's also a modeswitch script that needs to run when it's plugged in but that info was lost in the disaster. I have the linux development setup back to where I can compile AOSP and I get the tools like adb and fastboot as compilation products, but can't get the VK815 and computer to talk to each other. Any and all help is most welcome.
Thanks,
Jim
I guess there's some good news here. I was able to reconstruct two udev rules; one to modeswitch (which may or may not be necessary) and the other to symlink to ttyUSB0. With the phone in the normal (not download) mode, dmesg shows it initially as idProduct 6292 (where it attempts to feed the Micro$oft drivers) and then it changes to 6293 and symlinks ttyUSB0. After this completes, 'adb devices' shows a blank list. I'm in the developer mode on the tablet with USB Debugging enabled and the Build Version is LRX22G.
Ideas anyone?
edit: Be sure to turn on USB tethering in Wireless Networks -> More
Turns out that the usb_modeswitch rule wasn't needed. Here's the rule I put into /lib/udev/rules.d/51-vk815.rules
# LG G-Pad 8.3
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
After adding this rule, restart udev the way your version of linux wants you to.
Plug in the USB cable and wait for the VK815 to finish loading the Windoze drivers and change idProduct to 6293.
Now, adb devices "should" show you the device ID. It did on mine.
This can easily be made harder than it should be.
Still can't get the VK815 to become a ttyUSB device when it's in the download mode. Tried adding SYMLINK+="ttyUSB%n" to the udev rule without success. Gotta have this to squirt and image.
When this is done and working, I plan on making a step-by-step for future reference.
Jim
So up until now, I've been using a small windows image just to work with adb on my OP5T but am kind of wanting to just move on and get this thing working on my main machine, which is installed with Gentoo.
The problem I'm having is having it even see the OP5T and I can't figure out why. I'm hoping someone here can help out. I've done this with many other phones, but the OP5T Is the only one giving me trouble
Yes I've emerged android tools
As of right now, here is the line I've added to /etc/udev/rules.d/51-android.rules:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", ATTR{idProduct}=="9011", MODE="0666", GROUP="plugdev"
Where I got this? `lsusb` shows:
Bus 003 Device 004: ID 2a70:9011
It's the only device that shows up or is removed when I unplug the phone (although it has no label for some reason).
I've even attempted another file I've had to use for other android devices, 80-android.rules and placed the line in there.
I have also removed idProduct from the line just to see if that was conflicting. No luck. Yes, my user is in the plugdev group.
So yeah, I'm out of ideas. Anyone got anything?
I've tried everything to my knowledge including doing multiple google searches but I can't figure this out. I recently switched to Linux Mint 19 from Ubuntu 18.10 and I'm having issues getting my device to properly work using ADB. I have created the proper rules (to my knowledge) in /etc/udev/rules.d/51-android.rules and also added vendor id in ~/.android/adb_usb.ini. The main issue I seem to be having here is that after I revoke USB debugging authorizations from developer settings, I do not get the pop up on my device to allow authorization. I've tried restarts of my phone and PC but it still shows as unauthorized when typing adb devices. Any help would be appreciated. Also, just noticed I was missing some spaces in 51-android.rules I fixed but that did not fix it.
Triscuit said:
I've tried everything to my knowledge including doing multiple google searches but I can't figure this out. I recently switched to Linux Mint 19 from Ubuntu 18.10 and I'm having issues getting my device to properly work using ADB. I have created the proper rules (to my knowledge) in /etc/udev/rules.d/51-android.rules and also added vendor id in ~/.android/adb_usb.ini. The main issue I seem to be having here is that after I revoke USB debugging authorizations from developer settings, I do not get the pop up on my device to allow authorization. I've tried restarts of my phone and PC but it still shows as unauthorized when typing adb devices. Any help would be appreciated. Also, just noticed I was missing some spaces in 51-android.rules I fixed but that did not fix it.
Click to expand...
Click to collapse
Try this
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot
If after that you type adb devices and you don't see your serial number type
echo 0x2717 >> ~/.android/adb_usb.ini
Just something I googled...
Tulsadiver said:
Try this
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot
If after that you type adb devices and you don't see your serial number type
echo 0x2717 >> ~/.android/adb_usb.ini
Just something I googled...
Click to expand...
Click to collapse
The first two commands are to install adb and fastboot, which I've done. The third command is to add a new product id in adb_usb.ini which I got "permission denied" so I entered it manually for ****s and giggles but it didn't help. Thank you though!
I was finally able to get the device to authorize, I did a few things but I'm not sure which one corrected the problem, first. I deleted the adbkey file from /home/.android folder, I also changed permissions of the folder to rw-rw-rw and finally I hit "Revoke USB debugging authorizations" under development settings WHILE the phone was plugged into the computer. Every other time I had done it after unplugging the device. Not sure which one worked but it did, now I can get back to flashing again!
Sent from my Pixel 2 XL using XDA Labs
I had to go back in time to find this.. but this was how I originally was able to get things going in Ubuntu... It's very dated but I'm sure some of this may work?
https://forum.xda-developers.com/showpost.php?p=39144762&postcount=2
jbarcus81 said:
I had to go back in time to find this.. but this was how I originally was able to get things going in Ubuntu... It's very dated but I'm sure some of this may work?
https://forum.xda-developers.com/showpost.php?p=39144762&postcount=2
Click to expand...
Click to collapse
Yep I honestly think my problem was that I was unplugging my device before revoking authorizations..... Silly me haha
Sent from my Pixel 2 XL using XDA Labs