In the last few months, I have debugged a quite interesting issue concerning Android smartphones running LineageOS and Android version 13+ : The NFC connection to a smartcard (or Apex chip) would just break even though the chip was still computing stuff.
I will spare you the gnarly details, in short the NFC driver used by LineageOS starting with Android 13 is the open-source one from the AOSP project, called NfcNci. Before, the (semi) closed source one was used (NQNfcNci), made by NXP and Qualcomm. Anyway, the open source driver has a “bug” in that it does not wait long enough for a chip to return a response, instead assuming it has been removed.
This issue is quite an easy fix if you have access to the app source code. Fidesmo, for example, has been already notified and will publish this fix very soon.
For all other apps, I present to you a LSPosed module written by me, which modifies any selected apps at runtime and injects the proper NFC driver configuration. This requires a rooted Android phone and some amount of setup, I am not liable for any damage to your smartphone.
Check it out at GitHub - StarGate01/NFCPresenceFix: LSPosed module to fix the NFC presence timeout of AOSP NfcNci .
Read more at:
- Fix NFC presence timeout in Android 13+ by StarGate01 · Pull Request #52 · Governikus/AusweisApp · GitHub
- NfcNci breaks long-running NFC smartcard actions due to EXTRA_READER_PRESENCE_CHECK_DELAY being too short (#7268) · Issues · LineageOS / issues / android · GitLab
- 🇩🇪 NFC Ausweis App - Fehler nach PIN Eingabe - #61 by StarGate01 - Fairphone 3 - Fairphone Community Forum