Mount Samba Shares On Galaxy Note 10.1

I have a file  server with bunch of stuff stored there, this server is accessed by Windows and Linux machines. Because not only media is shared I did not chose DLNA but plain simple SMB shares.

Have to say if you just want to play movies from Samba share, use BSPlayer or MX Player – they both support streaming from SMB server without need to download movie to your device, much easier than setting up for proper SMB mounting.

Now I also have couple of Android devices and one of them is rooted Galaxy Note 10.1 16GB Wifi/3G (N8000). Have been thinking of making it able to mount Samba shares for quite a while already and finally decided that this is the day.. Would be nice to play movies & music streaming directly from server via Samba, right?

Well, 4 or 5 hours after I started this adventure my Galaxy Note was able to play content from the server over Wifi pretty decently. Hopefully with the info provided below next time it won’t take as much time from me or whoever is reading this.

What you need:

  • Rooted N8000 device with Android 4.1.2
  • These kernel modules (took correct versions for 4.1.2 from this thread)
  • Script that installs modules

Script have to be placed into /etc/init.d just don’t forget to chmod this file to make it executable. Also my device did not have /system/lib/modules folder so I had to create it and put modules there. Used SManager Android app for copying files to read-only partitions and making new directories on those partitions.

Finally when device reboots and modules are installed it is time for CifsManager app. That was my biggest issue and the thing I have lost 90% time on.. Mounted share was visible *only* to the root. All other apps either showed it empty or gave permissions errors.

I will skip the details, here are the options you have to specify for the share you are going to mount:
file_mode=0777,dir_mode=0777,noperm,iocharset=utf8

The most important was noperm - other apps finally displayed shared content after using it. Also enforced utf8 encoding helped to display proper Cyrillic instead of ?????? in some file names.
It is also important to correctly select directories that will serve as mount points, you have to have correct R/W permissions, at least this worked for me: /sdcard/cifs/[your share]

Android Support

Been thinking about supporting Android lately – if this is feasible and how easy it would be.. To be frank it would be troublesome porting sprot & spipc to Java and I am not even sure this is interesting enough to spend my free time on it.

However, as Android has Linux at its core running native code should be relatively easy, so my idea for now is to use this possibility – compile the whole solution with NDK, there is even Boost for Android so everything should be covered.

fplog, which is a client-side API will have to be wrapped JNI style to be usable out of Java apps. Also I am planning to include fplogd daemon as a resource for installable APK package and run the fplogd process from Java like it is described here.

The project is pretty far from running on Android but at least I see the way it could be done and I will try that after I see fplog working on Windows and normal desktop Linux.