How to install NFS Xiaomi devices: from smartphone to TV box

Network file system NFS (Network File System, which allows Xiaomi devices โ€” whether it's a smartphone, tablet or TV box โ€” to connect to remote folders as local drives, and it's convenient for streaming movies from the Internet. NAS, backups or files on the server, but standard firmware MIUI Android TV Xiaomi is often deprived of built-in support NFS, This forces users to look for workarounds.

In this guide, we will discuss all ways of installing NFS-client on Xiaomi devices - from manual mounting through Termux to the use of specialized applications. MIUI 14/15 Android TV 12/13, where security constraints can block network connections. FTP Or Samba, this material is for you.

What is NFS and why is it needed by Xiaomi?

NFS โ€” It was developed in 1984 for Unix systems, but it's still relevant today because of its speed and low network load. SMB (Samba, which is often used in Windows networks, NFS It's optimized for large files and streaming, making it the perfect solution for the world:

  • ๐ŸŽฌ Media centers based on Xiaomi Mi Box or Mi TV Stick โ€“ Playing movies in the 4K HDR bufferless;
  • ๐Ÿ“ฑ Smartphones with limited memory โ€“ storing photos and documents NAS;
  • ๐Ÿ–ฅ๏ธ Backup โ€“ Automatically save backups to a network disk;
  • ๐ŸŽฎ Game consoles (e.g., Xiaomi Game Pad) โ€“ download ROM-s and saves from the server.

The main advantage NFS before alternatives (WebDAV, FTP) โ€” Minimal reading/write delays, such as when playing a video through Kodi, the difference in penguing between the two NFS And Samba can reach 30-50 MS, which is critical for heavy files:

โš ๏ธ Attention: NFS It doesn't encrypt traffic by default. If your network isn't secure, data can be intercepted. NFS top-up VPN or on a local network with WPA3.

ProtocolSpeed.SecurityDifficulty setting upXiaomi support
NFSโญโญโญโญโญโญโญ (codeless)โญโญโญRequires manual installation
SMB (Samba)โญโญโญโญโญโญโญ (s SMB3)โญโญBuilt in MIUI
WebDAVโญโญโญโญโญโญโญ (HTTPS)โญโญWorks through applications
FTPโญโญโญ (without TLS)โญBuilt into the file manager

Preparing Xiaomi device for installation NFS

Before installing NFS-The client must complete several mandatory steps, and omission of these steps may result in mounting errors or complete protocol failure.

  1. Check out the Android version: On smartphones: Settings โ†’ The phone. โ†’ Version. MIUI; On TV boxes: Settings โ†’ The device โ†’ About the system.

NFS It works consistently on Android 9+, but MIUI 12 and later additional permits may be required.

Activate the Developer Mode:

Go to Settings. โ†’ About the phone and 7 times click on the version MIUI. In the developer menu (Settings) โ†’ Additionally. โ†’ For developers, turn on:

  • ๐Ÿ”ง Debugging by USB;
  • ๐Ÿ”ง Allow debugging (only for the purpose of ADB);
  • ๐Ÿ”ง Do not turn off the screen during charging (for settings).
  • Install Termux (for manual mounting): Download Termux from F-Droid (Google Play version is outdated). After installation, update the packages: pkg update &&pkg upgrade pkg install root-repo

Developer mode is on

Installed by Termux (from F-Droid)

Version of Android (9) tested+)

Backup of important data is made

Unplugged. MIUI Optimization (if any)-->

On Android devices TV (For example, Mi Box S or Mi TV Stick's a bit more complicated because of the interface constraints:

  • ๐Ÿ–ฑ๏ธ Connect the mouse to USB/Bluetooth navigationally;
  • ๐Ÿ”Œ Use it. OTG-keyboard;
  • ๐Ÿ“ฑ Install Send Files to TV transmit APK-phone-file.

โš ๏ธ Note: Some Xiaomi models (e.g. Redmi Note) 10 Pro MIUI 13) function MIUI Optimization blocks network connections. To turn it off, run it in Termux: su setprop. persist.sys.miui_optimization_disabled 1 Reboot Requires root rights!

Method 1: Installation NFS via Termux (without root)

This method is suitable for most Xiaomi devices based on Android 9-14 We're going to use Termux to edit it. NFS-handball.

Steps:

  1. Install the necessary packages: pkg install nfs-utils busybox If E: Package not found occurs, update the repositories: pkg update pkg install unstable-repo
  2. Create a mounting point: mkdir ~/nfs_share This folder will be used to access network files.
  3. Connect. NFS-mount -t nfs -o soft,intr,rsize=8192,wsize=8192 [IP_server: [path to folder] ~/nfs_share Example NAS Synology: mount -t nfs -o soft 192.168.1.100:/volume1/media ~/nfs_share

To verify the connection successfully, the server must be allowed to NFS-export for your device. edit the file for this. /etc/exports server-side:

/volume1/media 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)

๐Ÿ’ก

If files are not displayed in Termux after mounting, follow the command ls. -la ~/nfs_share. If the folder is empty, check the permissions on the server or add the nolock option to the mount command.

For automatic connection when starting Termux, add the mount command to the file ~/.bashrc:

  1. Open the file: nano ~/.bashrc
  2. Add a line to the end: mount -t nfs -o soft 192.168.1.100:/volume1/media ~/nfs_share
  3. Save it (Ctrl)+O) and close (Ctrl)+X).

โš ๏ธ Attention: MIUI 14+ Termux can be closed by the system. 5-10 To avoid this, use the command: termux-wake-lock or install the Keep Alive app from F-Droid.

Method 2: Use of client applications (for beginners)

If Termux seems complicated, you can use specialized apps from Google Play that provide a graphical interface for connecting. NFS, but have limitations:

  • ๐Ÿ”„ Require Android 8+;
  • ๐Ÿ’ฐ Some functions are paid;
  • ๐Ÿ› ๏ธ They may not work on MIUI optimised.

The best apps for Xiaomi:

AnnexSupport for NFSRootPrice.Reference
NFS ManagerโญโญโญโญNo.Free (Premium) $2.99)Google Play
Total Commander + PluginโญโญโญNo.Free of charge.Google Play
FX File ExplorerโญโญโญโญNo.$3.99Google Play
X-plore File ManagerโญโญโญNo.Free (Donate)Google Play

Let's look at the settings by example. NFS Manager:

  1. Install the application and open it.
  2. Click + in the lower right corner and select Add NFS Share.
  3. Fill in the fields: Server IP: 192.168.1.100 (address NAS); Shared Folder: /volume1/media; Mount Point: /sdcard/nfs_share (folder).

Advanced Options

soft,intr,rsize=8192,wsize=8192

Save

Mount

How to check the speed NFS-connection?
Use the app. LAN Speed Test (Google Play) or command in Termux: dd if=/dev/zero of=~/nfs_share/testfile bs=1M count=100 The recording speed should be at least 20-30 MB/s in the local network (1 If below, check your router settings (Qos, speed limit).

For Android. TV (Like the Mi Box. 4K) Use Total Commander with a plugin NFS Plugin:

  1. Install Total Commander and NFS Plugin via Send Files to TV.
  2. Open Total Commander, go to the Network โ†’ Add a network connection.
  3. Choose. NFS and enter the server data.
  4. Save the connection and check access to the files.

Instructions:

  1. Check the support NFS at the core: su cat /proc/filesystems | grep nfs If the output is empty, the kernel does not support NFS. In this case, you will need to flash the custom core (for example, FrancoKernel for Poco). F3).
  2. Create a mounting point: mkdir /data/nfs_share
  3. Add a line to /etc/fstab: 192.168.1.100:/volume1/media /data/nfs_share nfs rsize=8192,wsize=8192,soft,intr 0 0 To edit fstab, use Root Explorer or the command: su mount -o rw,remount /system nano /etc/fstab
  4. Apply the changes: mount -a

๐Ÿ’ก

Mounting through /etc/fstab โ€” It's the most reliable way, but it requires root and caution. A syntax error can lead to bootloop).

For automatic mounting during loading:

  1. Create a script. /data/local/userinit.sh:
  2. Make it executable: chmod 755 /data/local/userinit.sh
  3. Add a script call to the /init.rc (Experience with Android is required!).

โš ๏ธ Attention: On devices with MIUI and active MIUI Optimization system scripts can be blocked before editing. /init.rc disable optimization (see section "Preparation of the device").

Setting up NFS server-side (NAS, Linux, Windows)

So that Xiaomi device can connect to the NFS-So, if you want to do this, you need to set it up properly on the server.

1. Setting up NFS on Synology/QNAP

For NAS synology-based DSM or QNAP QTS:

  1. Open the control panel. โ†’ Shared folder.
  2. Select the folder you want to export and click Change.
  3. Go to the tab. NFS And add a rule: IP-address: 192.168.1.0/24 (your subnet); Privileges: Reading/Write; Root squash: Disable; Asynchronous Recording: Enable.

Apply the changes and restart the service NFS.

2. Setting up NFS Linux (Ubuntu/Debian)

Install the server NFS:

sudo apt update


sudo apt install nfs-kernel-server

Edit the file. /etc/exports:

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

Apply the settings:

sudo exportfs -a


sudo systemctl restart nfs-kernel-server

3.Tune in. NFS on Windows (through WSL third-party)

Windows does not support NFS-server out of the box, but there are workarounds:

  • ๐ŸชŸ WSL 2 (Windows Subsystem for Linux) โ€“ Install Ubuntu and configure it NFS inside;
  • ๐Ÿ–ฅ๏ธ haneWIN NFS Server โ€“ paid software with a graphical interface;
  • ๐Ÿ†“ FreeNFS โ€“ a free utility for basic configuration.

Synology

QNAP

Own server on Linux

Windows + WSL

Another option-->

After setting up the server, check the availability of the balls from the Xiaomi device:

showmount -e 192.168.1.100

If the command returns the list of exported folders, the server is configured correctly.

Addressing common problems with NFS Xiaomi

Even with the right setup NFS Xiaomi can make mistakes. Let's look at typical situations and their solutions.

Mistake.Reason.Decision
mount: Operation not permittedLack of rights or MIUI lock-inTurn off MIUI Optimization or use root
mount: Network is unreachableNetwork or firewall problemsCheck ping to server, disable firewall on router
mount: Access deniedIncorrect access rights on the serverCheck it out. /etc/exports and reset NFS-server
The folder is mounted, but empty.Option. no_subtree_check not listedAdd in. no_subtree_check into /etc/exports
Low transmission speedNon-optimal parameters rsize/wsizeIncrease the values to 32768 or 65536

If NFS connects, but files are not played in the player (for example, in Kodi or in the game). VLC), problem:

  • ๐ŸŽต Codecs, set up MX Player with support AC3/DTS;
  • ๐Ÿ“ถ Buffering โ€“ Increase the cache in the player settings;
  • ๐Ÿ”’ Access Rights โ€“ Check that files on the server are readable.
How to eliminate stuttering video when playing on NFS?
1. On the server, increase the rsize and wsize settings to 65536. 2. In the player (Kodi), turn on Adjust display refresh rate and set Sync playback to display. 3. On the router, activate Jumbo Frames (MTU 9000) for gigabit network.

To diagnose network problems, use the commands in Termux:

ping 192.168.1.100


traceroute 192.168.1.100




nmap -p 2049 192.168.1.100

Port 2049 is to be opened on the server.

FAQ: Frequent questions about NFS on Xiaomi

Can I use it? NFS Xiaomi without root?
Yes, with Termux or apps like that. NFS Manager.However, without root, mounting will be temporary and can be reset when restarted.
Why? NFS Itโ€™s slower than Samba on my Redmi Note 11?
Possible reasons: The server is not optimized rsize/wsize (set up 65536); Router limits speed between devices (check QoS); MIUI Restrict background activity (turn off battery optimization for Termux).
How to Automate Connection NFS at the launch of Termux?
Add the mount command to the file ~/.bashrc or use Tasker to automatically run the script when connecting to Wi-Fi.
Can I connect? NFS Xiaomi Mi Box via Ethernet adapter?
Yes, but required: USB-Ethernet adapter with chip AX88179 (Android-supported TV); Static adjustment IP In Settings โ†’ Network; Wi-Fi shutdown for wired connection priority.Cable speed will be higher than Wi-Fi (before) 940 Mbit/s versus 300-400 Mbps 5 GHz).
Is it safe to use? NFS in a public network (for example, in a cafe)?
NFS It does not encrypt traffic, so it is strongly discouraged from using it on public networks: ๐Ÿ”’ VPN (WireGuard or OpenVPN) over NFS; ๐Ÿ” SSHFS โ€” mounting SSH-tunnel; ๐Ÿ“ WebDAV with HTTPS โ€” slower but safer.