• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Copying files between your GNex and a *LINUX* computer

dzuckman

Newbie
So sooner or later, I'd imagine nearly everyone here's going to want to copy files between their new GNex and a computer. It's definitely a "Day-1" task for me. I have a lot of stuff on my OG Droid's SD card that I want to copy over to the new GNex.

My workstation is a Linux laptop and so I'm interested in getting this to work smoothly for Linux. Transferring files to and from Windows is a different task for a different thread.

The first thing to be aware of is that ICS does not support USB "Mass Storage" mode, for various reasons covered well elsewhere. So, you can't mount your SD card as a USB drive and access it that way. Instead, ICS support MTP, which is a Microsoft standard.

Most Linux workstations don't have MTP drivers installed out-of-the-box, so I went ahead and installed them and then tried to mount the phone as an MTP resource. I got as far as being able to see the files on my GNex, but I was not able to write to the phone. In fact, when I tried to do that, it seemed to screw up the MTP mount, and then I could not access the phone at all any more.

MTP wasn't playing nicely with my machine so I thought I'd try a different protocol: FTP. I installed SwiFTP, free from the Market, and started an FTP server. I then tried to copy files to the phone with the normal Nautilus file explorer. This would only copy one file and then hang. The file would get there but Nautilus would simply stop copying. I then tried the same thing with FileZilla, which is a dedicated FTP client, and this seems to be working. I don't feel like this is the 'best' way, ICS has MTP built-in and I should not have to resort to another protocol and outflank it.

(TL,DR jump here:) So, my best working option so far is: SwiFTP and FileZilla.

I'd really like to know why the MTP drivers don't seem to be working properly, and if anybody has their Linux box connected via MTP, I'd love to hear some pointers on how to get it to work properly.
 
You're totally right, MTP support on Linux isn't that great. Here's some additional info I posted to reddit that might help if you're transferring a lot of stuff: MTP on Linux not working great? Use VirtualBox + VirtualBox Extensions + Windows 7 : Android

To more immediately address your concerns, what version of libmtp are you using? I experienced similar issues with 1.1.0, but writing worked afted I updated to 1.1.1.

Also, I think you'll find that a combination of sshfs on your laptop and SSHDroid on your phone to be more satisfactory than an FTP approach.
 
I updated libmtp to 1.1.1 and now see - Playlist and Music and some of the Music Folders.... not all - just some... Actually I checked out the mtpfs homepage and it only supports media files and does display a directory called Playlist - its a virtual directory for creating playlists:confused:

This is very strange - its now working - sort of - I can see all folders - but I cannot add files or directories - go figure..

If I put the phone in PTP mode it works fine - (although some times Nautilus crashes) and restarts itself - gets into a bit of a loop. in PTP mode I can copy files and Directories...

At this point with libmtp 1.1.1 and Android 4.0.1 I say it does not work -

Neither the File browser mode (MTP) nor in PTP mode is it any way reliable and it does not work in Windows 7 either - so I guess it might actually be the Phone ATM - we see after the 4.03 update...

Ok have found the reason for the inconsistent behaviour - had a typo in the Udev definition for

SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685c", MODE=="0666", OWNER=="kylea"

I had

SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685c", MODE="0666", USER=="kylea"
 
Back
Top Bottom