NFS on Xiaomi with SberPay: A Complete Guide to Setup Network Storage

Network storage by protocol NFS (Network File System allows you to turn your Xiaomi smartphone into a full-fledged client for working with remote folders - whether it is a smartphone. NAS-server, home PC or cloud. But what if you have a Sberbank-branded SberPay on your device that limits some system functions? NFS-Xiaomi client with SberPay firmware, and optimize the work with network disks.

It's important to understand that SberPay is not just a shell, it's a modified firmware with its own security rules. NFS (through mount or applications like NFS Managers may not work due to root permissions and kernel level restrictions, but there are workarounds ranging from manually mounted Termux to dedicated kernel-level controls. ADB-We'll look at all the relevant ways, including solutions for MIUI 14 and MIUI 15.

Before you start, make sure your Xiaomi meets the minimum requirements:

  • πŸ“± Version. MIUI: 14.0.5+ or 15.0.1+ (Check in the settings β†’ The phone).
  • πŸ”Œ Network connection: Wi-Fi 5/6 (NFS delay-sensitive, 4G not recommended).
  • πŸ”’ Unlocked bootloader: Some methods require fastboot oem unlock.
  • πŸ› οΈ ADB-Access: Enable Debugging by USB In Settings β†’ For developers.
πŸ“Š What network storage protocol do you use?
NFS
SMB
WebDAV
FTP
I don't use it.

1. Xiaomi Preparation for NFS: Unlocking and ADB

The first step is to prepare the device. SberPay's firmware blocks many system functions, so you can't get NFS on without first manipulating it, starting with unlocking the bootloader (if it's locked) and setting up the ADB.

To unlock the loader:

  1. Go to the Mi Unlock website and download the Mi Unlock Tool.
  2. Link your Mi Account to your device in Settings β†’ Xiaomi Account.
  3. Launch your phone in Fastboot mode (hold Power + Volume down when turned on).
  4. Connect the device to your PC and follow the instructions in the Mi Unlock Tool.

After unlocking, turn on debugging via USB:

  1. Go to Settings β†’ About Phone and tap 7 times on the MIUI version to activate the developer menu.
  2. Back to Settings β†’ Additionally. β†’ For developers.
  3. Activate Debugging over USB and Allow OEM unlocking.

⚠️ Attention: Unlocking the bootloader will reset all data on the device! make a backup through Settings β†’ System system β†’ Backup.

β˜‘οΈ Preparation for setup NFS

Done: 0 / 5

2. Installation of necessary tools: Termux and BusyBox

Since SberPay limits installation of system applications, the main tool for working with NFS is Termux (the Android terminal).

Installation instructions:

  1. Download Termux from F-Droid.
  2. Open the application and execute commands: pkg update & pkg upgrade pkg install root-repo pkg install busybox proot-distro
  3. Install Ubuntu distribution for full-featured work with NFS: proot-distro install ubuntu proot-distro login ubuntu

After entering the Ubuntu environment, install NFS packages:

apt update


apt install nfs-common

If you have an E: Unable to locate package, add a repository:

echo "deb http://archive.ubuntu.com/ubuntu focal main" >> /etc/apt/sources.list

πŸ’‘

If Termux doesn’t start after installation, try disabling MIUI Optimization in the developer settings (Settings β†’ Developer β†’ Disable MIUI optimization).

3.Tune in. NFS-servers: requirements and configuration

Before connecting to NFS-Make sure the server is properly configured. NAS (for example, Synology or QNAP) Linux PC with running nfs server.

Minimum requirements for the server:

  • πŸ–₯️ OS: Linux (Ubuntu/Debian) or NAS supportive NFSv3/v4.
  • πŸ“‘ Network: Static IP-address (set up in router) DHCP-reservation).
  • πŸ” Export: The folder must be exported with read/write rights.

Example of /etc/exports configuration on the server:

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

After editing, restart the service:

sudo exportfs -a


sudo systemctl restart nfs-kernel-server

NFS parameterMeaningDescription
rwReading/writingAllows you to change files
syncSynchronous recordingGuarantees the safety of data
no_root_squashRoot rightsAllows root access from the client
no_subtree_checkDisabling the verificationAccelerates work with nested folders

⚠️ Attention: Parameter no_root_squash It's not safe, you can only use it on trusted networks.

4. NFS Connection to Xiaomi via Termux

Now, to the mounting process itself, in Termux, do the following:

1. Create a mounting point:

mkdir ~/nfs_mount

2. Connect. NFS-resource (replace) IP and the way):

mount -t nfs 192.168.1.100:/mnt/nfs_share ~/nfs_mount -o rw,soft,timeo=3,retrans=2

Mounting parameters:

  • πŸ”„ soft – breaks the connection in case of errors (useful for mobile networks).
  • ⏱️ timeo=3 – server response timeout (reduces delays).
  • πŸ” retrans=2 - Number of repeated attempts.

If the installation is successful, check the contents:

ls ~/nfs_mount
What to do if mount gives an error "Permission denied"
1. Check the export rights on the server (/etc/exports). 2. Make sure that Xiaomi has access to the local network for Termux (Settings β†’ Applications β†’ Termux β†’ Rights β†’ Local Network). 3. Try adding the nolock option to the command mount. 4. If NFSv4 is used, specify the version explicitly: -o vers=4.0.

5. Automatic NFS connection when booting

To avoid mounting after each restart, set up automatic mounting via Termux:Boot:

1. Install the plugin:

pkg install termux-boot

2. Create a script in ~/.termux/boot/:

mkdir -p ~/.termux/boot


echo 'mount -t nfs 192.168.1.100:/mnt/nfs_share ~/nfs_mount -o rw,soft,timeo=3,retrans=2' > ~/.termux/boot/nfs_mount.sh




chmod +x ~/.termux/boot/nfs_mount.sh

3. Allow auto-start Termux:

  • Open Settings β†’ Applications β†’ Termux β†’ Autorun.
  • Enable the option to Allow Auto Start.

⚠️ Note: When updating Termux scripts in ~/.termux/boot/ They may be reset. It's recommended to back them up.

πŸ’‘

Automatic mounting via Termux:Boot only works if the Termux application has not been forcibly stopped by the system. For reliability, add it to battery optimization exceptions (Settings β†’ Battery β†’ Battery Optimization β†’ All applications β†’ Termux β†’ No restrictions).

6. Solving Common NFS Errors on Xiaomi

Even with the right setup, there can be problems, and let's look at the typical errors and their solutions.

Mistake.Reason.Decision
mount: Operation not permittedNo root or SberPay blocking rightsUse proot or ADB with superuser rights
NFS server not respondingProblems with the network or firewallCheck ping to server, disable firewall on router
Stale file handleThe server restarted or changed the exportRemove the resource (umount & & mount)
Permission denied (13)Incorrect rights on the serverCheck /etc/exports and chmod 777 on the folder

If the error is related to SberPay, try to bypass the restrictions through ADB:

adb shell


su




mount -o remount,rw /system




echo "192.168.1.100:/mnt/nfs_share /data/nfs nfs rw,soft 0 0" >> /etc/fstab

Important: Changing /etc/fstab without root rights can make it impossible to boot the system!

7. Optimizing speed and safety of NFS

NFS is sensitive to network delays, so it is recommended to:

  • πŸ“Ά Use Wi-Fi 6: Reduces ping and increases bandwidth.
  • πŸ”’ Encrypt traffic: Set up your traffic NFS over TLS or VPN (For example, WireGuard).
  • ⚑ Disconnect energy saving: In Settings β†’ Battery Add Termux to Exceptions.
  • πŸ“ Cache data: Mount with the rsize option=8192,wsize=8192 to increase the buffer.

Example of an optimized mounting command:

mount -t nfs 192.168.1.100:/mnt/nfs_share ~/nfs_mount -o rw,soft,timeo=3,retrans=2,rsize=8192,wsize=8192,noatime

To check the speed, use dd:

dd if=/dev/zero of=~/nfs_mount/testfile bs=1M count=100

Record: 100 MB file



dd if=~/nfs_mount/testfile of=/dev/null bs=1M



Reading: speed in MB/s

πŸ’‘

If the read/write speed is below 10 MB/s, check the server load and the quality of the Wi-Fi signal. Use ping 192.168.1.100 and iptraf-ng in Termux for diagnostics.

FAQ: Frequent questions on NFS on Xiaomi with SberPay

Can I connect NFS without root rights?
Yes, but with limitations. Termux allows you to mount NFS in user space without superuser rights, but some features (such as automatic mounting on boot) may not work. Full integration will require unlocking the bootloader and installing Magisk.
Why did MIUI NFS stop working after the update?
SberPay often resets security settings when it updates. Check: Is debugging enabled by USB (Settings β†’ Does the antivirus (e.g. Sberbank Online) block network connections? Update packages in Termux (pkg update & & pkg upgrade).
How to unmount NFS if Termux is frozen?
If the app does not respond, use ADB: adb shell su umount -f ~/nfs_mount If this doesn’t help, reboot your device – SberPay will automatically unmount all network resources.
Can I use NFS for backup?
Technically yes, but it is not recommended. NFS It doesn't support versioning and encryption out of the box. SSH Or specialized applications like Swift Backup (requires root). Example of a backup command: rsync -avz --delete /sdcard/ ~/nfs_mount/backup/
How to connect to NFS via mobile Internet (4G/5G)
NFS is not optimized for high latency, but you can try: Use a VPN (like Tailscale) to create a direct tunnel. Mount with soft,timeo=10,retrans=5 options. Limit reading-only use (ro). Expect low speed and possible connection breaks.