Network file system NFS (Network File System allows you to turn your Xiaomi Redmi Note 8 Pro into a full-fledged client for working with remote directories - whether it is home. NAS, A Linux server or even some other Android device that supports the protocol, unlike the traditional cloud storage like Google Drive, NFS It offers direct access to files over a local network without synchronization and data limitations, and is ideal for a library, backup, or large file environment (e.g., video in a video format). 4K).
However, the setup NFS Android is not a trivial task. Xiaomi smartphones are based on MIUI They don't have built-in protocol support, so you'll have to use third-party tools and manual configurations. In this guide, we'll look at two scenarios: connecting to an existing one. NFS-server (for example, on a router or PC) and organize the server directly on the Redmi Note 8 Pro using Termux.
What is NFS and why you need it on your smartphone
Protocol NFS (Network File System was developed by Sun Microsystems in 1984, but it is still one of the most efficient ways to share files on local networks. SMB (which is often used in Windows, or FTP, NFS optimized for Unix-like systems and provides:
- ๐ Transparent access to remote folders as if they are on a local device.
- โก Minimum overhead โ transfer speed is limited only by network bandwidth.
- ๐ Flexible access rights (through the UID/GID), What is important for multi-user systems.
- ๐ฅ๏ธ Support for large files (up to 8 EB in) NFSv4) Long names (up to 255 characters).
Xiaomi Redmi Note 8 Pro NFS may be useful:
- ๐ฌ Streaming video from NAS without prior download (ideal for Kodi or VLC).
- ๐ฑ Backup of photos and documents to the server in automatic mode.
- ๐ป Development โ if you use your smartphone as a terminal for working with remote projects.
- ๐ฎ Storage of game files (e.g. emulators or modified game files) APK).
It is important to understand that NFS It does not encrypt traffic by default (unlike the default traffic code). SFTP If your network is not secure, the data can be intercepted. NFS top-up VPN or in an isolated local area network.
Requirements and preparation of the device
Before you start setting up, make sure your Redmi Note 8 Pro and network meet the minimum requirements:
| Component | Requirements | Notes |
|---|---|---|
| Android version | 9.0 Pie and higher | Nana MIUI 12+ Additional permissions may be required for Termux. |
| Root rights | Not required, but they make it easier to set up. | Without root, you will need to use workarounds (for example, Termux with proot). |
| Network | Wi-Fi 5 (802.11ac) or Ethernet through OTG | NFS Sensitive to delays โ avoid congested networks. |
| NFS-server | Any (Linux, Windows with) NFS-server, router) | For tests, you can deploy the server to a PC with Ubuntu or Docker. |
| Free seat | 100+ MB on the device | You need to install Termux, BusyBox and client utilities. |
If you are planning to connect to an existing NFS-server, you'll need:
- ๐ IP-server address (e.g. 192.168.1.100).
- ๐ Exportable path (e.g, /mnt/nfs_share).
- ๐ Access rights (UID/GID Your user on the server).
โ ๏ธ Attention: On some firmware MIUI (especially global) access to mount system calls can be blocked, in which case only unlocking the bootloader and installing the custom core will help.
To organize the server directly on the smartphone will require:
- ๐ง Termux (from F-Droid, not Google Play!).
- ๐ฆ BusyBox and nfs-utils (installed via Termux).
- ๐ Static IP smartphone-on-local network.
๐ก
Before starting work, disable battery optimization for Termux in Android settings (Settings) โ Annexes โ Termux โ Battery โ No restrictions. This will prevent the interruption of sessions with long work.
Termux installation and environment preparation
Termux is a Linux terminal emulator for Android that will allow us to install the necessary packages to work with. NFS. It is important to use the F-Droid version as the Google Play version is outdated and does not support many commands.
Installation steps:
- Download and install Termux from the official F-Droid repository.
- Run Termux and run the packet update command: pkg update & pkg upgrade -y
- Install BusyBox and proot (the latter is needed to emulate root access without real root): pkg install busybox proot -y
- Install utilities to work with NFS: pkg install nfs-utils -y
If you see an Unable to install error at some point, try clearing the Termux cache:
pkg clean
rm -rf /data/data/com.termux/files/usr/var/cache/aptAfter installation, check the availability of commands:
which mount.nfs
which showmountBoth commands must return paths to binary options (e.g, /data/data/com.termux/files/usr/bin/mount.nfs).
โ ๏ธ Note: On some devices, Xiaomi Termux may not have access to the /dev In this case, only root rights or alternative methods (e.g., chroot in user space) will help).
โ๏ธ Preparation of Termux for NFS
Connection to existing NFS-server
If you already have NFS-A server (e.g., on a router with OpenWRT or a home PC with Ubuntu) can be connected to it from a smartphone in a few steps.
Step 1. Create a mounting point
In Termux, do:
mkdir ~/nfs_shareThis folder will be used to access the server files.
Step 2: Find out the export parameters on the server
On the server (if you have access to it) do:
sudo exportfs -vYou'll see a list of exported directories and allowed hosts, for example:
/mnt/nfs_share 192.168.1.0/24(rw,sync,no_subtree_check)This means that the catalogue /mnt/nfs_share Available for recording (rw) to all devices on the subnet 192.168.1.0/24.
Step 3: Catalogue mounting
In Termux, run the mount command (replace). IP and the way):
mount -t nfs -o soft,intr,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share ~/nfs_shareParameters:
- soft โ breaks the connection when the server freezes (useful for mobile networks).
- intr โ allows you to interrupt operations (for example, when unmounting).
- rsize/wsize=8192 โ Read/write block size (optimizes speed).
If the installation is successful, check the contents of the folder:
ls ~/nfs_shareStep 4: Automatic mounting at start-up
To avoid entering a command every time, add it to the file. ~/.bashrc:
echo 'mount -t nfs -o soft,intr,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share ~/nfs_share' >> ~/.bashrcThe directory will be automatically mounted when Termux is launched.
What to do if the installation is suspended?
Setting up NFS-servers on Xiaomi Redmi Note 8 Pro
If you need to turn around NFS-The server is directly on your smartphone (for example, to share files with other devices), this is also possible - but with reservations. unfs3 โ user-implementation NFS-A server that does not require root rights.
Step 1 Installation unfs3
In Termux, do:
pkg install unfs3 -yStep 2: Creation of an exportable catalogue
Select the folder you want to make available over the network, for example:
mkdir ~/shared_folder
echo "Test file" > ~/shared_folder/test.txtStep 3: Start the server
Follow the command (replace the path with your own):
unfsd -e ~/shared_folder -p 2049Parameters:
- -e โ catalogue.
- -p โ port (default) 2049).
Step 4: Customization of customers
Now other devices on your network can connect to the NFS-For example, on a Linux machine, do it:
mount -t nfs -o nolock,soft 192.168.1.200:/shared_folder /mnt/nfs_clientWhere 192.168.1.200 โ IP Your Redmi Note 8 Pro.
โ ๏ธ Attention: Server unfs3 Termux only works while the terminal window is open. To keep it running in the background, use tmux or screen: pkg install tmux -y tmux new -s nfs_server unfsd -e ~/shared_folder -p 2049 Press Ctrl.+B, then D to detach from the
Step 5: Optionally: Password Protection
By default. unfs3 It doesn't support authentication:
- ๐ Restrict access to IP router-setting.
- ๐ Use it. VPN Connecting from outside the local network.
- ๐ Change your exported catalog regularly (for example, through cron to Termux).
๐ก
server NFS It's only suitable for temporary file sharing on a smartphone, and it's best to deploy it on a desktop PC or for permanent use. NAS โ It's safer and faster.
Optimizing speed and eliminating errors
NFS It can run slowly on Android due to network limitations or incorrect settings. Here's how to speed up data transfer and fix common bugs:
Acceleration of transmission
- ๐ถ Use 5 GHz Wi-Fi โ itโs less congested and provides more bandwidth.
- ๐ง Increase the block size to rsize=32768,wsize=32768 (if the network is stable).
- ๐ Turn off power saving for Wi-Fi in Android settings.
- ๐ก Connect to Ethernet via USB-OTG adapter (if the router supports).
Common mistakes and decisions
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: permission denied | Not enough rights on the server or client. | Check the export on the server and UID On the client, try the mount. -o nolock. |
| server not responding | The server is unavailable or blocks requests. | Check the firewall (ufw status on the server) and ping to the device. |
| Protocol not supported | An outdated version NFS (for example, v2 instead v3/v4). | Update the server or specify the version explicitly: mount -o nfsvers=3. |
| Input/output error | Problems with the network or disk on the server. | Check the dmesg on the server and the stability of the connection. |
If you see a mount error: /dev/block/vold: No such file or directory, this means that Termux cannot access system calls:
- ๐ Get root rights and mount in /data/local/nfs.
- ๐ฑ Use alternative clients (for example, NFS Manager from Google Play).
- ๐ง Go to custom firmware (like LineageOS) where the restrictions are minimal.
๐ก
To diagnose problems, use the strace mount command. -t nfs... in Termux. It will show the system calls and the point where the crash occurs.
Alternative ways to connect network disks
If setting up NFS seems too complicated, consider alternative protocols for accessing network folders:
- ๐ SMB (Samba โ standard for Windows, supported by many Android applications (e.g., Windows, FX File Explorer or Solid Explorer).
- ๐ WebDAV works through HTTP/HTTPS, It is easy to configure on any web server (Apache, Nginx).
- ๐ SSHFS โ mounting a remote file system SSH (It requires Termux and sshfs).
- โ๏ธ OwnCloud/Nextcloud โ Self-hosting cloud with a mobile client.
Comparison of protocols:
| Protocol | Speed. | Security | Difficulty setting up |
|---|---|---|---|
| NFS | โญโญโญโญโญ | โญโญ (codeless) | โญโญโญโญ |
| SMB | โญโญโญโญ | โญโญโญ (support) | โญโญ |
| SSHFS | โญโญโญ | โญโญโญโญโญ (default-encryption) | โญโญโญ |
| WebDAV | โญโญ | โญโญโญโญ (HTTPS) | โญโญ |
For most users SMB It's easier to set up and has good support in Android, but if you want top speed (for example, for streaming video) 4K), NFS It's the best option.