JNI Version Mismatch with NXP Extensions
Product: PN7160 NFC Controller
Android Version: Android 15 (AOSP)
Build Target: AOSP userdebug build
Issue Description:
We are integrating the PN7160 NFC controller on Android 15 AOSP and encountering JNI registration failures due to apparent version mismatches between NXP NFC components.
Current Status: ✓ AIDL HAL successfully running and registered (android.hardware.nfc.INfc/default)
✓ SELinux policies configured for hal_nfc_default
✓ Device node /dev/nxpnfc accessible
✓ P2P disabled per Android 14+ requirements (P2P_LISTEN_TECH_MASK=0x00)
✗ com.android.nfc crashes during JNI_OnLoad at register_com_android_nfc_NativeNfcManager
Technical Details:
The NFC framework service fails to start due to JNI method signature mismatches between:
- packages/apps/Nfc (com.android.nfc.dhimpl.NativeNfcManager Java methods)
- libnfc_nci_jni.so (native gMethods registration)
This indicates version skew between the NXP repositories when building with -DNXP_EXTNS=TRUE.
Current NXP Repositories in Use:
- packages/apps/Nfc (nxp_nci_hal_nfc)
- system/nfc (nxp_nci_hal_libnfc-nci)
- hardware/nxp/nfc (nfcandroid_nfc_hidlimpl)
- vendor/nxp/frameworks (nfcandroid_frameworks)
- hardware/nxp/emvco (nfcandroid_emvco_aidlimpl)
Request:
Recommended tag/branch alignment for Android 15 AOSP: Which specific NXP release tag should we use across all five repositories for Android 15 compatibility? The AN14608 documentation references NFC_AR_INFRA_001E_15.03.00_OpnSrc, but we need confirmation this is appropriate for AOSP Android 15.
AOSP-specific build configuration: Are there specific build flags or configurations required for AOSP (vs. NXP's reference Android build) that might affect JNI compatibility?
Migration guidance: Is there updated documentation for migrating from Android 14 to Android 15 with NXP extensions enabled?
Environment:
- Kernel: Linux 6.6.x with CONFIG_NFC_NCI, CONFIG_NFC_NCI_SPI enabled
- I2C Interface: /dev/i2c-1, address 0x28
- IRQ: GPIO 26
- Build system: AOSP master branch
Logs Available:
- logcat showing JNI registration failure
- service list output confirming HAL registration
- dmesg showing successful driver probe
We can provide detailed logs and are willing to test any recommended configurations. Our goal is to achieve stable NFC functionality with vendor extensions enabled for potential secure element support.
Would building without NXP_EXTNS=TRUE as a temporary measure affect future enablement of secure element features, or can this be enabled later without major rework?
Thank you for your support.