Network storage by protocol NFS (Network File System allows Xiaomi smartphones to access files on remote servers or NAS-This technology is particularly useful for working with large media libraries, backups or corporate data when FTP or SMB They are too slow or too unsafe. MIUI support NFS implemented in a non-obvious way โ it must be activated manually through hidden settings or third-party applications.
In this article, we will discuss three ways to connect NFS on Xiaomi smartphones (including models on MIUI 14/15 and HyperOS), consider common errors (for example, mount: Operation not allowed), and give recommendations for optimizing data transfer speeds. Particular attention will be paid to the unique feature of Xiaomi firmware - blocking NFS mounting in the background due to the energy saving policy, which breaks the connection when blocking the screen.
What is NFS and why is it needed by Xiaomi?
NFS (Network File System) was developed by Sun Microsystems in 1984 to unify file access in the network infrastructure, and unlike SMB (used in Windows) or AFP (for macOS), NFS is optimized for UNIX-like systems, including Android (based on the Linux kernel), which has several key advantages:
- ๐ High speed โ due to the minimum overhead costs for data packing (up to 30% faster) SMB when working with small files).
- ๐ Flexible Access Rights โ Support UID/GID Extended file attributes (e.g. setuid).
- ๐ Cross-platform โ works with Linux servers, NAS (Synology, QNAP), Windows (through services for the UNIX).
- ๐ฑ Low energy consumption, unlike FTP, does not require continuous maintenance TCP-linkage.
On smartphones Xiaomi NFS can be useful for:
- ๐ฌ Watching movies in 4K HDR s NAS without prior copying to the device.
- ๐ Automatic photo backup (via Tasker or Automate).
- ๐ผ Work with corporate documents (if the company uses the NFS-server).
- ๐ฎ Storage of emulator files (e.g. RetroArch or Dolphin).
โ ๏ธ Attention: By default MIUI not include support NFS And that means that even if you install a client, you can use it. NFS From Google Play, without manual activation of the kernel module (nfs.ko), the connection will not work.
Checking NFS support in your Xiaomi smartphone
Before trying to connect to NFS-To the server, make sure that your device supports this function at the kernel level:
- Install Kernel Adiutor (or CPU-Z) from Google Play.
- Open the Kernel section โ File Systems.
- Check for nfs, nfsd, or sunrpc strings in the list of supported file systems.
If these modules are not available, you will need to:
- ๐ง Install a custom core (e.g., FrancoKernel or ElementalX) with support NFS.
- ๐ฑ Use a smartphone based on Qualcomm Snapdragon (they often have support enabled) NFS drain-core).
- ๐ Update the firmware to the latest version MIUI 15/HyperOS (in new versions of support NFS more frequently).
| Xiaomi model | Stock core (NFS) | Custom core is required | Notes |
|---|---|---|---|
| Xiaomi 13 Pro | โ Yes. | โ No. | Supports NFS v3/v4 out of the box. |
| Redmi Note 12 Pro+ | โ No. | โ Yes. | It requires firmware with ElementalX kernel. |
| POCO F5 | โ Yes (partially) | โ ๏ธ Maybe. | NFS v3 works, v4 doesn't. |
| Xiaomi Pad 6 | โ Yes. | โ No. | Supports mounting in the background. |
โ ๏ธ Note: On devices with MediaTek processors (e.g. Redmi Note 11 or POCO M5) support NFS It's very rare in the drain core, and the only way out is to install custom firmware like LineageOS.
Method 1: Connecting NFS via the NFS Manager Application
The easiest way to mount NFS on Xiaomi is to use the NFS Manager app from SmartPack developer, which does not require root rights, but has limitations: it only works when the screen is unlocked and does not support automatic connection when booting.
Instructions for setting:
- Download and install NFS Manager from Google Play.
- Launch the application and press + (add server).
- Enter the connection data: Server IP โ address NFS-servers (e.g., servers, 192.168.1.100). Export Path โ the path to the exported folder (for example, /mnt/nas/shares). Mount Point โ Local folder for mounting (for example, /storage/emulated/0/nfs_share). NFS Version - choose v3 (most compatible).
Mount
If the mounting is successful, the folder will appear in your file manager (for example, in Mi File Explorer).
- ๐ When the screen is locked, the connection is broken (due to the energy saving policy). MIUI).
- ๐ฅ Read/write speed is limited ~30 MB/s (due to the specifics of Android implementation).
- ๐ No support. NFS v4 coded (krb5).
Folder is displayed in file manager | Files open without errors | Copy speed >10 MB/s | Connection does not break when switching between applications-->
Method 2: Manual mounting via Termux (for advanced)
If you want to connect constantly (including the background) or support NFS v4, youโll have to use Termux, a Linux terminal emulator for Android, which requires root rights or at least the ability to run commands over su.
Steps to set up:
- Install Termux and update packages: pkg update & pkg upgrade
- Install utilities for working with NFS: pkg install nfs-utils
- Create a folder for mounting: mkdir ~/storage/shared/nfs_mount
- mount (replace the parameters with your own): mount -t nfs -o soft,intr,rsize=8192,wsize=8192 192.168.1.100:/mnt/nas/shares ~/storage/shared/nfs_mount
- To keep the mounting after the reboot, add a command to ~/.bashrc.
Advantages of this method:
- ๐ Works in the background (if you turn off battery optimization for Termux).
- ๐ ๏ธ Supports NFS v4 and extended mounting options.
- ๐ Speed is limited to network equipment (up to 100)+ MB/s on Wi-Fi 6).
โ ๏ธ Attention: On devices with MIUI 14+ mount can be blocked even with root rights due to SELinux policy, in which case you will need to disable enforcing mode by the setenforce 0 command (temporary solution) or patch the kernel.
How to check the speed NFS-connection?
Method 3: Automation via Tasker (for background work)
If you need to NFS-The connection was automatically restored after rebooting or breaking the connection, you can use Tasker. This method does not require root rights, but requires configuration. ADB circumvention MIUI.
Algorithm of settings:
- Install Tasker and AutoTools plugin.
- Create a Run Shell task and type a mount command (similar to the Termux method).
- Add the triggers: ๐ Device Boot (when loading the device). ๐ถ Wifi Connected (when connected to your network). โก Power Connected (when charging, if you need to mount only on a charged device).
MIUI
Tasker
excluded from battery optimization
Settings โ Battery โ Battery Optimization
To bypass MIUI lock for mount commands, run through ADB:
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGSThis will allow Tasker to execute commands on behalf of the system.
- ๐ After resetting the settings, the permit will have to be issued again.
- ๐ต On some firmware MIUI This can cause a Permission Denied error, which can only help root.
/mnt/nas/shares 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)Solving Common NFS Errors on Xiaomi
When working with NFS on Xiaomi, users often encounter typical problems, and here are the most common mistakes and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: Operation not permitted | There is no NFS support in the kernel or SELinux lock. | Install the custom core or disable SELinux (setenforce 0). |
| mount: Network is unreachable | NFS-The server is unavailable or blocked by a firewall. | Check ping to the server and setup iptables on the server. |
| Stale file handle | The server has rebooted or changed its export path. | Remount the folder or restart the nfs-server service. |
| The connection breaks when the screen is blocked | Optimizing the MIUI battery kills background processes. | Add the mounting app to battery exclusions. |
If you see a mount error: wrong fs type, bad option, bad superblock, most likely the problem is incompatibility of NFS versions.
- On the server, you must specify the version nfsvers = 3 in /etc/exports.
- In the mounting command, add the option -o nfsvers=3.
- If you are using Synology NAS, disable NFS v4 in the shared folder settings.
๐ก
On HyperOS devices (such as Xiaomi 14), NFS support is improved โ it is now possible to base mount without root, but manual configuration is required through developer options.
Optimizing speed and security of NFS on Xiaomi
By default, NFS on Android is not running at its maximum speed. To speed up data transfer and protect the connection, follow the following settings:
To increase speed:
- ๐ถ Use the Wi-Fi. 5 Ghz or Wi-Fi 6 (speed up 30-50%).
- ๐ง In the mounting options, specify: rsize=32768,wsize=32768,hard,intr,tcp (increases packet size and uses the same data) TCP instead UDP).
- ๐ฅ๏ธ On the server, turn on async in /etc/exports (Reduces delays in recording).
To improve safety:
- ๐ Restrict access by IP into /etc/exports (for example, 192.168.1.100(rw)).
- ๐ก๏ธ Use it. NFS over TLS (Requires you to configure stunnel on the server).
- ๐ซ Turn it off. no_root_squash, If you do not need root rights on the client.
If you connect to NFS over the mobile internet (e.g. 4G/5G), you must:
- Set up a VPN (like WireGuard) to encrypt traffic.
- Use NFS v4 with krb5 (if the server supports Kerberos).
- Limit speed through tc (to avoid running out of fare): tc qdisc add dev wlan0 root tbf rate 10mbit burst 32kbit latency 400ms