Network file system NFS (Network File System allows you to turn your Xiaomi Mi 10T Pro in a full-fledged client for working with remote directories - whether it is home NAS, server or even a smartphone, unlike SMB or FTP, protocol NFS Provides higher data transfer speeds and minimal overhead, which is critical for working with large files or streaming media.
However, the setup NFS And on Android, it's not an easy task. MIUI It doesn't include built-in protocol support, and third-party solutions require manual configuration and root rights. In this guide, we'll go through all the steps from server preparation to mounting network folders on Mi. 10T Pro, including bypassing common errors such as permission denied or mount: invalid argument.
What is NFS and why you need it on your smartphone
Protocol NFS (The Network File System, developed by Sun Microsystems in 1984, was originally intended for Unix systems, and its key advantage is that it can work transparently with deleted files as local files without having to copy them beforehand. 10T Pro means:
- π Instant access to files on NAS or PC without taking up smartphone memory.
- π¬ Watching movies in 4K HDR Directly from the server without buffering (at network speed) β₯ 100 Mbps).
- π Synchronize projects between devices in real time (for example, for developers or designers).
- π More stringent access control than SMB (through UID/GID).
But there are pitfalls: NFS It is sensitive to network delays, and improper configuration of exports on the server can open access to files to outsiders.In addition, Android requires root or special client applications, since the Linux kernel in smartphones is assembled by default without the nfs.ko module.
β οΈ Attention: Use NFS on mobile devices increases battery load due to constant network interface activity. When working from the battery, it is recommended to limit connection time or use low-power mode in the client settings.
Requirements and preparation for setting up
Before you start, make sure your system meets the minimum requirements:
| Component | Requirement | Note |
|---|---|---|
| Smartphone | Xiaomi Mi 10T Pro (models) apollo/apollopro) | Firmware supported MIUI 12.5+ or custom (for example, LineageOS) |
| Root access | Mandatory for installation NFS mount | Use Magisk to get rights without SafetyNet trigger |
| NFS-server | Any host running nfsd (Linux, FreeNAS, Synology) | For tests, a virtual machine with Ubuntu Server is suitable |
| Network | Local Wi-Fi network 5/6 or Ethernet (through USB-adapter) | NFS Not recommended to use via mobile internet (3G/4G/5G) |
If you don't already NFS-server, it can be quickly deployed on any Linux PC:
sudo apt update && sudo apt install nfs-kernel-server
sudo mkdir -p /srv/nfs/xiaomi_share
sudo chown nobody:nogroup /srv/nfs/xiaomi_share
sudo chmod 777 /srv/nfs/xiaomi_share # Test only!For Mi. 10T Pro will also be required:
- π± Termux application (for commands without PC).
- π§ Nfs-utils for Magisk (if you use root).
- π Static IP-address for a smartphone in the local network (configure in the router).
Installation NFS-client on Xiaomi Mi 10T Pro
Stock firmware MIUI not include support NFS, So you have to install the components manually:
Method 1: Through Termux (without root)
If you do not have root rights, you can use Termux with proxies via proot:
Install Termux from [F-Droid]|Update packages with pkg update & pkg upgrade|Install a proot-distro and create a ubuntu environment|Inside the environment, run apt install nfs-common-->
After installation, check the availability of utilities:
~ $ showmount -e [IP_ of your server]
Export list for [IP_ your server]:
/srv/nfs/xiaomi_share *Limitation of this method: files will only be available inside Termux, not throughout the system.
Method 2: Magisk (with root)
If you have root, install the module. NFS Manager:
- Download the module. NFS Manager for Magisk.
- Install it through Magisk Manager and restart the device.
- Check the presence of binary: adb shell ls /system/xbin/mount.nfs
β οΈ Note: Modules for Magisk may conflict with SafetyNet. If you use banking applications, create a backup in the app before installing it. TWRP Check SafetyNet status with MagiskHide Props Config.
Setting up NFS-server for Xiaomi Mi 10T Pro
Key configuration file NFS-server β /etc/exports. For Mi. 10T Pro is recommended to use the following parameters:
/srv/nfs/xiaomi_share 192.168.1.100(rw,sync,no_subtree_check,no_root_squash,fsid=0)Where:
- 192.168.1.100 - static IP your smartphone.
- rw is the permission to read and write.
- no_root_squash β retains root rights (necessary for mounting on Android).
- fsid=0 β necessarily NFSv4.
After editing exports, restart the server:
sudo exportfs -ra
sudo systemctl restart nfs-kernel-serverπ‘
If the server and smartphone are in different subnets, use the crossmnt option in the /etc/exports and set up routing on the router.
Mounting NFS-smartphone-ball
Now, let's get to the most critical part of this, mounting a network folder.
- Create a mounting point: adb shell mkdir /sdcard/nfs_share
- Execute the mounting command (replace) IP and the way: adb shell mount -t nfs -o nolock,soft,udp 192.168.1.10:/srv/nfs/xiaomi_share /sdcard/nfs_share
Team parameters:
- nolock β disables file locking (reduces battery load).
- soft β breaks the connection during a timeout (prevents the system from freezing).
- udp β uses the protocol UDP (Less overhead but less reliable).
Check the result:
adb shell ls /sdcard/nfs_shareβ οΈ Note: If mounting ends with mount: Operation not allowed, check: Server folder rights (chmod 777 β temporary test solution) and nfs.ko module in the kernel (lsmod) | (grep nfs) Firewall on the server (ufw allow from 192.168.1.100 to any port nfs).
What to do if NFS not mounted?
Automatic mounting during loading
To avoid typing the mount command after each restart, add it to init.d or use Tasker:
Method 1: Init.d (requires root)
Create a script. /system/etc/init.d/99nfs:
#!/system/bin/sh
/sbin/busybox mount -t nfs -o nolock,soft,udp 192.168.1.10:/srv/nfs/xiaomi_share /sdcard/nfs_shareMake it executable:
adb shell chmod 755 /system/etc/init.d/99nfsMethod 2: Tasker (without root)
Set up the task in Tasker:
- Event: Device Boot.
- Action: Run Shell with the mounting team.
- Add a delay of 10 seconds before running (to get Wi-Fi up).
π‘
For a stable job. NFS On Android, it is critical to use static IP-Set up reservations. DHCP on the router or assign a static IP manually in the settings of Wi-Fi smartphone.
Optimizing Productivity and Safety
NFS On mobile devices, you need a balance between speed and reliability:
| Parameter | Recommended value | Explanation |
|---|---|---|
| rsize/wsize | 8192 | Read/write size increases speed on stable networks. |
| timeo | 14 | Time-out server response (tenths of a second). Reduce with lag. |
| retrans | 2 | Repeat attempts. Increase to 5 for unreliable networks. |
| proto | udp or tcp | TCP more reliable, but slower. UDP faster, but loses packages. |
Example of an optimized mounting command:
mount -t nfs -o rsize=8192,wsize=8192,timeo=14,retrans=2,proto=udp,nolock,soft 192.168.1.10:/srv/nfs/xiaomi_share /sdcard/nfs_shareFor safety:
- π Restrict access to /etc/exports specific IP smartphone.
- π‘οΈ Use firewall-cmd or ufw to close port 2049 to everyone except the local network.
- π Regularly update the serverβs nfs utils (vulnerabilities in older versions allow remote code execution).
Alternative solutions and troubleshooting
If NFS Not suitable for your tasks, consider alternatives:
- π SMB (Samba: Easy to set up, but slower. Use the MiXplorer app with plugin SMB.
- βοΈ WebDAV: Works through HTTPS, But it's a high latency, and it's good for Internet access.
- π SSHFS: He's mounting a remote folder on SSH. Secure, but requires root and high server performance.
Common mistakes and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: invalid argument | Unsupported version NFS or | Add in. -o vers=3 or check the syntax |
| Permission denied | Incorrect rights on the server | Check the chmod and /etc/exports |
| Network is unreachable | Problems with routing | Ping server, check firewall |
| Stale file handle | The server is restarted and the client is not. | Rewire share or reboot your smartphone |
π‘
If NFS-If you turn off the ball after you sleep, add the bg (background) setting to the mount command: -o bg,soft