-->

Thursday, September 26, 2013

Transferring files between your Linux box and your Android device

There are a few ways to share files over wifi between your Linux machine and your Android device. The first method I used was to set up a web server on my CentOS box and then browse to it on the Android. This wasn't an ideal solution for a number of reasons, one being that the transfer worked in only one direction (from the web server to the Android) and the second being it was a solution too complicated for most Android users.

The second solution was much better, an app (free) at play.google.com called Software Data Cable. It's essentially an ftp server that runs on Android (version 2.1 and above— it was nice of the developers to backport it). Once installed, you simply start it running and then you can transfer files back and forth between your Android and Linux over wifi. Software Data Cable allows you to configure a password to access the server. Still I still don't leave it running all the time due to security concerns. It's simple enough just to fire it up when needed.

On the Linux side, open up two nautilus windows, one being Panel -> Places -> Network Places -> your Android's IP address, the other being your Home directory or Desktop or whatever. Then you can transfer files back and forth just by dragging and dropping them from one window into the other— in either direction. I've also found Software Data Cable to be the easiest way to rename files on Android: Right-click on the filename, select Rename, and type in the new name. If, in this process, Android gets confused about the contents of a local directory, on Android exit that directory to its parent, then go back into it. This seems to force a reread of the directory contents, bringing the cosmos back to sanity.

It would be nice to be able to use Software Data Cable to set up a file server for a group of people. In a sense, it already does this except, with no limits on who could download what, people can access files and/or directories everywhere, including your confidential information. A proper ftp server would institute limits on which users could access which files and directories. Perhaps we'll see this further development in future.