Android/Ubuntu mounting as USB storage device

Linux based operating system for mobile phones.
Post Reply
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Android/Ubuntu mounting as USB storage device

Post by Calum »

Hi folks,

I recently purchased a tablet PC, it connects to Ubuntu 12 no bother at all via the USB lead provided. You plug it in, click two buttons on the tablet, and it shows up as a mounted USB storage device in Ubuntu.

Great!

Now, i then got an HTC One mobile phone, with Android on it, plugged it into the computer using the USB cable provided, and it says USB connected, and MTP enabled (which i don't know what that means).

A quick google of why it isn't mounting, or apparently being seen automatically by Ubuntu only showed up things to do with MacOS, Windows 7, and/or different but similar mounting problems. Nothing close enough to my issue that i could find (i am sure the truth is out there, but...)

So. Does anybody here know how i can mount the phone as a USB device in Ubuntu? I don't even know how to check the storage capacity on the phone itself and was hoping to do that from Ubuntu.

By the way hi everyone. Sorry it's been so long (if indeed anyone's still here!) i do miss you guys, but i hardly ever have any computer problems to come and talk about anymore!

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

Hi there, long time no see :P

MTP means Media Transfer Protocol. It's the main way that most newer Android phones interface via USB with a computer, allowing your computer to browse certain folders on the phone, and transfer media files like photos, music, and videos...
and this kinda suck big time :( since we all want to fiddle with the rest of the memory too... right :)

but have a look here if you haven't seen this already: http://www.mysolutions.it/mounting-your ... on-ubuntu/ I haven't checked it thought... I just found it so don't blame me if it won't suit you :lol:

The only good thing about the new way to handle this with the SD Card is that it can use all the memory to install program on(not just the internal) but that means that you can only access it as MTP as it's always in use.
I got "some" problems with mounting this in winblows as 'USB Storage' but haven't seen anything if this in Linux...yet :P
Oh... but I use Fedora mostly if that would make any difference which I doubt.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Re: Android/Ubuntu mounting as USB storage device

Post by Calum »

thanks! that sets me on the right track, though i get lost when trying to detect the phone's VID and PID. I get a very long output (so piped it to less to get a look at it) and the first few lines show:

Code: Select all

Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.5

Listing raw device(s)
   Found 1 device(s):
   0bb4:0f64 @ bus 1, dev 9
Attempting to connect device(s)
So either there is a problem or those hexy looking numbers are the VID and PID i am looking for. In fact that's what i am going to assume. I stopped there though, due to not enough time and not enough urgency, but i will follow the rest of the configuration instructions shortly and see how i get on. MTP mode is on out of the box, so i have a feeling i just need to set it up as it says on the ubuntu end and it'll all be fine.

I actually never thought of booting into windows to see if it would mount in that with no config. This laptop came with windows so i just fdisked its partition down to the smallest workable size and forgot it was on there, but it does still "work" (if you can call waiting forever for the endless updates to install each time i log in to it) so maybe i could use that in the meantime. I'd have to move my files to the windows partition though before rebooting (since the files are going phonewards, not the other way) so maybe it's not worth the bother.

Thanks again!

Find me on facebook by the way. In fact there's even a stop microsoft group that refalm set up that i am administrator of for some reason!

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

otherwise try this place: http://forum.xda-developers.com
Best place I've seen for "all" Android phones.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Re: Android/Ubuntu mounting as USB storage device

Post by Calum »

ok, so here are my adventures.

MTP support is standard in ubuntus higher than 12, so i dist-upgraded to 13, then to 14.04. It took a day or two all in, but i used the GUI the whole way with no hitches, and it was easy, and it worked! Linux OSs have come a long way since i started using them 14 years ago.

Anyway, MTP support was fine a couple of times, then... today i attached the phone and got an error box saying there's no udev point to mount it on. A quick google search brought up a ton of weird and wonderful people with similar issues, the ubuntu issues and user responses really remind me of those from the days of MS windows, in that there's very little of use in there. Anyway, i fired up synaptic and had a look which mtp related packages i didn;t have installed, installed a couple, and you know, it didn;t make any difference because it turns out it just matters which file manager i use. I usually use thunar, however in this version of ubuntu it seems to have nautilus (or whatever the gnome one is) set as default, and sure enough it can't see the phone files, so once i figured that out, i just opened nautilus.

I must have installed something telling thunar to use dolphin to browse the phone though, because as soon as i try to open the phone root folder in thunar, it opens the folder in a separate dolphin window, which i can;t get to show image previews in the folder window, like thunar does (easily, like all other thunar configurations i have ever needed to make), so once i had set THAT to always open in a thunar window... we're golden.

In short: it works in ubuntu 14.04 if you use thunar. Thanks all! Seeya out there in computerland!

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

Good that you got it working OK :)

thunar... I'll try to keep that on mind, but I guess it ain't gonna happen... that I'll remember it that is :P I AM kinda old :? :(

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Re: Android/Ubuntu mounting as USB storage device

Post by Calum »

it's buggy as anything though. Delete commands always unmount the device, and move commands can be relied on to unmount it after one to four files (1M photos) have been transferred. I am resorting to copying files, which works apparently, and then deleting them on the phone (instead of moving them in one operation) which obviously unmounts it forcibly during the deletion part.

Why they couldn;t just leave it using USB storage i have no idea, since the interface is exactly the same from my point of view, except that this MTP thing is slow and buggy. It's hardly what i'd call progress.

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

Well... been googling about it but can't find any conclusive thing for you so... sorry... right now I'm no good :(

Hopefully the "Master of Disaster" will see this and give you the solution to it all :)


btw... have you browsed/check/searched though: http://forum.xda-developers.com/
They might have some info even though it ain't in there right now.... just sign up and ask a smart question

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Re: Android/Ubuntu mounting as USB storage device

Post by Calum »

Just a small update. In the end i gave up using MTP (though on the new phone it is slightly less slow and buggy, but not much).

I've bypassed it entirely and am now using this instead of a cable:

https://play.google.com/store/apps/deta ... letransfer

No real problems yet.

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

OK, nice :)
Gonna download that app me too

UPDATE: One superb App :D

Refalm
user
user
Posts: 38
Joined: Tue Jan 21, 2003 12:40 pm
Location: Twente
Contact:

Re: Android/Ubuntu mounting as USB storage device

Post by Refalm »

I use this one: https://play.google.com/store/apps/deta ... id.pop.pro

It costs a few bucks, but you can transfer stuff over wifi, mount smb, nfs, ftp, cloud things. Even use ldap credentials.

There's even this amazing feature where it can start an FTP server on your phone so you can get files over your network.
I know I sound like a salesman right now, but I can't live without this application anymore.

User avatar
Basher52
guru
guru
Posts: 930
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Android/Ubuntu mounting as USB storage device

Post by Basher52 »

For this I use: 'Wifi File Transfer', https://play.google.com/store/apps/deta ... sfer&hl=en
Used it and so far no cost at all.

Post Reply