Xiaomi Mi 9 is the flagship of 2019, which is still relevant thanks to powerful hardware and support for custom firmware (MTP, SMB) Frequently restrict speed or functionality. NFS (Network File System is the perfect solution for those who want to mount network folders as local drives with minimal latency. NFS On Android, especially on older models like the Mi 9, it requires workarounds: from root rights to manual kernel compilation.
In this article, we will discuss three working ways to connect NFS Xiaomi Mi 9: 1) via Termux without root (limited functionality), 2 Using Magisk and module NFS Manager, 3) By manually mounting through an adb shell (for experienced users).
You will also learn how to fix common errors such as mount: permission denied or rpcbind failure. NFS alternatively (SMB, WebDAV for speed and stability.
โ ๏ธ It's important: NFS Android is unstable due to kernel limitations. MIUI 12+ You may need additional patches for the kernel module. If you just want to transfer files, consider this. SMB (via Mixplorer or FTP (via Solid Explorer).
1. What is it? NFS And why is he better? SMB/FTP Xiaomi Mi 9
NFS (Network File System is a network protocol originally developed for Unix systems, and its key advantages over the Internet are: SMB (Windows Sharing or FTP:
- ๐ Minimum overhead costs: NFS Transmits data almost without encryption (unlike the SMB 3.0), which gives a speed increase of 15-30% when working with small files.
- ๐ Transparent mounting: The network folder is displayed as a local drive (e.g., in the /mnt/nfs_share), What is convenient for automatic backup or streaming media.
- ๐ ๏ธ Flexible Access Rights: You can configure access at the user/group level (UID/GID), What is critical for multi-user systems.
Xiaomi Mi 9 NFS particularly useful:
- ๐ฌ Streaming video 4K: Without buffering when playing with NAS (Synology, QNAP) PC.
- ๐ Automatic Backup: Sync photos via FolderSync or SyncThing.
- ๐ฎ Emulators: Storage ROM-s and saves on a network drive (e.g., for RetroArch or Dolphin).
However, there are also disadvantages:
- ๐ No encryption: Data is transmitted in plain form (use) NFS Only on trusted networks!).
- ๐ง Setup difficulty: Requires root or Termux with manual commands.
- ๐ Core dependence: At the drain core MIUI NFS It may be unstable (patching is required).
2.Preparation of Xiaomi Mi 9 to connect NFS
Before setting up NFS You must complete the mandatory steps, otherwise the installation will end in error:
Install the latest version MIUI (custom-made)
Enable Developer Mode (Settings โ About Phone โ MIUI Version โ 7 times tap)
Activate debugging over USB (Settings โ Additional โ For developers)
Install Termux (from F-Droid) or Magisk (if root is required)
Connect to 5GHz Wi-Fi (NFS sensitive to network delays)-->
If you are planning to use root methods, additionally:
- Unlock the bootloader through Mi Unlock Tool (association to the Xiaomi account is mandatory!).
- Install Magisk (version 26.0)+) through TWRP or Fastboot.
- Check the support NFS In the core command: adb shell cat /proc/filesystems | grep nfs If no response is required, a kernel patch will be required (see section below). 5).
โ ๏ธ Attention: On Mi 9s MIUI 14+ It can trigger Selinux, blocking mounting NFS. Check the status before you start:
adb shell getenforceIf Enforcingโs answer is to transfer temporarily to Permissive:
adb shell setenforce 0(This mode will reset after the reboot!)
Method 1: Connection NFS via Termux (without root)
This method is suitable for basic access to NFS-The ball has no superuser rights but has limitations: โ Does not require unlocking the loader. โ It only works within Termux (not systemically). โ Speed is lower due to emulation of the surroundings.
Adjustment steps:
- Install Termux from F-Droid (Google Play version is outdated!).
- Update packages and install nfs-utils: pkg update && pkg upgrade pkg install nfs-utils
- Create a mount point and connect the ball: mkdir ~/nfs_share mount -t nfs -o port=2049,nolock,proto=tcp 192.168.1.100:/path/to/share ~/nfs_share Replace. 192.168.1.100:/path/to/share your address NFS-server.
To check the connection successfully, perform:
ls ~/nfs_shareIf you see files from the server, the connection works!
๐ก
For automatic mounting when Termux starts, add the mount command to the file ~/.termux/boot/start.sh (Create it if you are not there).
โ ๏ธ Note: When you connect files to ~/nfs_share They will only be available in Termux, and they will need to be displayed in a standard Explorer (e.g. Files by Google:
- Install Mixplorer and enable Show hidden files in the settings.
- Cross the path /data/data/com.termux/files/home/nfs_share.
Method 2: Full mounting NFS via Magisk (root)
This method allows you to connect NFS-The ball is like a system disk that's available to all applications:
- ๐ Unlocked bootloader and installed Magisk.
- ๐ฑ MIUI 12-14 or custom firmware (e.g. LineageOS 20).
- ๐ฅ๏ธ NFS-PC-server/NAS Exported folder (example of configuration) /etc/exports: /mnt/storage 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)
Instructions:
- Install a module in Magisk NFS Manager (can be downloaded from the XDA Developers).
- Restart the device and open the application NFS Manager.
- Add a new server: ๐ Server IP: 192.168.1.100 (address NFS-server). ๐ Export Path: /mnt/storage (path). ๐ Mount Point: /data/nfs_share (where it will be displayed on the phone). ๐ Options: rw,soft,intr,noatime,nodiratime,rsize=8192,wsize=8192.
Mount
Successfully mounted
Check the mounting:
adb shell df -h | grep nfsA line with your ball should appear, for example:
192.168.1.100:/mnt/storage 100G 20G 80G 20% /data/nfs_shareHow to export the folder to NFS-server (Linux)
โ ๏ธ Attention: On the Mi 9 with the core 4.9.x (stock MIUI) mount: operation not allowed. solution may occur:
- Install the Magisk Kernel module NFS Patch.
- Or upgrade the kernel to version 4.14+ (custom-stitch).
Step-by-step:
- Connect Mi 9 to PC and execute: Adb shell su
- Create a folder for mounting: mkdir /data/local/nfs_share
- Install busybox (if not): pkg install busybox -y
- Connect the ball: mount -t nfs -o rw,soft,intr,rsize=32768,wsize=32768,timeo=14 192.168.1.100:/mnt/storage /data/local/nfs_share Parameters rsize/wsize Increased transmission speed for the Gigabit network.
Critical detail: On the Mi 9 with MIUI 13+ There may be no support NFS Check it out in the core:
cat /proc/filesystems | grep -w nfsIf empty, install a kernel patch (see spoiler below) or use an alternative (SMB).
How to patch the core for support NFS
To keep the mounting after the reboot, add a line to /etc/fstab:
192.168.1.100:/mnt/storage /data/local/nfs_share nfs rw,soft,intr,rsize=32768,wsize=32768 0 0adb shell
Root Explorer
Typical errors and their solutions
When connected NFS Xiaomi Mi 9 users face five main problems:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: permission denied | Not enough rights or Selinux blocks mounting. | Run su in front of the mount command. Translate Selinux to Permissive: setenforce 0 |
| rpcbind: server localhost not responding | The Rpcbind service is not running on the phone. | Install rpcbind in Termux: pkg install rpcbind rpcbind -w |
| mount: wrong fs type, bad option, bad superblock | Lack of support NFS core. | Check the kernel (see section 5). Use the Magisk module NFS Enabler. |
| stale file handle | The server has rebooted or changed its export. | Rewire the ball: umount -l /data/nfs_share mount -t nfs... |
| Low transmission speed | Parameters rsize/wsize too small. | Increase the buffer to 32768 or 65536: mount -o rsize=65536,wsize=65536... |
โ ๏ธ Note: If files are displayed after mounting but not opened (error) Input/output error, check:
- ๐ Server rights: The folder must be exported from no_root_squash.
- ๐ Protocol Version: Try to explicitly specify nfsvers=3 or nfsvers=4.
- ๐ Firewall: The server must have a port open 2049/TCP.
Alternatives NFS: SMB, WebDAV, FTP
If NFS Can't configure or need encryption, consider alternative protocols:
| Protocol | Speed. | Encryption | Difficulty setting up | Applications for Xiaomi |
|---|---|---|---|---|
| SMB (Samba) | โญโญโญ (70-90% NFS) | โ (only SMB 3.0+) | โญ (simple) | Mixplorer, FX File Explorer |
| WebDAV | โญโญ (50-60% NFS) | โ (HTTPS) | โญโญ | FolderSync, Solid Explorer |
| FTP/FTPS | โญ (30-40% NFS) | โ (FTPS) | โญ | ES Conductor, AndFTP |
| SSHFS | โญโญโญ (80% NFS) | โ (through SSH) | โญโญโญ | Termux + sshfs |
For Xiaomi Mi 9, the best options are:
- ๐ฌ For the video: SMB (via Kodi or VLC) or NFS (if you can set up).
- ๐ Backup: WebDAV (encrypted) or SyncThing (P2P).
- ๐ง For development: SSHFS (mounting remote folders as local).
๐ก
NFS It is only suitable for local networks with high speed requirements (for example, for example, for the use of high speeds, 4K-Video or large databases. It's easier and more reliable to use for everyday tasks. SMB WebDAV.