Unlocking the bootloader on Xiaomi smartphones opens up access to advanced customization capabilities, but often leads to problems with work NFC-Users experience payment errors, unstable tag reading or a complete chip failure, and the reason is to change the system partitions that are responsible for the security of payment transactions and device identification.
In this article, we will explain why. NFC It stops working after unlocking the bootloader on 90% of Xiaomi models with a chip NXP, How to diagnose a problem and return functionality without losing data. MIUI, custom firmware (LineageOS, Pixel Experience) and modified versions like MIUI EU or xiaomi.eu.
You will know which system files are responsible for NFC, How to get around the limitations of Google Pay and Mi Pay, and what alternative ways to use the chip remain available even with an unlocked bootloader.The instructions are relevant for models from the Redmi Note 10 Pro to Xiaomi 13 Ultra, but the principles apply to the entire line of smartphones of the brand.
Why? NFC breaks down after unlocking the loader
The main cause of non-working NFC on Xiaomi after unlocking - violation of the chain of trust between hardware keys (sewn into the chip) and the software environment:
- π DRM-keys (widevine) L1 β L3, what NFC-authentication)
- π± Unique device identifiers in the section /persist
- π System Application Signatures (including com.android.nfc)
- π‘οΈ Secure Element (Virtual Element) SIM payment)
As a result, Google Pay and banking applications no longer recognize the device as secure, and the device itself is not safe. NFC-module:
- β Do not turn on at all (grey switch in settings)
- β οΈ Work only for reading tags, not for payments
- π Disconnect spontaneously after restarting
β οΈ Note: On models with a chip NXP PN80T (for example, Xiaomi 12T, Redmi K50 Pro) after release NFC This may require reflashing modem and nvram partitions, without which the chip will be defined as an "unknown device" in #4636##.
How to check if it works NFC on unlocked Xiaomi
Before you try to fix it. NFC, Make sure the problem really exists. Use these diagnostic techniques:
- Visual Check: Go to Settings β Connected devices β NFC. If the switch is gray and inactive, the module is disabled at the system level. If the switch is present, but when it is turned on, it gives an error, the driver problem is the driver.
- Testing through the Engineering Menu: Enter ##4636##, Choose Phone Information β scroll to the block NFC. If there is no status or written N/A β chip is not initialized.
- Tag Reading: Install the App NFC Tools from Google Play. Try reading any label (like a transport card or sticker) If the app doesn't see the chip, it's hardware or kernel-level.
| Symptoms. | Probable cause | Decision |
|---|---|---|
| NFC switch gray | There is no libnfc-nci driver in the /vendor | Reflash the vendor partition or install the Magisk module |
| NFC It's on, but it doesn't see the mark. | Config damaged. /vendor/nfc/libnfc-brcm.conf | Restore the file from the stock firmware |
| Google Pay says "Device not certified" | SafetyNet certification keys dropped | Patch through Magisk + Universal SafetyNet Fix |
π‘
If NFC It only works after restarting, but it is shut down through 5-10 minutes β check the energy saving settings for the com.android.nfc application in Settings β Battery β Optimize. Add it to the exceptions.
Recovery NFC stock-stock MIUI post-unlock
If you are using the official MIUI (even global or Chinese, but with unlocked bootloader, return NFC You can do it without changing the firmware. The key is not to erase the persist partition when you unlock it.
Step-by-step:
Install the latest version MIUI via Fastboot|Download the archive with drivers NFC for your model|Switch vendor and odm through fastboot flash|Install Magisk and Module NFC Fix for MIUI|Reboot the phone and check the chip-->
Detailing the steps:
- Update MIUI: Download the latest fastboot firmware for your model from the Xiaomi Firmware Updater website. Unpack it and run it through the command: fastboot flash system system.img fastboot flash vendor vendor.img Don't use fastboot. -w, so as not to erase!
- Driver Recovery: For models with a chip NXP (Most of the flagships download the archive nfc_fix_[model].zip from the forum 4PDA. Squeeze it through. TWRP or unpack and manually copy the files to /vendor/lib/hw and /vendor/etc.
- SafetyNet Patch: Install Magisk, then Universal SafetyNet Fix (to pass certification) MIUI NFC Enabler (if the chip is not switched on)
After installation, run the command in Terminal:
su
setenforce 0β οΈ Attention: On Xiaomi 11T Pro and 12 Pro after firmware vendor may disappear IMEI. Before the procedure, make a backup of the nvram partition through TWRP or the dd if command=/dev/block/bootdevice/by-name/nvram of=/sdcard/nvram.img.
NFC on custom firmware (LineageOS, Pixel Experience, AOSP)
With custom firmware, the situation is more complicated: NFC It often doesn't work out of the box because of the lack of proprietary Xiaomi drivers:
Method 1: Installation of proprietary libraries
Download the archive. vendor_xiaomi_[model].img from the LineageOS repository or 4PDA. Fly it through fastboot:
fastboot flash vendor vendor_xiaomi.imgThen install the Magisk module. NFC Fix for AOSP, which contains patched libnfc-nci.so and android.hardware.nfc@1.2-service.
Method 2: Manual copying of configs
If NFC turns on, but does not see the tag, copy these files from the stock firmware to /vendor/etc:
- libnfc-brcm.conf (for Broadcom chips)
- libnfc-nxp.conf (for chips) NXP)
- nfc_config.xml (antennae)
The file rights must be 644 (owner: root:root).
| Firmware | Supported chip NFC | Action required |
|---|---|---|
| LineageOS 20 | NXP PN80T, Broadcom BCM2079x | Switch to a vendor + module NFC Fix |
| Pixel Experience 13 | Only NXP (Broadcom is not supported) | Replace libnfc-nci.so from MIUI 13 |
| crDroid 8.x | Any chips. | Install NFC Enabler from Magisk |
Why not? AOSP-firmware NFC It's worse than the MIUI?
Google Pay and Mi Pay restrictions
Even if NFC It's a real-time business, and banking apps can block payments because of an unlocked bootloader:
For Google Pay:
- Install Magisk and modules: Universal SafetyNet Fix (version 2.3.1 or later) MagiskHide Props Config
MagiskHide Props Config
Edit device fingerprint
β Select a certified device (e.g., Pixel 6)
β Apply the changes and rebootSafetyNet
YASNAC
ctsProfile: true
For Mi Pay (China/Russia):
Mi Pay checks partition integrity /product. To cheat the test:
- Download Mi Pay Fix for Unlocked Bootloader from GitHub.
- Install it through Magisk and execute the command: su chmod 644 /product/etc/build.prop echo "ro.boot.verifiedbootstate=orange" >> /product/etc/build.prop
- Clear the Mi Pay data and reboot.
Example of automation settings:
Install Tasker. + NFC Tasks, create a task:
- Add the trigger. NFC Tag Scanned.
- Select the Wi-Fi action β Set On.
- Attach the task to a tag (for example, a sticker on the desktop).
Now, when you touch your phone, Wi-Fi will automatically turn on.
Frequent mistakes and their solutions
Letβs look at the typical problems and ways to solve them:
| Mistake. | Reason. | Decision |
|---|---|---|
| "NFC antenna not connected" | Antenna contact or driver is damaged pn54x_i2c | Take the phone apart and check the plume, run the vendor out of stock firmware. |
| Google Pay: βI couldnβt add a mapβ | Reset HardwareBacked Keystore | Install Keystore Fix and reset Google Play Services data. |
| NFC only works after restarting | com.android.nfc is being killed by the system | Add batteries to exceptions and install module NFC Always On. |
| "Device not certified" in Mi Pay | There's no file. /product/etc/security/otacerts.zip | Copy a file from stock firmware or use Mi Pay Fix. |
If nothing helps:
- Check the log. NFC via adb logcat | grep -i nfc. Look for errors of the kind E/NfcService: Failed to initialize NFC hardware.
- In some models (for example, POCO F3) You need to run modem and nvram from MIUI 12.5, even if it's worth it MIUI 14.
- For Broadcom chips (meet at Redmi) 9T, POCO M3) may require a patch BCM4375B2 via Hex editor.