How to set up NFS on Xiaomi Mi 9: the complete guide

Owners of the flagship smartphone Xiaomi Mi 9 often face the need for contactless payment, however, in some regional versions or after flashing this feature may not be available or work incorrectly. NFC-The module in this device is a complex component that requires the right hardware and software interaction to work with banking applications. Without proper configuration, even having a physical antenna does not guarantee success when bringing the phone to the terminal.

The activation process depends on a variety of factors, including the version of the MIUI or HyperOS operating system, the region of the firmware and the presence of root rights. In this article, we will discuss all the steps in detail, from simple settings check to complex card emulation through the terminal. It is critical to understand that improper interference with the NFC configuration system files can lead to a complete failure of the communication module.

Before you start deep customization, you need to make sure that your hardware is technically sound and the software is updated to the latest available version. We will consider both standard on-board methods and advanced ways to circumvent the restrictions that can arise when using informal Android builds.

Verification of hardware compatibility and regional versions

The first step should always be a thorough hardware diagnosis. Xiaomi Mi 9 was released in various versions for different markets, and some of them could come with a disabled firmware level. NFC-You need to know exactly the model of your device, since the global version of the Mi 9 Global differs from the Chinese Mi 9 China with a set of preinstalled services.

To quickly check, use an engineering menu or third-party diagnostic tools that can read the status of the module. Enter the Phone app with special code ##6484## to get into the hardware testing menu, and you can find the item responsible for checking the NFC controller and run an automatic test that will show whether the system sees the antenna.

⚠️ Note: If the test is on the engineering menu NFC shows an error or status of "Fail" even on a clean global firmware, it may indicate a physical separation of the antenna plume or a malfunction of the chip itself.

Also, consider that some Chinese versions of MIUI China firmware may not have the required certificates to run Google Pay or Mir Pay as standard, in which case a simple change in region settings will not help, you will need a deeper intervention in the system or install a global version of the software. Make sure that the specifications of your model support the NFC Forum standards.

πŸ“Š What version of the firmware is installed on your Xiaomi Mi 9?
Global (Global)
Chinese (China)
European (EEA)
Indonesian (ID)
Custom (Custom)

Basic activation of NFC through system settings

The standard way to enable the function is available to every user and does not require special knowledge. Go to the Settings menu, find the Connection and Sharing section (or Additional Features in older versions of MIUI). There should be an NFC switch that you need to activate. Once turned on, the system will automatically start the background services to scan the tags.

It is important to set the payment application priority correctly, as there may be several programs that support contactless payment installed on the system. Go to the NFC settings and find the Touch and Pay or Security element, and you should select your main application, such as Google Pay, Mir Pay or Wallet, so that it opens by default when you bring your smartphone to the terminal.

To work smoothly, make sure that the device screen is unlocked or configured to quickly access payment cards. Modern versions of MIUI 12/13/14 and HyperOS have a quick card call with a double press of the power button, which greatly speeds up the payment process in transport or store. Activate this option in the menu "Special features" for maximum convenience.

  • πŸ“± Make sure that the Security and Privacy section of the Wallet app gives you all the necessary permissions.
  • πŸ’³ Check if the card has been added to the application and if it has the status of "Active".
  • πŸ“‘ Make sure that the flight function NFC It is not forced to shut down the system.
  • πŸ”„ Restart the device after first turning on the module to initialize drivers.

β˜‘οΈ Checklist of basic settings

Done: 0 / 5

Using Magisk to bypass security restrictions

Owners of unlocked bootloaders often face a situation where banking applications refuse to work because of root rights. To solve this problem, the Magisk framework is used to hide system modifications from applications with high security requirements. Without this step, configuring NFC on re-energized devices is almost impossible.

Once you install Magisk, you need to activate MagiskHide (or DenyList in the newer versions) and go to Magisk settings, turn on the option, and check boxes against all payment and banking applications, which will make the system pretend that the device does not have superuser rights, which is critical for the operation of SafetyNet and the Play Integrity API.

adb shell su -c"magisk --denylist add com.google.android.gms com.google.android.gms"

In addition, you may need to install modules to fully emulate the original bootloader, as some banks check its signature. Modules like Universal SafetyNet Fix help you pass the integrity check, but it is worth remembering that this is an "arms race" and methods can stop working after updating banking applications.

⚠️ Note: Using Magisk and unlocking the bootloader may result in the cancellation of warranty and inability to use certain applications (for example, banking) if the settings are not properly set.

What if Magisk doesn't hide the root?
Try renaming the Magisk package in the app settings (Hide the Magisk app feature), install the Zygisk module and enable it in the Magisk settings. Also make sure that Magisk itself is updated to the latest stable version.

Advanced Configuration via Terminal and ADB

For users who are not afraid of the command line, a more flexible management method is available. NFC-Connecting Xiaomi Mi 9 to a computer with installed ADB (Android Debug Bridge, which can be sent directly to the system, is especially useful if the GUI is not working properly or hidden by the manufacturer.

With commands, you can forcibly restart NFC-For example, the command adb shell svc nfc enable forcibly turns on the module, even if the switch in the interface "hail". NFC via adb shell pm clear com.android.nfc, which often helps with hanging.

If standard methods don’t help, you can try changing configuration files through the terminal on the device itself (root required). configuration files are usually in /system/etc/ and have the.conf extension. Editing these files requires caution, as a syntax error can lead to bootloop (cyclic reboot).

  • πŸ›  Use the logcat command. | grep NFC Monitoring logs in real time when attempting to pay.
  • πŸ“‚ To edit system files, use a root-access file manager, for example, MT Manager or Root Explorer.
  • πŸ’Ύ Make sure to backup the original configs before any editing.
  • ⚑ After changes in system files, a full cycle of power off and on is required.

πŸ’‘

Use ADB wireless debugging if you don’t have a cable on hand.This feature is available in the Developer Menu on Android 11 and up, allowing you to execute commands directly from your laptop over Wi-Fi.

Diagnostics and Conflict Resolution

Even with the right setup, there can be conflicts between different apps trying to take control of the system. NFC-Often the problem is that a card emulator or third-party launcher intercepts the signal earlier than the payment system, in which case you need to manually manage priorities or temporarily disable unnecessary services.

One of the frequent problems on the Xiaomi Mi 9 is conflict with the MIUI Optimization app or aggressive energy saving. The system can force the NFC background process to save battery power. To avoid this, find the payment system application in the battery settings and set the "No Limits" mode.

It’s also worth checking for updates to Google Play’s payment apps and services themselves. Outdated versions may not work properly with new Android versions or security patches. If the problem comes after a system update, try clearing the cache of the Google Play Services app and adding the card again.

Symptoms.Possible causeMethod of decision
The phone vibrates, but the payment does not passBank communication error or incorrect pin codeCheck the Internet, recheck the pin code of the card
Module not switched on (grey switch)Driver conflict or physical breakdownReset network settings, check in the engineering menu
The app says "The device is not certified"Loader unlocked or there is a RootMagiskHide setting, stock image firmware
NFC shuts down in a few seconds.Aggressive energy saving MIUIDisabling battery optimization for NFC-service

πŸ’‘

Most NFC software failures are solved by completely resetting network settings or updating payment applications to the latest version from the official store.

FAQ: Frequently Asked Questions on NFC on Xiaomi

Can I install the NFC module if it is not in the Xiaomi Mi 9 configuration?
No, NFC is a hardware module (chip and antenna) that is physically embedded in a smartphone board. Software-based software can't add this feature to a device where it's not provided by the manufacturer. If your Mi 9 version (usually budget versions for some markets) doesn't have NFC in the specifications, no firmware will help.
Is it safe to pay with a phone installed with Magisk?
In theory, if MagiskHide is perfectly configured and passes Play Integrity, banks see the device as secure, but the risks remain: updates to banking applications can suddenly begin to detect root rights, leading to the blocking of access to the account through the application.
Why does NFC work with access cards but not with payment?
This indicates that the hardware and tag readers are working, but the problem lies in the payment software (tokenization).Most likely, Google SafetyNet security checks are not passed, the application is not certified, or the card is not supported by a specific payment system in your region.
Does a protective glass or cover affect the performance of NFC?
Regular silicone cases and thin glass do not affect the signal. However, cases with metal inserts, magnetic fasteners or very thick shock-proof cases can shield the antenna. The Xiaomi Mi 9 antenna is located at the top of the rear cover, so make sure that this area is not covered with metal.
How to completely reset the NFC settings?
To reset completely, go to Settings β†’ Connection & Sharing β†’ NFC and turn off the feature. Then, in the app menu, find β€œSettings”, select β€œStorage” and click β€œClear Data”. It’s also helpful to reset the network settings in the phone’s shared menu, which will delete all stored Bluetooth and Wi-Fi pairs, and reset NFC settings.