NFS setup on Xiaomi 9T: access to network folders without root

Why you need NFS on your smartphone and why Xiaomi 9T is right for it

Network File System (NFS) is a protocol that allows remote file systems to be mounted as local folders. On the Xiaomi 9T (Davinci model), this technology offers unique opportunities, from streaming media from the NAS to backing up photos directly to network storage. Unlike SMB or FTP, NFS provides faster data transfer speeds at low latency β€” critical for large files.

The main question is why Xiaomi 9T? The thing is the hardware platform: the smartphone is equipped with a Qualcomm Snapdragon 730 chipset, which supports the Linux kernel with the nfs.ko module. NFS-The client can be run even without root rights using standard mechanisms. MIUI. But there are some nuances: starting with MIUI 13, Xiaomi has restricted access to some system features, so stable operation will require bypassing these restrictions.

In this article, we will discuss:

  • πŸ” How to Check the Compatibility of Your Xiaomi 9T s NFS
  • πŸ“± Step-by-step setting up a client without root rights
  • πŸ–₯️ Configuration NFS-server-side NAS
  • ⚑ Optimizing performance for working with media files

πŸ“Š What do you want to use for? NFS Xiaomi 9T?
Streaming movies with NAS
Backup of photographs
Documentation work
Other

Compatibility Check: Does your Xiaomi 9T NFS support?

Before you start setting up, make sure your device is capable of working with NFS. On Xiaomi 9T, this depends on two factors: the version of MIUI and the presence of a kernel with support for nfs.ko.

Open the terminal (for example, via the Termux or ADB app) and execute the command:

ls /proc/filesystems | grep nfs

If you see the nfs in the answer, or nfs4 β€” If you don't, you'll need an alternative method (more on this in the next section). MIUI In Settings β†’ The phone:

MIUI versionSupport for NFSNotes
MIUI 11–12Complete.The nfs.ko module is automatically loaded.
MIUI 13–14Limited.Manual module loading or bypass via Termux is required
MIUI 14 (Global)PartialOnly NFSv3 works, encryption issues

⚠️ Note: On firmware with a blocked bootloader (for example, Chinese versions of Xiaomi) 9T) module NFS In this case, the only way out is to unlock the bootloader or use alternative protocols (SMB, WebDAV).

Installation NFS-Xiaomi client 9T rootless

If your device is compatible, the next step is to install the client, and the most reliable way to do this without root rights is to use Termux with nfs-utils, which allows you to mount network folders right in the Android file system.

Instructions:

  1. Install Termux from F-Droid (Google Play version is stripped down).
  2. Update packages and install nfs-utils: pkg update && pkg upgrade pkg install nfs-utils
  3. Create a mount point: mkdir ~/storage/shared/NFS
  4. mount a network folder (an example for a server with IP 192.168.1.100): mount -t nfs 192.168.1.100:/path/to/share ~/storage/shared/NFS

Termux Storage Allowed in Android| Settings

Installed packets nfs-utils and proot-distro|

Network folder exported to server with rw| rights

IP-server address is recorded in the local network-->

⚠️ Attention: By default MIUI lock-in /storage/emulated/0. Use the path ~/storage/shared β€” This is a workaround solution that works on all versions of firmware.

/path/to/share 192.168.1.0/24(rw,no_root_squash,async)

and reset NFS-server by the Sudo Exportfs team -ra-->

Setting up NFS-servers: requirements and configuration

For work. NFS You need not only a client on a smartphone, but also a properly configured server. Linux/Windows, router NFS (for example, ASUS RT-AX88U) or specialized NAS-device (Synology, QNAP). We will consider a universal version based on Linux (Ubuntu/Debian).

Minimum requirements for the server:

  • πŸ–₯️ Operating system: Linux (Ubuntu recommended) 20.04+) Windows 10/11 service NFS (Requires installation of Services for NFS).
  • 🌐 Static IP-address in the local network (configure in the router) DHCP-reservation).
  • πŸ“‚ Export folder with 777 rights (temporary testing solution).

Installation of the server on Linux:

sudo apt update


sudo apt install nfs-kernel-server

Edit the export file:

sudo nano /etc/exports

Add a line (replace IP with your local network subnet):

/mnt/nfs_share 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)

Apply the changes:

sudo exportfs -a


sudo systemctl restart nfs-kernel-server

How to set up NFS-Windows-server 10/11
1. Energize Services NFS" c β€œProgrammes and components" β†’ "Enabling or disabling Windows components". 2. Open "Computer control" β†’ "Shared folders" β†’ "NFS-commons". 3. Add a folder for export, specifying permissions for the client (IP your Xiaomi 9T). 4. In the file C:\Windows\System32\drivers\etc\hosts.allow Add a line: portmap: 192.168.1.0/255.255.255.0

Mounting NFS-folders in the Android file system

After you set up the server, you just have to connect the network folder to the Xiaomi 9T. There are two options: temporary mounting (before rebooting) and permanent (with auto-starting).

Temporary installation (for testing):

mount -t nfs -o nolock,proto=tcp,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share ~/storage/shared/NFS

Rize and wsize parameters increase the data transfer rate – it is important for streaming video.

Continuous installation (via fstab):

1. Create a file. ~/nfs_mount.sh:

#!/data/data/com.termux/files/usr/bin/bash


mount -t nfs -o nolock,proto=tcp,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share ~/storage/shared/NFS

2. Make it executable:

chmod +x ~/nfs_mount.sh

3.Add to the autoboot Termux (via termux-boot):

pkg install termux-boot


ln -s ~/nfs_mount.sh ~/../usr/etc/termux-boot/

πŸ’‘

For stable NFS on Xiaomi 9T, use the TCP protocol (proto=tcp), not UDP. This reduces the likelihood of connection breakage when transferring large files.

Optimizing Productivity and Solving Problems

NFS on mobile devices often faces two challenges: slow data rates and connection breaks. On Xiaomi 9T, this is due to MIUI's energy saving policy, which suspends network activity in the background.

Optimization methods:

  • ⚑ Turn off battery optimization for Termux: Settings β†’ Annexes β†’ Termux β†’ Battery β†’ No restrictions.
  • πŸ“Ά Use a fixed Wi-Fi channel on your router (e.g., a 48th channel in the 5GHz band) to reduce latency.
  • πŸ”„ Increase the timeouts NFS on the server, adding in /etc/nfs.conf: [nfsd] tcp=y udp=n vers4=y vers4.0=y vers4.1=y vers4.2=y

Common mistakes and their solutions:

Mistake.Reason.Decision
mount: Operation not permittedMIUI blocks mountingUse Termux with proot-distro or unlock bootloader
RPC: Program not registeredNFS-server not runningCheck the status: sudo systemctl status nfs-server
Stale file handleThe server rebooted.Remount the folder or add hard,intr to the mounting options

NFS Alternatives: When to Choose a Different Protocol

NFS is not always the best solution, and if you want high compatibility or traffic encryption, consider alternatives:

SMB (Samba):

  • βœ… It works out of the box. MIUI (through the "Conductor" β†’ Network").
  • βœ… Supports encryption (SMB 3.0+).
  • ❌ Slower. NFS 20-30% for small files.

WebDAV:

  • βœ… Works through HTTPS (securely).
  • βœ… Easy to set up on any hosting.
  • ❌ High load on the processor when encrypting.

SSHFS:

  • βœ… Encrypting traffic out of the box".
  • βœ… It does not require a separate server (sufficient). SSH-access).
  • ❌ Slowly, noticeably. NFS/SMB because of overhead encryption.

πŸ“Š What protocol do you use to access network folders?
NFS
SMB
WebDAV
SSHFS
Other

FAQ: Answers to Frequent Questions

Can I set up NFS on Xiaomi 9T without Termux?
Technically, but with serious limitations. MIUI has a built-in client for SMB (com.android.documentsui), but NFS is not supported at the system level. Alternatives: Applications like NFS Manager (require root); using ADB for manual mounting (inconvenient for permanent use); Termux remains the most versatile solution without root.
Why After Rebooting Your Smartphone NFS-folder disappears?
This is because: MIUI clears the time mount points when rebooting. Termux doesn't start automatically (you need to configure termux-boot). Solution: use the autorun script as described in the "Constant mount" section.
How to transfer files between Xiaomi 9T and NFS at the highest speed?
To speed up transfer: Use rsize=32768,wsize=32768 when mounting. Connect to the router via cable (via USB-ETH adapter) instead of Wi-Fi. Disable encryption on the server (if the network is trusted). On Xiaomi 9T with these settings, the speed reaches 80-90 MB / s (compared to 30-40 MB / s on the SMB).
Is it safe to use NFS on public networks?
No. NFS By default, it does not encrypt traffic, and all data (including logins / passwords) is transmitted in plain form: πŸ”’ NFS over VPN: Raise WireGuard on the server and connect through it. πŸ” SSHFS: mount the folder by SFTP (encryption enabled by default).
Can I stream 4K video with NFS on Xiaomi 9T?
Yes, but with reservations: 🎬 Format H.265 (HEVC) It is played without lag at network speed β‰₯50 MB/s. πŸ“Ά For H.264 30 MB/s is enough, but artifacts can occur with high bitrate. πŸ”Œ Use a wired connection (USB-ETH) It's a stable streaming experience. 9T firmware MIUI 14 and player VLC.