Why do I need to set up NFS on a smartphone?
Network file system NFS (Network File System allows you to use your Xiaomi Redmi 10S And so you can access remote folders as if they're on a local drive, and that's especially useful for working with large files -- video in the computer. 4K, RAW-Photos or projects in Termux when the phone's internal memory is scarce. SMB or FTP, NFS Provides higher data rate and low latency when set up correctly.
However, there are nuances: Redmi 10S based on Android 11/12 does not support NFS out of the box โ you will need to root through Magisk or use Termux with additional packages. In this article, we will discuss both methods, as well as optimization of performance and solving common errors such as mount: permission denied or rpcbind failure.
Before you start, make sure you have:
- ๐ฑ Smartphone Xiaomi Redmi 10S Unlocked bootloader (if you plan to root).
- ๐ฅ๏ธ Server or PC with Linux/Windows, deployed NFS-server (for example, on Ubuntu or Synology) NAS).
- ๐ Stable connection to the local network (preferably via cable or Wi-Fi 5 GHz).
Method 1: Connecting NFS over Termux (without root)
If you don't want to root your device, you can use Termux, a Linux terminal emulator for Android, which is a way to temporarily connect and work with files via the command line.
Install Termux from F-Droid (the version from Google Play is outdated and doesn't support all packages).
pkg update && pkg upgrade
pkg install nfs-utils opensshNow create a mount point and connect the remote folder:
mkdir ~/nfs_share
mount -t nfs -o port=2049,nolock,soft 192.168.1.100:/path/to/share ~/nfs_shareReplace. 192.168.1.100:/path/to/share real IP-address NFS-servers and the path to the exported folder. To check the success of the connection, follow the:
df -h | grep nfsUpdate packages|Install nfs-utils and openssh|Create a mounting point|Connect NFS-ball|Check the connection via df -h-->
โ ๏ธ Note: When connecting via Termux files to NFS-The folder will only be accessible inside the terminal. The file manager (e.g. Mi File Manager) will require rooting to access it from the terminal.
Method 2: Permanently connect NFS via Magisk (with root)
To fully integrate NFS into Redmi 10S, you need to obtain superuser rights, which will allow you to mount network folders as local storage, available to all applications.
Steps:
- Install Magisk (see here for rooting instructions for Redmi 10S).
- Download the NFS Manager module from the Magisk repository or install Mount Manager from Google Play.
- In the module settings, specify: ๐ IP-address NFS-servers (e.g., servers, 192.168.1.100). ๐ Path to the exported folder (e.g, /mnt/data/shares). ๐ Options for mounting: rw, noatime, nodiratime,soft,intr,tcp.
Reset the device.
A critical detail for Redmi 10S: due to the MIUI kernel features, when mounting NFS through Magisk, you need to disable SELinux (temporarily switch to Permissive mode with setenforce 0 command).
| Mounting option | Description | Recommended for Redmi 10S? |
|---|---|---|
| rw | Allows reading and writing | Yes. |
| noatime | Disables file access time update (accelerates work) | Yes. |
| soft | Breaks the connection when errors occur (instead of endless repetitions) | Yes. |
| tcp | Uses TCP instead of UDP (more stable for Wi-Fi) | Yes. |
| vers=3 | Forced use of NFSv3 (can help with NFSv4) errors) | If the NFSv4 is not working, |
๐ก
If after mounting files are displayed with rights ------?, Run the chmod command in Termux -R 777 /path/to/point/mounting. This will temporarily solve the access rights problem.
Setting up NFS-servers for working with a smartphone
Before connecting from Redmi 10S, make sure the server is properly configured. For Linux (Ubuntu/Debian), edit the /etc/exports file:
/path/to/share 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)Where:
- ๐ /path/to/share โ fileway.
- ๐ 192.168.1.0/24 โ Subnet from which you are allowed to connect (replace with yours).
- ๐ง rw - Reading/write rights.
- ๐ซ no_root_squash โ allows the root user on the client (your smartphone) to retain rights.
After editing, restart the services:
sudo exportfs -a
sudo systemctl restart nfs-kernel-serverโ ๏ธ Attention: Option no_root_squash It poses a security risk if you have untrusted devices on your network, and only use it on a local network with strong security.
How to check the export of folders on the server?
Optimizing NFS Speed and Stability on Redmi 10S
By default, NFS can run slowly on mobile devices due to high latency on Wi-Fi networks.
- Use Wi-Fi 5 GHz: 2.4 GHz is overloaded and adds delays. On Redmi 10S, switch to 5 GHz in your router settings.
- Increase buffer size: Add rsize=32768,wsize=32768 to the mounting options. This will reduce the number of packets when transferring large files.
- Turn off Wi-Fi power saving: In the developer settings (Settings โ About Phone โ MIUI version โ tap 7 times) turn off the option Aggressive Wi-Fi shutdown.
To test the speed, use the command in Termux:
time dd if=/dev/zero of=~/nfs_share/testfile bs=1M count=100This command will create a file size of 100 MB and measure the write time. Normal speed for Redmi 10S is 10-20 MB/s over Wi-Fi. If the speed is below 5 MB/s, check the router or server settings.
๐ก
For maximum performance, use a wired connection via USB-OTG + Ethernet adapter. This will eliminate Wi-Fi delays and increase speeds to 50-70 MB/s.
Addressing common mistakes
When setting up NFS on Redmi 10S, users often face the following problems:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: permission denied | Incorrect rights on the server or SELinux blocks access | Check /etc/exports and run setenforce 0 |
| rpcbind: server localhost not responding | Rpcbind service is not running on the server | Run sudo systemctl start rpcbind |
| stale file handle | The server is restarted and the client is trying to use the old session. | Remount folder: umount -l /path; mount -a |
| The files are displayed as????? | Problems with encoding or rights | Add the option nfsvers=3 or utf8 |
If files are not displayed in Mi File Manager after mounting, try:
- Reset the device.
- Use an alternative file manager (e.g. Solid Explorer or FX File Explorer).
- Check that the mounting point is in /sdcard or /storage/emulated/0.
Alternatives to NFS for Xiaomi Redmi 10S
If setting up NFS seems too complicated, consider alternative protocols:
- ๐ SMB (Samba: Easy to set up, but slower NFS. Use the MiXplorer app with a plugin SMB.
- โ๏ธ WebDAV: Works through HTTP/HTTPS, It is supported by most file managers.
- ๐ SSHFS: He's mounting a remote folder on SSH. Termux requires, but no root rights are required.
- ๐พ Syncthing: Synchronizes folders by P2P serverless.
Speed comparison (Redmi 10S test):
- ๐ฅ NFS: 15-25 MB/s (pre-optimized 50 MB/s cable-wire).
- ๐ฅ SSHFS: 8-12 MB/s (dependant).
- ๐ฅ SMB: 5-10 MB/s.
- โก Syncthing: 3-7 MB/s (but it's in the background).