What to do with "NFS support in custom kernel"? How to mount a NFS share on android?

blazzer12

Senior Member
Jun 15, 2012
531
205
73
What to do with "NFS support in custom kernel"? How to mount a NFS share on android?

We often see NFS support in custom kernels but is it really useful in mounting a NFS share on android? How do I go about it? I don't want app level buy system level access to NFS mounts so all the apps can't access them.

Running Lineage OS (PIE) with root. My kernel claims NFS support.
 

Solace50

Senior Member
Jul 17, 2011
517
70
0
We often see NFS support in custom kernels but is it really useful in mounting a NFS share on android? How do I go about it? I don't want app level buy system level access to NFS mounts so all the apps can't access them.

Running Lineage OS (PIE) with root. My kernel claims NFS support.
At best I've seen int the app store is SMB clients but that will not allow you to mount and re-map other apps to those shares. It would only persist for that one app session and unmount after closing. I'm currently looking into compiling the SMB/NFS modules for android but am a tad behind for experience in that area.

Once you have the support it should be as simple as using the mount command and fstab to permanently get things going.
 

blazzer12

Senior Member
Jun 15, 2012
531
205
73
At best I've seen int the app store is SMB clients but that will not allow you to mount and re-map other apps to those shares. It would only persist for that one app session and unmount after closing. I'm currently looking into compiling the SMB/NFS modules for android but am a tad behind for experience in that area.

Once you have the support it should be as simple as using the mount command and fstab to permanently get things going.
When searching I came across a github repository that claims to work on android. But some one with the know how needs to compile it.


libnfs
LIBNFS is a client library for accessing NFS shares over a network.
Android:- tested with NDK r10e - running on Android 4.4 (should work starting from 2.3.3)
Once you have the support it should be as simple as using the mount command and fstab to permanently get things going.
Being on Android means the device is mobile, it may or may not be able to connect to the server. NFS mounts might act weird if there is no connection. Something like autofs (that automatically mounts and dismounts according to context) might be required. Otherwise normal apps might have bad time.
 

Solace50

Senior Member
Jul 17, 2011
517
70
0
Being a mobile device is just another device. Connectivity remans the same avenue whether its targeting internal or external addresses. Either way any issues would be solved after getting the base down which is any kernel modules and potentially busybox.

Where did you come across the repository what you mentioned?

Also you said the kernel supports NFS mounts did you check this under your supported filesystem's? So far no version of android I have touched natively supports the use of nfs or cifs/smb. Yet there are apps that provide the functionality but not persistent mounts. Cat /proc/filesystem to check.
 

blazzer12

Senior Member
Jun 15, 2012
531
205
73
Where did you come across the repository what you mentioned?.
Github repository link : https://github.com/sahlberg/libnfs

I was just searching for "android nfs" and came across it by chance.


Also you said the kernel supports NFS mounts did you check this under your supported filesystem's? So far no version of android I have touched natively supports the use of nfs or cifs/smb. Yet there are apps that provide the functionality but not persistent mounts. Cat /proc/filesystem to check.
It is a custom kernel so devs will try to throw in as many features as they can.

Code:
# cat /proc/filesystems | grep nfs                                                                                                                                          
nodev	nfs
nodev	nfs4
nodev	functionfs
 
Last edited: