[XDA Assist] misterbobdobalina:
NFC doesnt work on my Galaxy S4 I9505.

I have flashed this stock rom:

https://www.sammobile.com/firmwares/download/59972/I9505XXUHOJ2_I9505HTSHOI2_HTS/

which works otherwise perfectly. I have also new battery which says Nearfield Communication on it. It also looks like there is an antenna. It wasn't a cheap bettery either. Supposedly original from a local dealer.

This is what I get from adb when I turn on NFC:

02-22 19:48:26.862 1223-1650/? E/NFC: isNFCEnabled - Begin
02-22 19:48:26.882 1223-1650/? E/NFC: isNFCStateChangeAllowed - Begin
02-22 19:48:26.922 1489-10930/? E/NfcService: ChinaNalSecurity skip - intentional by user action and Process is com.android.systemui(1223)
02-22 19:48:26.962 1489-10930/? E/NfcAdaptation: NfcAdaptation::Initialize: ver=NFCA-500-10_00.01 nfa=NFA_PI_1.03.66+
02-22 19:48:26.972 1489-10930/? E/NfcAdaptation: No HAL module specified in config, falling back to BCM2079x
02-22 19:48:26.972 1489-10930/? E/NfcNciHal: HaiInitializeLibrary: ver=NFCA-500-10_00.01 nfa=NFA_PI_1.03.66+
02-22 19:48:26.982 1489-14907/? E/NfcNfa: NFC_RegVSCback failed
02-22 19:48:30.906 1489-10930/? E/BrcmNfcJni: nfcManager_doInitialize: fail nfa enable; error=0x0
02-22 19:48:32.007 1489-10930/? E/NfcAdaptation: NfcAdaptation::Initialize: ver=NFCA-500-10_00.01 nfa=NFA_PI_1.03.66+
02-22 19:48:32.027 1489-10930/? E/NfcAdaptation: No HAL module specified in config, falling back to BCM2079x
02-22 19:48:32.027 1489-10930/? E/NfcNciHal: HaiInitializeLibrary: ver=NFCA-500-10_00.01 nfa=NFA_PI_1.03.66+
02-22 19:48:32.438 1489-14944/? E/NfcNfa: NFC_RegVSCback failed
02-22 19:48:33.869 1489-14944/? E/NfcNfa: nfa_ce_api_dereg_listen (): cannot find listen_info for UICC
02-22 19:48:33.879 1489-1489/? E/BrcmNfcJni: SecureElement::clearRoutingEntry: type=0x2
02-22 19:48:33.879 1489-1489/? E/BrcmNfcJni: SecureElement::clearRoutingEntry: type=0x1
02-22 19:48:33.879 1489-1489/? E/BrcmNfcJni: RoutingManager::setListenTech, numEE : [0x2]
02-22 19:48:33.879 1489-1489/? E/BrcmNfcJni: RoutingManager::setListenTech, eeInfo[0]: 4f2, ee status [ 0]
02-22 19:48:33.879 1489-1489/? E/BrcmNfcJni: RoutingManager::setListenTech, eeInfo[1]: 4f4, ee status [ 0]
02-22 19:48:33.879 1489-14944/? E/NfcNfa: nfa_ce_api_dereg_listen (): cannot find listen_info for UICC

And when I turn it off I get this:

02-22 19:50:01.054 1223-1650/? E/NFC: isNFCStateChangeAllowed - Begin
02-22 19:50:01.104 1489-14984/? E/BrcmNfcJni: nativeLlcpServiceSocket_doAccept: fail accept
02-22 19:50:01.104 1489-14984/? E/SnepServer: IO error
java.io.IOException
at com.android.nfc.dhimpl.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:42)
at com.android.nfc.snep.SnepServer$ServerThread.run(SnepServer.java:211)
02-22 19:50:01.114 1489-14985/? E/BrcmNfcJni: nativeLlcpServiceSocket_doAccept: fail accept
02-22 19:50:01.114 1489-14985/? E/NdefPushServer: IO error
java.io.IOException
at com.android.nfc.dhimpl.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:42)
at com.android.nfc.ndefpush.NdefPushServer$ServerThread.run(NdefPushServer.java:160)
02-22 19:50:01.114 1489-14986/? E/BrcmNfcJni: nativeLlcpServiceSocket_doAccept: fail accept
02-22 19:50:01.114 1489-14986/? E/HandoverServer: IO error
java.io.IOException
at com.android.nfc.dhimpl.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:42)
at com.android.nfc.handover.HandoverServer$ServerThread.run(HandoverServer.java:108)
02-22 19:50:01.114 1489-14987/? E/BrcmNfcJni: nativeLlcpServiceSocket_doAccept: fail accept
02-22 19:50:01.114 1489-14987/? E/SnepServer: IO error
java.io.IOException
at com.android.nfc.dhimpl.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:42)
at com.android.nfc.snep.SnepServer$ServerThread.run(SnepServer.java:211)
02-22 19:50:01.114 1489-14944/? E/BrcmNfcJni: SecureElement::nfaHciCallback: unknown event code=0x1 ????
02-22 19:50:01.114 1489-14944/? E/BrcmNfcJni: RoutingManager::nfaEeCallback: unknown event=0x2 ????

Any ideas what might be happening?