Network storage by protocol NFS (Network File System allows you to turn your Xiaomi device into a full-fledged client for accessing files on the Internet. NAS, Linux servers or even other Android devices. SMB or FTP, NFS Provides higher data transfer speeds and less processor load β critical for playback 4K HDR-Video on Mi Box S or work with large databases POCO F5.
However, standard MIUI and HyperOS firmware do not include built-in NFS support out of the box.This guide covers all the current ways of connecting, from manual mounting via Termux to using specialized applications. We will also analyze the typical errors like βPermission deniedβ or βmount: invalid argumentβ that occur when working with Xiaomi devices based on Qualcomm and MediaTek.
Important: the procedure requires root rights on smartphones (except for methods with applications) and on-set developer mode on TV set-top boxes. TV Stick or Redmi Smart TV, Check the compatibility of your model with NFS-client in the table below.
What is NFS and why is it needed by Xiaomi?
NFS (developed by Sun Microsystems in 1984) is designed to remotely access a file system as if it were local, and on Xiaomi devices, it solves three key problems:
- π¬ Media streaming: playing movies in 10-bit H.265 s NAS No buffering (relevant to the Mi Box) 4K limited-memory).
- π Backup: Automatic backup of photos from Xiaomi 13 Ultra to the server without using cloud services.
- π₯οΈ Development: mounting the source of projects directly from the server to the POCO X6 Pro for easy work in Android Studio.
Compared to alternatives, NFS benefits where performance is important:
| Protocol | Speed (Mbps) | CPU loading | Support for Xiaomi |
|---|---|---|---|
| NFS v4 | 800β1200 | Low. | Requires root/Termux |
| SMB (Samba) | 300β600 | Medium | Built-in support |
| FTP/FTPS | 200β400 | Tall. | Through applications |
| WebDAV | 150β300 | Very high. | Through applications |
β οΈ Note: On devices with MediaTek Dimensity processor (e.g. Redmi Note 12 Pro)+) You may need to disable DM-Verity before mounting. NFS. This is due to the features of the Linux 4.19 kernel used in these chips.
Preparing Xiaomi Device for NFS
Before setting up, check two key conditions:
- Hardware compatibility: NFS is supported by all Xiaomi-based Android 8.0+ devices, but for full mounting requires a kernel with the module nfs.ko. To find out the kernel version you can command: adb shell uname -a If the output contains the word "aarch64" - your device is compatible.
- Network infrastructure: NFS is sensitive to delays.
- πΆ Use 5 GHz Wi-Fi or wired connection (for Mi Box via USB-to-Ethernet adapter).
- π Set up static. IP for server and client in router (e.g. 192.168.1.100 for NAS).
- π‘οΈ Turn it off. IPv6 in the settings of the router - it can cause timeouts when mounting.
For the Mi Box S, Mi TV Stick 4K, additionally:
β οΈ Attention: In firmware based on Android TV 11+ lock-in NFS into /storage/emulated/0. Use alternative methods like /data/local/nfs external USB-accumulator.
Developer mode is enabled (7 times click on "Build Number")
Allowed debugging over USB (in the settings of the developer)
Installed ADB drivers on PC
The NFS server is configured and available over a local network.
Compatibility of the device core is checked-->
Method 1: Connecting NFS over Termux (without root)
This method is suitable for Xiaomi smartphones without superuser rights, but requires the installation of Termux from F-Droid (the version from Google Play does not support proot).
Adjustment steps:
- Install Termux and update packages: pkg update & & pkg upgrade -y
- Install the necessary utilities: pkg install nfs-utils proot -y
- Create a mounting point and connect NFS: termux-setup-storage mkdir ~/nfs_mount mount -t nfs -o soft,udp,nolock 192.168.1.100:/path/to/share ~/nfs_mount Replace. 192.168.1.100:/path/to/share to the real address of your server.
Limitations of the method:
- π Files will only be available inside Termux (not visible in the standard file manager).
- π’ Read/write speeds are 20 to 30% lower due to proot emulation.
- π After restarting the device, the mounting is reset (you need to repeat the command).
π‘
To automate the connection when you start Termux, add the mount command to the file ~/.bashrc. To do this, edit it via nano ~/.bashrc and paste the mount string at the end of the file.
Method 2: Full mounting with root rights
If your Xiaomi device has an unlocked bootloader and Magisk installed, you can mount NFS directly into the system.This method ensures maximum performance and integration with the file system.
Requirements:
- π± Device with root rights (stitched through) TWRP Or OrangeFox).
- π§ Module NFS Manager for Magisk (you can download it on the Internet) XDA Developers).
- π₯οΈ server NFS with an exported folder (check it out) /etc/exports server-side).
Instructions:
- Install the NFS Manager module via Magisk and restart the device.
- Open Termux (or Adb Shell) and execute: su mkdir /data/local/nfs_share mount -t nfs -o rw,soft,intr,rsize=8192,wsize=8192 192.168.1.100:/mnt/user/media /data/local/nfs_share Parameters rsize/wsize Optimize speed for the Gigabit network.
- Check mounting: df -h | grep nfs If the team returned the path - the connection is successful.
On file system devices f2fs (for example, Xiaomi 12T Pro) mounting in /storage/emulated/0 This will cause the error "Permission denied." Use alternative methods: /data/media/0 external SD-map.
| Mounting parameter | Description | Recommended value |
|---|---|---|
| rw/ro | Access mode (read/write or read only) | rw for full access |
| soft/hard | Network error behaviour | soft (breaking of connection) |
| intr | Allow interruption of operations | Insert (intr) |
| rsize/wsize | Size of the read/write block | 8192 for Gigabit Ethernet |
How to check exported folders on the server?
Method 3: Use client applications (without Termux and root)
If you donβt want maximum performance, you can get by with specialized apps from Google Play, which are suitable for basic file access, but have limitations:
- π₯ NFS Manager (from YoungMonkeys) β supports mounting in user space, but requires Android 9+.
- π Total Commander with a plugin NFS Plugin β easy to view files, but does not support streaming video.
- π₯ Kodi - has a built-in NFS-Media player client (ideal for Mi Box).
Customization in Kodi (relevant to Mi TV Stick):
- Open Kodi and go to Settings β File Manager β Add source.
- Select the NFS Protocol and type: nfs://192.168.1.100/path/to/share
- Please provide a username/password if the server requires authentication.
β οΈ Note: Google Play apps often use an outdated version of the libnfs library (v1.9.3), What can cause errors with servers on the NFS v4.2. If files are not displayed, try manually specifying the protocol version in the application settings (usually NFS v3).
Solving Common Errors When Connecting NFS
Even with the right setup, you can encounter errors, and here are the most common ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: Operation not permitted | No mounting rights | Run su in front of a command or check SELinux (getenforce) |
| RPC: Program not registered | Rpcbind service is not running on the server | On the server run sudo service rpcbind restart |
| Permission denied (13) | Incorrect access rights on the server | Check /etc/exports and folder rights (chmod 777) |
| No route to host | Network problems (firewall, VPN) | Turn off VPN, check ping 192.168.1.100 |
For HyperOS devices (e.g. Xiaomi 14) additionally:
- π§ If the mounting falls with the error "Invalid argument", try adding the option nfsvers.=3 on the team:
mount -t nfs -o nfsvers=3 192.168.1.100:/share /mnt/nfsOn the Mi Box with Android TV 12, you may need to disable the βPrivate DNSβ function in your network settings β it conflicts with NFS.
π‘
90% connection errors NFS Incorrect server settings (incorrect export to the server) /etc/exports) or network restrictions (firewall, IPv6). Always start your diagnosis with the showmount team. -e [server_ip] server-side.
Optimizing NFS Performance on Xiaomi
By default, NFS uses conservative settings that don't unlock the potential of today's networks.
- π Increase the size of the blocks: use rsize=32768,wsize=32768 for 10-Gigabit network.
- π Enable caching: Add the actimeo parameter=30 to reduce delays.
- π‘ Turn it off. TCP: local-network UDP (proto=udp) faster than TCP.
Example of optimized mounting command for POCO F4 GT:
mount -t nfs -o rw,soft,intr,rsize=32768,wsize=32768,actimeo=30,proto=udp 192.168.1.100:/mnt/disk1 /data/local/nfs_mountTo check the actual speed, use:
dd if=/data/local/nfs_mount/large_file of=/dev/null bs=1M count=1000On the Mi Box S with limited resources, it is recommended to:
- Use nfsvers=3 instead of v4 (less CPU load).
- Limit the number of files open at the same time: noac.
- Disable the time attributes: noatime, nodiratime.