CIFS.KO module for mounting SMB/CIFS shares to lift storage constraints

Solace50

Senior Member
Jul 17, 2011
517
70
0
So the idea here is to re-map file shares as data paths for the provided device. Why? Because not every device was manufactured to have 256gb of storage and we now have things like popcorn time, netflix and other various services that allow you to download to your mobiledevice/pc. Most app's are defaulting to the internal SD card if not within their data folder to save/cache files. Yes SD cards are super cheap now adays and are bigger but a 4tb disk platter is still by far the best value and does not cost you $1000+ as the sd card probably would.

The goal? To delete that static folder each app uses and either create a symbolic link/mount bind the the CIFS share so files that are written to disk end up on the shared storage. The alternative I suppose is to re-compile each app to use a different path but that is going to be much more tedious and maintenance in the long run.

So comes to the part of why I am posting on XDA regarding this. I'm more ops/networking/security background than a actual dev and seem to need a little push in the right direction to accomplishing this. I currently have a Android 6.0.1 tablet and galaxy s8 to fiddle with. They are rooted which is a pre-req for this as well need to load kernel modules to support CIFS shares. The android 6.0.1 does not have CIFS support along with Android 9 on the S8. The requirements to get this functional would be loading CIFS.KO, busybox, and root access. Currently I'm having issues as to how to compile cifs.ko as its apart of the linux kernel. Any insight, links or comments as to how to proceed would be appreciated. I'm unsure if I need the source to the ROM currently running and rebuild the kernel of that to include the modules or if I can somehow compile the module and use insmod to load them at boot. Is it as simple as compiling the linux kernel version I currently run from uname -a and to migrate the cifs.ko module from that?