Thursday, April 21, 2011

Using Samba File Shares on Android with CifsManager

   I've been writing a lot of phone related posts lately because I'm still in the honeymoon phase with my new Android phone, the HTC Inspire 4G. I'm always researching tech and when I get a toy as powerful as a modern smartphone I'm definitely going to see what I can do with it. One of the issues I ran into after installing CyanogenMod 7 on my phone is that the video player, unlike the stock HTC one, won't play files off a Samba file server. While I can use ES File Explorer, my preferred file manager, to stream some video formats it requires copying them to the SD card first. The best way to solve this problem is to make the video player think the remote server is a local folder on the SD card, using the CifsManager app.

   I've been running a Linux-based Samba file server off an old junk desktop for half a decade now, mostly to stream video to my hacked Xbox running XBMC. Getting Windows, Linux and Mac computers to see and work with that Samba file server has never been an issue, and I'm happy to see how easy it is to get Android working with Samba, at least on CyanogenMod 7. Stock ROMs may not include a cifs.ko kernel module needed to mount Samba shares.

   On CyanogenMod and other ROMs that come with the required kernel module all that's needed is to install CifsManager from the market and tell it the network path to your Samba or Windows file share. On more locked down stock ROMs you can either hunt down a working cifs.ko file for your device on XDA or see if you can install a custom ROM that includes this feature. RockPlayer or MoboPlayer are probably the best video players to use alongside CifsManager as they can play back formats like xvid that the stock CyanogenMod video player can't.

   There are some interesting possibilities that open up with this. It's like having a local Dropbox on steroids, since the only limit to how much storage you can access is how big the drives in your servers are. Video streaming is the obvious use, and it's primarily what I use this for, but network backups from your phone to a safe local server or recording video and audio directly to your server should be possible if you have write access to the file share. You could use CifsManager to stream all your music from a local Windows box without needing to setup any extra audio-streaming software beyond simple Windows file sharing. The only limit here is the speed and range of your wifi.

   While this is limited to local use over wifi on my home network since I'm usually in range that's ok. I suppose I could set things up so I could mount the Samba shares over the cell network but I'd burn through my 200MB AT&T plan so fast it would make my head spin. I could also look into using SSH and FUSE to accomplish the same thing, but CifsManager makes it so easy I can't bother.

No comments:

Post a Comment