Skip to content

[miatoll][NFC] NXP NFC HAL crashes during reader-mode requests #1268

Closed as not planned

Description

@innogrey

Device codename

miatoll

crDroid version

crDroid 13

Exact version / build date

13.1 2026-11-18

What's wrong?

Device: Redmi Note 9 Pro (joyeuse / miatoll), NXP NFC controller (nq-nci / PN553)
Working baseline: NFC worked reliably on LineageOS 22.2 on the same hardware (rules out hardware fault)

  1. Initial Failure:
  • NFC toggle in UI shows ON, but scanning tags (NFC Tools) and contactless apps (Revolut) fail.
  • android.hardware.nfc-service.nxp crashes inside /vendor/lib64/nfc_nci_nxp_snxxx.so at:
    phNxpNciHal_write_unlocked(unsigned short, unsigned char const*, int) + 1100
    immediately after logging:
    E/NxpHal : write_unlocked failed - NFCC Maybe in Standby Mode (max count = 0x6)
  • HAL death triggers HalAidlBinderDied: INfc aidl hal died, exiting procces to restart in libnfc_nci and crashes foreground NFC reader calls (DeadObjectException).
  1. Vendor File Comparison (LineageOS 22.2 vs. crDroid 13.1):
  • Configs (libnfc-nci.conf, libnfc-nxp.conf), firmware library (libpn553_fw.so), .rc, and VINTF .xml matched in size/checksum.
  • android.hardware.nfc-service.nxp had identical size (40,336 bytes) with a different checksum.
  • nfc_nci_nxp_snxxx.so differed in size and build: 371,232 bytes in crDroid 13.1 vs. 334,248 bytes in LineageOS 22.2.
  1. Workaround Tested & Current Observations:
  • Systemlessly overlaying LineageOS 22.2's nfc_nci_nxp_snxxx.so (334,248 bytes) onto /vendor/lib64/nfc_nci_nxp_snxxx.so via APatch + OverlayFS metamodule (with SELinux label set to u:object_r:vendor_file:s0, as adb_data_file initially caused avc: denied and CANNOT LINK EXECUTABLE linker errors) resolved the immediate phNxpNciHal_write_unlocked crash loop and restored tag reading in NFC Tools.
  • During toggle/standby testing, intermittent behavior was observed: one dmesg capture showed i2c_geni 880000.i2c: i2c error :-107 and nq-nci 0-0028: nfc_write: failed to write -107, while another toggle log completed Nfc::close -> Nfc::open -> NFA_RF_DISCOVERY_STARTED_EVT and NFA_ACTIVATED_EVT, and after further testing even Off/On toggles worked without reproducing the failure.
  • Also noted in HAL open log: Fw_Lib_Path=/vendor/lib64/libpn557_fw.so failing to load (Error loading FW file !!), followed by D/NxpHal: NFCC Recovery not supported.
  • As a sidenote: After rebooting with the replacement library initially, I observed one instance where NFC stopped responding after toggling it off and on. However, I subsequently tested the same operation again and could no longer reproduce the problem. NFC is currently working, including after NFC off/on cycles.
  1. Related issue
    This may be related to crDroid issue #1185 — NXP NFC HAL crashes when apps request reader mode on POCO F3 (alioth), which reports very similar HAL and I²C errors on different hardware. The issue is on a different device and crDroid version, so I am reporting this separately.

Request:
Please review nfc_nci_nxp_snxxx.so / NFC HAL & standby/power-management configuration on joyeuse (miatoll) for crDroid 13.1 so NFC works out-of-the-box without requiring the LineageOS nfc_nci_nxp_snxxx.so overlay or possible intermittent standby/I2C wake recovery.

Steps to reproduce

  1. Boot crDroid with NFC enabled.
  2. Open NFC Tools and attempt to scan an NFC tag.
  3. Observe the NFC HAL crash and the subsequent NFC service death.
  4. The same failure was also observed when Revolut attempted to use NFC reader mode during its document-verification flow.

Logs (logcat / build log)

NXP HAL:
E/NxpHal: write_unlocked failed - NFCC Maybe in Standby Mode (max count = 0x6)

Kernel / I²C driver:
i2c_geni 880000.i2c: i2c error :-107
nq-nci 0-0028: nfc_write: failed to write -107

Native crash:
Fatal signal 6 (SIGABRT)

Android NFC service:
HalAidlBinderDied: INfc aidl hal died, exiting process to restart

Application:
java.lang.RuntimeException: android.os.DeadObjectException
    at android.nfc.NfcAdapter.enableReaderMode(...)

Screenshots, videos, or extra context

No response

Before submitting

  • I understand that all issues must be written in english. Issues that do not follow this rule will be closed
  • I'm on an official build, running the latest version for my device from crdroid.net (failing this check, closes the issue automatically)
  • I searched existing issues and this isn't a duplicate

Activity

  1. added
    needs-triage
    on Nov 23, 2026
  2. added
    device-not-found
    on Nov 23, 2026
  3. github-actions commented on Nov 23, 2026

    @github-actions

    Device joyeuse, miatoll family was not found in the official support repo for crDroid 13 (branch 17.0), so this issue has been closed automatically.

    Made a typo, or picked the wrong crDroid version? Please open a new issue with the correct codename and version.

    Using an unofficial build or an unlisted device? We can't provide support here for those. You can get help from the community:

  4. innogrey commented on Nov 23, 2026

    @innogrey
    Author

    I'm too lazy to send it once again. In case anyone is interested, please reopen and change the device codename to simply miatoll. The device is supported.

  5. 306bobby-android commented on Nov 23, 2026

    @306bobby-android

    I'm too lazy to send it once again. In case anyone is interested, please reopen and change the device codename to simply miatoll. The device is supported.

    Edit the post. I will reopen

  6. locked and limited conversation to collaborators on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    device-not-foundneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions