PN7160 PN7220 Android 15 Porting to i.MX8MN EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7160 PN7220 Android 15 Porting to i.MX8MN EVK

PN7160 PN7220 Android 15 Porting to i.MX8MN EVK

Introduction

We have an official PN7160/PN7220 Android 15 porting guide (PN7160/PN7220 – Android 15 porting guide). But the patches only for Android 15 AOSP r1 (android-15.0.0_r1). If customer want to porting to the newer release of AOSP, there will have many errors during the source code compiling. This document is for customer reference to solve the error one by one. 

 

NOTE :  All the modifications are just for reference. They are NOT a NXP official patches for the newer release of AOSP porting. So the modifications may not be the best solution. Customer please base on their needs to modify the AOSP source code. This is not for production. Customer still need to perform full testing after the porting. 

 

Hardware boards:

i.MX8MN EVK (i.MX 8M Nano Evaluation Kit | NXP Semiconductors)

8mnevk.jpg

 

PN7160 EVK (OM27160| Development Kits for PN7160 Plug'n Play NFC Controller | NXP Semiconductors)

pn7160.jpg

 

bothevk.jpg

 

The connection between i.MX8MN EVK and PN7160 OM29110ARD-B

i.MX8M Nano EVK

pin

PN7160

pin

3.3V

J1003-1

VDD(3.3v)

J1-4

5V

J1003-2

VBAT (5v)

J1-5 

I2C3 SDA

J1003-3

SDA

J2-2

I2C3 SCL

J1003-5

SCL

J2-1

GPIO3_22

J1003-37

IRQ

J2-10

GPIO3_21

J1003-38

REQ

J4-2

GND

J1003-39

GND

J1-6

GPIO3_20

J1003-40

VEN

J4-1

 

 

Build the Android for i.MX8MN EVK

The i.MX Android BSP that I used is Android 15.0.0_2.0.0 (L6.12.20_2.0.0 BSP). It could be downloaded from here: Android OS for i.MX Applications Processors | NXP Semiconductors

1. Download the "Documentation" and the "Install Source Package". 

2. Follow the steps in Android User's Guide to build the Android BSP for i.MX8MN EVK first. 

 

According to the android_build/.repo/manifests/aosp-android-15.0.0_2.0.0.xml, you will see the AOSP version is android-15.0.0_r32.

 

Reference documents for porting:

PN7160/PN7220 – Android 15 porting guide 

Porting PN7160 to Android 14 on i.MX8M Nano board

 

Now, we start the porting: 

1. Kernel Driver

To establish connection with the PN7220 or PN7160, the Android stack uses the nxpnfc kernel driver.  You could download the driver from github below:

nfcandroid_platform_drivers/drivers at br_ar_16_comm_infra_dev · nxp-nfc-infra/nfcandroid_platform_d...

 

The command is :

git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_drivers.git" -b br_ar_16_comm_infra_dev

 

There is driver for Kernel 6.6 and 6.12. So, please download the correct one for your porting. For example, the kernel in i.MX Android BSP Android 15.0.0_2.0.0 is 6.12. So I will use the 6.12 driver for my porting.

 

In your porting, make sure the PATH in Makefile and Kconfig files are setting properly. 

For example in my porting:

android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ tree
.
├── Kconfig
├── Makefile
└── pn7160
        ├── common.c
        ├── common.h
        ├── i2c_drv.c
        ├── i2c_drv.h
        ├── Kbuild
        ├── Kconfig
        ├── Makefile
        ├── spi_drv.c
        └── spi_drv.h

1 directory, 11 files

 

The contents of Kconfig and Makefile:

android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Makefile
#
# Makefile for the kernel nfc device drivers.
#
obj-y += pn7160/

android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Kconfig
source "drivers/nfc/pn7160/Kconfig"

 

2. Adding the "nxpnfc" to the i.MX8MN EVK device tree file

&i2c3 {
   clock-frequency = <100000>;
   pinctrl-names = "default", "gpio";
   pinctrl-0 = <&pinctrl_i2c3>;
   pinctrl-1 = <&pinctrl_i2c3_gpio>;
   scl-gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
   sda-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
   status = "okay";

   nxpnfc@28{
        compatible = "nxp,nxpnfc";
        reg = <0x28>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_nfc>;

        nxp,nxpnfc-irq = <&gpio3 22 0>;
        nxp,nxpnfc-ven = <&gpio3 20 0>;
        nxp,nxpnfc-fw-dwnld = <&gpio3 21 0>;
   };

The GPIO settings in the IOMUXC:

&iomuxc {
   pinctrl_nfc: nfcgrp {
        fsl,pins = <
           MX8MN_IOMUX_SAI5_RXC_GPIO3_IO20                 0X19  // VEN
           MX8MN_IOMUX_SAI5_RXD0_GPIO3_IO21                0X19  // FW-DWNLD
           MX8MN_IOMUX_SAI5_RXD1_GPIO3_IO22                0X19  // IRQ
         >;
   };

 

3. Modify the imx8mn_gki.fragment

File:  android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mn_gki.fragment

Add the "CONFIG_NXP_NFC_I2C=m" into the imx8mn_gki.fragment

 

4. Add the settings in your corresponding board configuration files in Android

- Go to the android_build/device/nxp/imx8m/evk_8mn/ 

- Modify the BoardConfig.mk.

# selinux permissive
+ BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive

BOARD_SEPOLICY_DIRS := \
       $(CONFIG_REPO_PATH)/imx8m/sepolicy \
       $(IMX_DEVICE_PATH)/sepolicy  \
+       vendor/nxp/nfc/sepolicy \
+       vendor/nxp/nfc/sepolicy/nfc

 

- Add the "nxpnfc_i2c.ko" to the ShareBoardConfig.mk. Make sure the path and the filename are correct.

    $(KERNEL_OUT)/drivers/net/phy/realtek.ko \
    $(KERNEL_OUT)/drivers/pps/pps_core.ko \
    $(KERNEL_OUT)/drivers/ptp/ptp.ko \
    $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko
+   $(KERNEL_OUT)/drivers/nfc/pn7160/nxpnfc_i2c.ko
endif

    $(KERNEL_OUT)/drivers/trusty/trusty-core.ko \
    $(KERNEL_OUT)/drivers/trusty/trusty-log.ko \
    $(KERNEL_OUT)/drivers/trusty/trusty-ipc.ko \
    $(KERNEL_OUT)/drivers/trusty/trusty-virtio.ko \
+   $(KERNEL_OUT)/drivers/nfc/pn7160/nxpnfc_i2c.ko
else
BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
   $(KERNEL_OUT)/drivers/input/touchscreen/goodix_ts.ko \
   $(KERNEL_OUT)/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.ko
Endif

 

- Add the following to the Compatibility_matrix.xml

<compatibility-matrix version="1.0" type="device">
    <hal format="native" optional="false">
        <name>netutils-wrapper</name>
        <version>1.0</version>
    </hal>
    <hal format="aidl" optional="true">
        <name>android.hardware.emvco</name>
        <version>1</version>
        <interaface>
            <name>IEmvco</name>
            <instance>default</instance>
        </interface>
    </hal>
</compatibility-matrix>

 

- Add the following to the device_framework_matrix.xml

<compatibility-matrix version="1.0" type="framework">
    <hal format="aidl" optional="true">
        <name>nxp.hardware.secureime</name>
        <version>1</version>
        <interface>
            <name>ISecureIME</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="aidl" optional="true">
        <name>nxp.hardware.imx_dek_extractor</name>
        <version>1</version>
        <interface>
            <name>IDek_Extractor</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="hidl">
        <name>vendor.nxp.nxpnfc</name>
        <version>2.0</version>
        <interface>
            <name>INxpNfc</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="aidl" optional="true">
        <name>android.hardware.emvco</name>
        <version>1</version>
        <interface>
            <name>IEmvco</name>
            <instance>default</instance>
        </interface>
    </hal>
</compatibility-matrix>

 

- Add the following to the evk_8mn.mk

# ------nfc-------
$(call inherit-product, vendor/nxp/nfc/device-nfc.mk)
$(call inherit-product, vendor/nxp/emvco/device-emvco.mk)
PRODUCT_PACKAGES += \
        android.hardware.nfc-service.nxp

PRODUCT_PACKAGES += \
        com.nxp.emvco \
        com.nxp.nfc \
        nfc_nci_nxp_pn72xx

 

- Add the nxpnfc_i2c in init.rc

    # Grant permission for fetching available_pages info of statsd
    chown system system /proc/pagetypeinfo
    chmod 0440 /proc/pagetypeinfo

    exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \
    /vendor/lib/modules nxpnfc_i2c
    write /sys/power/wake_lock nosleep

on post-fs-data && property:vendor.skip.charger_not_need=0
    setprop vold.post_fs_data_done 1

 

- Add nxpnfc to ueventd.nxp.rc

/sys/devices/virtual/thermal/thermal_zone* trip_point_0_hyst 0660 system system
/sys/devices/virtual/thermal/thermal_zone* trip_point_1_hyst 0660 system system

/dev/dmabuf_imx           0664   system     system
/sys/class/backlight/* brightness 0660 system system

/dev/ttymxc1              0666   nfc   nfc
/dev/ttymxc2              0666   nfc   nfc
/dev/nxpnfc               0666   nfc   nfc

# for libcamera
/dev/media* 0660 system camera
/dev/v4l-subdev* 0660 system camera

 

5. Apply the NXP AOSP patches

As the official NXP NFC patches is only for AOSP android-15.0.0_r1, and there are big different between android-15.0.0_r1 and android-15.0.0_r32. So, before apply the patches, I copy the nfc folders from android-15.0.0_r1 to replace the nfc folders in android-15.0.0_r32.

 

First, download the AOSP android-15.0.0_r1 from github.

$ mkdir android-15.0.0_r1 
$ cd android-15.0.0_r1 
$ repo init -u https://android.googlesource.com/platform/manifest -b android-15.0.0_r1
$ repo sync

 

Then, remove the following folders from android-15.0.0_r32. And then copy the following nfc folders from android-15.0.0_r1 to replace the same folders in android-15.0.0_r32.

packages/apps/Nfc

frameworks/base/nfc

frameworks/base/nfc-extras

system/nfc

 

for example:

$ rm -rf android_build/packages/apps/Nfc
$ cp -ra android-15.0.0_r1/packages/apps/Nfc android_build/packages/apps/

 

I write a script to download the patches from the github. Customer could put the following scripts on the same directory with android_build.

AOSP_adaptation.sh

# nxp_nci_hal_nfc
git clone "https://github.com/nxp-nfc-infra/nxp_nci_hal_nfc.git"
cd nxp_nci_hal_nfc
git checkout br_ar_15_comm_infra_dev
cp -rf *  ../android_build/packages/apps/Nfc/
cd ..

# nxp_nci_hal_libnfc-nci
git clone "https://github.com/nxp-nfc-infra/nxp_nci_hal_libnfc-nci.git"
cd nxp_nci_hal_libnfc-nci
git checkout br_ar_15_comm_infra_dev
cp -rf *  ../android_build/system/nfc/
cd ..

# nfcandroid_nfc_hidlimpl
git clone "https://github.com/nxp-nfc-infra/nfcandroid_nfc_hidlimpl.git"
cd nfcandroid_nfc_hidlimpl
git checkout br_ar_15_comm_infra_dev
cp -rf *  ../android_build/hardware/nxp/nfc
cd ..

# nfcandroid_frameworks
git clone "https://github.com/nxp-nfc-infra/nfcandroid_frameworks.git"
cd nfcandroid_frameworks
git checkout br_ar_15_comm_infra_dev
mkdir ../android_build/vendor/nxp/frameworks
cp -rf * ../android_build/vendor/nxp/frameworks
cd ..

# nfcandroid_emvco_aidlimpl
git clone "https://github.com/nxp-nfc-infra/nfcandroid_emvco_aidlimpl.git"
cd nfcandroid_emvco_aidlimpl
git checkout br_ar_15_comm_infra_dev
mkdir  ../android_build/hardware/nxp/emvco
cp -rf *  ../android_build/hardware/nxp/emvco
cd ..

# nfcandroid_platform_reference
git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_reference.git"
cd nfcandroid_platform_reference
git checkout br_ar_15_comm_infra_dev
cp -rf vendor/nxp/*   ../android_build/vendor/nxp/
cd ..

# nfcandroid_infra_test_apps
git clone https://github.com/nxp-nfc-infra/nfcandroid_infra_test_apps.git
cd nfcandroid_infra_test_apps/
git checkout br_ar_15_comm_infra_dev
cd test_apps/
cp -rf SMCU_Switch/  ../../android_build/packages/apps/
cp -rf EMVCoModeSwitchApp/  ../../android_build/packages/apps/Nfc/
cp -rf load_unload/  ../../android_build/hardware/nxp/nfc/
cp -rf SelfTestAidl/  ../../android_build/hardware/nxp/nfc/
cd ../..

# nfcandroid_infra_comm_libs
git clone "https://github.com/nxp-nfc-infra/nfcandroid_infra_comm_libs.git"
cd nfcandroid_infra_comm_libs
git checkout br_ar_15_comm_infra_dev
cp -rf nfc_tda/  ../android_build/system/
cp -rf emvco_tda/ emvco_tda_test/  ../android_build/hardware/nxp/emvco/
cp -rf NfcTdaTestApp/  ../android_build/packages/apps/Nfc/
cd ..

 

Apply_patches.sh

cd android_build/build/bazel/
patch -p1 <  ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_build_bazel.patch
cd ../release
patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_build_release.patch
cd ../../external/libchrome
patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_external_libchrome.patch
cd ../../frameworks/base
patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_frameworks_base.patch
cd ../../system/logging
patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_system_logging.patch

 

So, run the AOSP_adaptation.sh first, then run the Apply_patches.sh.

 

6. Put changes into hardwatre/interfaces/compatibility_matrices

Different compatibility matrix for different Android versions.

File: android_build/hardware/interfaces/compatibility_matrices/compatibility_matrix.202404.xml

    <hal format="aidl">
        <name>android.hardware.audio.effect</name>
        <version>1-2</version>
        <interface>
            <name>IFactory</name>
            <instance>default</instance>
        </interface>
    </hal>
+   <hal format="aidl" optional="true">
+       <name>nxp.hardware.imx_dek_extractor</name>
+       <version>1</version>
+       <interface>
+           <name>IDek_Extractor</name>
+           <instance>default</instance>
+       </interface>
+   </hal>
+   <hal format="hidl" optional="true">
+       <name>vendor.nxp.nxpnfc</name>
+       <version>2.0</version>
+       <interface>
+           <name>INxpNfc</name>
+           <instance>default</instance>
+       </interface>
+   </hal>
+   <hal format="aidl" optional="true">
+       <name>vendor.nxp.emvco</name>
+       <version>1</version>
+       <interface>
+           <name>INxpEmvco</name>
+           <instance>default</instance>
+       </interface>
+   </hal>
    <hal format="aidl">
        <name>android.hardware.audio.sounddose</name>
        <version>1-3</version>

 

7. Change the device specific .mk

For pn7160, NXP_NFC_HW should equal to pn7160.

For pn7220, NXP_NFC_HW should equal to pn7220_i2cs.

 

File : android_build/vendor/nxp/nfc/device-nfc.mk

#####
##### NXP NFC Device Configuration makefile
######

NXP_NFC_HOST := $(TARGET_PRODUCT)
ifndef TARGET_NXP_NFC_HW
NXP_NFC_HW := pn7160
else
NXP_NFC_HW := $(TARGET_NXP_NFC_HW)
endif
NXP_NFC_PLATFORM := pn54x
NXP_VENDOR_DIR := nxp
NXP_I2CM_S := $(TARGET_NXP_I2C_M_S)

 

File: android_build/vendor/nxp/emvco/device-emvco.mk

NXP_VENDOR_DIR := nxp
NXP_NFC_HW := $(TARGET_NXP_NFC_HW)
ifeq ($(strip $(TARGET_NXP_NFC_HW)),)
    NXP_NFC_HW := pn7160
endif

# Nfc service has dependency with EMVCo JAR
PRODUCT_PACKAGES += \
    com.nxp.emvco

 

8. Now, you can start to build the Android BSP

For i.MX8MN EVK, 

$ source build/envsetup.sh
$ lunch evk_8mn-nxp_stable-userdebug
$ export TARGET_RELEASE=nxp_stable
$ build_build_var_cache
$ ./imx-make.sh -j4 2>&1 | tee build-log.txt

 

When building the BSP, there will have many errors during the build. I list some errors and the reference solution below for customer reference. 

Error

 

Reference Solution

 

Complain about the nfc_aconifg_flags.

packages/apps/Nfc/flags/Android.bp

aconfig_declarations {
//    name: "nfc_aconfig_flags",
    name: "com.android.nfc.flags-aconfig",
    package: "com.android.nfc.flags",
    container: "system",
    srcs: ["nfc_flags.aconfig"],
}

java_aconfig_library {
//    name: "nfc_aconfig_flags_lib",
//    aconfig_declarations: "nfc_aconfig_flags",
    name: "com.android.nfc.flags-aconfig-java",
    aconfig_declarations: "com.android.nfc.flags-aconfig",
    min_sdk_version: "33",
    apex_available: [
        "//apex_available:platform",
        "com.android.nfcservices",
    ],
}

java_library {
    name: "nfc_flags_lib",
    sdk_version: "system_current",
    min_sdk_version: "33",
    srcs: [
        "lib/**/*.java",
    ],
    static_libs: [
        "com.android.nfc.flags-aconfig-java",
    ],
Complain about the android.hardware.nfc-V2-ndk  File: hardware/interfaces/nfc/aidl/vts/functional/Android.bp

 

Change android.hardware.nfc-V2-ndk  to vendor.nxp.nxpnfc_aidl-V2-ndk

 

platform_testing/build/tasks/tests/native_test_list.mk: error: continuous_native_tests: Unknown installed file for module 'libnfc-nci-jni-tests'

remove 'libnfc-nci-jni-tests' in 

native_test_list.mk

error: packages/apps/Nfc/tests/instrumentation/Android.bp:6:1: module "NfcNciInstrumentationTests" variant "android_common": cannot depend directly on java_sdk_library "android.test.runner"; try depending on "android.test.runner.stubs", "android.test.runner.stubs.system", "android.test.runner.stubs.test", or "android.test.runner.impl" instead

 

The hints are gave in the error message..

Change the "android.test.runner" to "android.test.runner.stubs", "android.test.runner.stubs.system", "android.test.runner.stubs.test", or "android.test.runner.impl".

error: vendor/nxp/frameworks/nfc/Android.bp:12:1: module "com.nxp.nfc" variant "android_common": depends on //frameworks/base/nfc:framework-nfc.impl which is not visible to this module

You may need to add "//vendor/nxp/frameworks/nfc" to its visibility

File : frameworks/base/nfc/Android.bp

   permitted_packages: [
        "android.nfc",
        "com.android.nfc",
    ],
    impl_library_visibility: [
        "//frameworks/base:__subpackages__",
        "//cts/hostsidetests/multidevices/nfc:__subpackages__",
        "//cts/tests/tests/nfc",
        "//vendor:__subpackages__",
        "//packages/apps/Nfc:__subpackages__",
    ],

 

packages/apps/Nfc/nci/src/com/android/nfc/dhimpl/NativeT4tNfceeManager.java:20: error: duplicate class: com.android.nfc.dhimpl.NativeT4tNfceeManager

 

Edit the file

packages/apps/Nfc/nci/src/com/android/nfc/dhimpl/NativeT4tNfceeManager.java

then comment out the duplicated class.

android/R.java:12483: error: could not resolve field FLAG_NFC_ASSOCIATED_ROLE_SERVICES

    @android.annotation.FlaggedApi(android.nfc.Flags.FLAG_NFC_ASSOCIATED_ROLE_SERVICES)

Edit 

frameworks/base/nfc/java/android/nfc/flags.aconfig

Add the below flag.

flag {
    name: "nfc_associated_role_services"
    is_exported: true
    namespace: "nfc"
    description: "Share wallet role routing priority with associated services"
    bug: "366243361"
}

 

FAILED:

platform_testing/build/tasks/tests/native_test_list.mk: error: continuous_native_tests: Unknown installed file for module 'libnfc-nci-tests'

 

Remove the libnfc-nci-tests in native_test_list.mk.

 

prebuilts/clang/host/linux-x86/clang-r536225/include/c++/v1/string:780:43: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'

  780 |   static_assert((is_same<_CharT, typename traits_type::char_type>::value),

      |                                           ^

packages/apps/Nfc/nci/jni/NativeNfcTda.cpp:32:35: note: in instantiation of template class 'std::basic_string<unsigned char>' requested here

   32 | static std::basic_string<uint8_t> sRxTdaDataBuff;

      |                                   ^

 

 Edit the packages/apps/Nfc/nci/jni/NativeNfcTda.cpp
using android::base::StringPrintf;
extern bool nfc_debug_enabled;
SyncEvent sCtLibSyncEvt;
//static std::basic_string<uint8_t> sRxTdaDataBuff;
static std::basic_string<char> sRxTdaDataBuff;

packages/apps/Nfc/nci/jni/NativeT4tNfcee.cpp:493:21: error: no matching member function for call to 'append'

  493 |       sRxDataBuffer.append(data.p_data, data.len);

      |       ~~~~~~~~~~~~~~^~~~~~

Edit the packages/apps/Nfc/nci/jni/NativeT4tNfcee.cpp
void NativeT4tNfcee::t4tReadComplete(tNFA_STATUS status, tNFA_RX_DATA data) {
  mT4tOpStatus = status;
  if (status == NFA_STATUS_OK) {
    if (data.len > 0) {
      sRxDataBuffer.insert(sRxDataBuffer.end(), data.p_data,
                           data.p_data + data.len);
      LOG(DEBUG) << StringPrintf("%s: Read Data len new: %d ", __func__,
                                 data.len);
    }
  }
  SyncEventGuard g(mT4tNfcEeRWCEvent);
  mT4tNfcEeRWCEvent.notifyOne();
}

frameworks/base/core/java/android/provider/Settings.java:2351: error: could not resolve field FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS

    @FlaggedApi(android.nfc.Flags.FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS)

 

File: frameworks/base/nfc/java/android/nfc/flags.aconfig

Add the following to the flags.aconfig

flag {
    name: "nfc_action_manage_services_settings"
    is_exported: true
    namespace: "nfc"
    description: "Add Settings.ACTION_MANAGE_OTHER_NFC_SERVICES_SETTINGS"
    bug: "358129872"
}

 

There are some errors are not listed in the table because there will have some hints to correct the error in the error message. Customer could follow the hints and base on the needs to modify the source code.

Sometime, customer could compare the source code between r1 and r32. Here is the AOSP source code android-15.0.0_r32  and the android-15.0.0_r1.

 

9. Download the image to the i.MX8MN EVK board

- Switch to download mode on the 8MN EVK board

evk_switch.png

- Download the Android 15 BSP i.MX8MN EVK demo image from the Android BSP web page first. Because there are UUU script and necessary image files already in the demo image package. 

- Download the UUU from here : Releases · nxp-imx/mfgtools

- Put the UUU executable file into the demo image folder. uuu_imx_android_flash.bat is the script also in the same folder.

- After your building is succeed, Copy the images to the demo image folder. The images are located in android_build/out/target/product/evk_8mn/

- Run the UUU script to download the images to the EVK board.

uuu.jpg

 

Reference:

i.MX6ULL EVK running Yocto Linux + PN7160

Porting PN7160 to Android 14 on i.MX8M Nano board

Android OS for i.MX Applications Processors | NXP Semiconductors

PN7160/PN7220 – Android 15 porting guide

Plug-n-Play NFC Frontend with Integrated Firmware | NXP Semiconductors

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2251755%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3EPN7160%20PN7220%20Android%2015%20Porting%20to%20i.MX8MN%20EVK%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251755%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3E%3CSTRONG%3EIntroduction%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EWe%20have%20an%20official%20PN7160%2FPN7220%20Android%2015%20porting%20guide%20(%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14608.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPN7160%2FPN7220%20%E2%80%93%20Android%2015%20porting%20guide%3C%2FA%3E).%20But%20the%20patches%20only%20for%20Android%2015%20AOSP%20r1%20(android-15.0.0_r1).%20If%20customer%20want%20to%20porting%20to%20the%20newer%20release%20of%20AOSP%2C%20there%20will%20have%20many%20errors%20during%20the%20source%20code%20compiling.%26nbsp%3B%3CSPAN%3EThis%20document%20is%20for%20customer%20reference%20to%20solve%20the%20error%20one%20by%20one.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ENOTE%20%3A%26nbsp%3B%20All%20the%20modifications%20are%20just%20for%20reference.%20They%20are%20NOT%20a%20NXP%20official%20patches%20for%20the%20newer%20release%20of%20AOSP%20porting.%20So%20the%20modifications%20may%20not%20be%20the%20best%20solution.%20Customer%20please%20base%20on%20their%20needs%20to%20modify%20the%20AOSP%20source%20code.%26nbsp%3B%3CSPAN%3EThis%20is%20not%20for%20production.%20Customer%20still%20need%20to%20perform%20full%20testing%20after%20the%20porting.%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3E%3CU%3EHardware%20boards%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3Ei.MX8MN%20EVK%3C%2FSTRONG%3E%3C%2FFONT%3E%20(%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2F8MNANOD4-EVK%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ei.MX%208M%20Nano%20Evaluation%20Kit%20%7C%20NXP%20Semiconductors%3C%2FA%3E)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%228mnevk.jpg%22%20style%3D%22width%3A%20800px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%228mnevk.jpg%22%20style%3D%22width%3A%20800px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367851iCF011D987783F675%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228mnevk.jpg%22%20alt%3D%228mnevk.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3EPN7160%20EVK%3C%2FFONT%3E%26nbsp%3B%3C%2FSTRONG%3E(%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2FPN7160-EVK%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EOM27160%7C%20Development%20Kits%20for%20PN7160%20Plug'n%20Play%20NFC%20Controller%20%7C%20NXP%20Semiconductors%3C%2FA%3E)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pn7160.jpg%22%20style%3D%22width%3A%20749px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pn7160.jpg%22%20style%3D%22width%3A%20749px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367852i343DE605B05AD87A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pn7160.jpg%22%20alt%3D%22pn7160.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bothevk.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22bothevk.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367853i8F52094F25B34CA8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22bothevk.jpg%22%20alt%3D%22bothevk.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EThe%20connection%20between%20i.MX8MN%20EVK%20and%20PN7160%20OM29110ARD-B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3Ei.MX8M%20Nano%20EVK%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3Epin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EPN7160%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3Epin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3E3.3V%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EVDD(3.3v)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1-4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3E5V%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EVBAT%20(5v)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1-5%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EI2C3%20SDA%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-3%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3ESDA%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ2-2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EI2C3%20SCL%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-5%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3ESCL%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ2-1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EGPIO3_22%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-37%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EIRQ%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ2-10%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EGPIO3_21%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-38%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EREQ%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ4-2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EGND%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-39%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EGND%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1-6%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EGPIO3_20%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ1003-40%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23800000%22%3EVEN%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22156px%22%20height%3D%2239px%22%3E%0A%3CP%3EJ4-1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CU%3E%3CSTRONG%3EBuild%20the%20Android%20for%20i.MX8MN%20EVK%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EThe%20i.MX%20Android%20BSP%20that%20I%20used%20is%26nbsp%3B%3CSPAN%3EAndroid%2015.0.0_2.0.0%20(L6.12.20_2.0.0%20BSP).%20It%20could%20be%20downloaded%20from%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Fembedded-software%2Fi-mx-software%2Fandroid-os-for-i-mx-applications-processors%3AIMXANDROID%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAndroid%20OS%20for%20i.MX%20Applications%20Processors%20%7C%20NXP%20Semiconductors%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E1.%20Download%20the%20%22Documentation%22%20and%20the%20%22Install%20Source%20Package%22.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2.%20Follow%20the%20steps%20in%20Android%20User's%20Guide%20to%20build%20the%20Android%20BSP%20for%20i.MX8MN%20EVK%20first.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EAccording%20to%20the%20android_build%2F.repo%2Fmanifests%2Faosp-android-15.0.0_2.0.0.xml%2C%20you%20will%20see%20the%20AOSP%20version%20is%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eandroid-15.0.0_r32.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EReference%20documents%20for%20porting%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14608.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPN7160%2FPN7220%20%E2%80%93%20Android%2015%20porting%20guide%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNFC-Knowledge-Base%2FPorting-PN7160-to-Android-14-on-i-MX8M-Nano-board%2Fta-p%2F2001159%22%20target%3D%22_blank%22%3EPorting%20PN7160%20to%20Android%2014%20on%20i.MX8M%20Nano%20board%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ENow%2C%20we%20start%20the%20porting%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CU%3E1.%20Kernel%20Driver%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20establish%20connection%20with%20the%20PN7220%20or%20PN7160%2C%20the%20Android%20stack%20uses%20the%20nxpnfc%20kernel%20driver.%26nbsp%3B%20You%20could%20download%20the%20driver%20from%20github%20below%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_platform_drivers%2Ftree%2Fbr_ar_16_comm_infra_dev%2Fdrivers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Enfcandroid_platform_drivers%2Fdrivers%20at%20br_ar_16_comm_infra_dev%20%C2%B7%20nxp-nfc-infra%2Fnfcandroid_platform_d...%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20command%20is%20%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Egit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_platform_drivers.git%22%20-b%20br_ar_16_comm_infra_dev%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EThere%20is%20driver%20for%20Kernel%206.6%20and%206.12.%20So%2C%20please%20download%20the%20correct%20one%20for%20your%20porting.%20For%20example%2C%20the%20kernel%20in%20i.MX%20Android%20BSP%20Android%2015.0.0_2.0.0%20is%206.12.%20So%20I%20will%20use%20the%206.12%20driver%20for%20my%20porting.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EIn%20your%20porting%2C%20make%20sure%20the%20PATH%20in%20Makefile%20and%20Kconfig%20files%20are%20setting%20properly.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFor%20example%20in%20my%20porting%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eandroid_build%2Fvendor%2Fnxp-opensource%2Fkernel_imx%2Fdrivers%2Fnfc%24%20tree%0A.%0A%E2%94%9C%E2%94%80%E2%94%80%20Kconfig%0A%E2%94%9C%E2%94%80%E2%94%80%20Makefile%0A%E2%94%94%E2%94%80%E2%94%80%20pn7160%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20common.c%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20common.h%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20i2c_drv.c%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20i2c_drv.h%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20Kbuild%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20Kconfig%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20Makefile%0A%20%20%20%20%20%20%20%20%E2%94%9C%E2%94%80%E2%94%80%20spi_drv.c%0A%20%20%20%20%20%20%20%20%E2%94%94%E2%94%80%E2%94%80%20spi_drv.h%0A%0A1%20directory%2C%2011%20files%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20contents%20of%20Kconfig%20and%20Makefile%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eandroid_build%2Fvendor%2Fnxp-opensource%2Fkernel_imx%2Fdrivers%2Fnfc%24%20cat%20Makefile%0A%23%0A%23%20Makefile%20for%20the%20kernel%20nfc%20device%20drivers.%0A%23%0Aobj-y%20%2B%3D%20pn7160%2F%0A%0Aandroid_build%2Fvendor%2Fnxp-opensource%2Fkernel_imx%2Fdrivers%2Fnfc%24%20cat%20Kconfig%0Asource%20%22drivers%2Fnfc%2Fpn7160%2FKconfig%22%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E2.%20Adding%20the%20%22nxpnfc%22%20to%20the%20i.MX8MN%20EVK%20device%20tree%20file%3C%2FU%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bi2c3%20%7B%0A%20%20%20clock-frequency%20%3D%20%26lt%3B100000%26gt%3B%3B%0A%20%20%20pinctrl-names%20%3D%20%22default%22%2C%20%22gpio%22%3B%0A%20%20%20pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_i2c3%26gt%3B%3B%0A%20%20%20pinctrl-1%20%3D%20%26lt%3B%26amp%3Bpinctrl_i2c3_gpio%26gt%3B%3B%0A%20%20%20scl-gpios%20%3D%20%26lt%3B%26amp%3Bgpio5%2018%20GPIO_ACTIVE_HIGH%26gt%3B%3B%0A%20%20%20sda-gpios%20%3D%20%26lt%3B%26amp%3Bgpio5%2019%20GPIO_ACTIVE_HIGH%26gt%3B%3B%0A%20%20%20status%20%3D%20%22okay%22%3B%0A%0A%20%20%20nxpnfc%4028%7B%0A%20%20%20%20%20%20%20%20compatible%20%3D%20%22nxp%2Cnxpnfc%22%3B%0A%20%20%20%20%20%20%20%20reg%20%3D%20%26lt%3B0x28%26gt%3B%3B%0A%20%20%20%20%20%20%20%20pinctrl-names%20%3D%20%22default%22%3B%0A%20%20%20%20%20%20%20%20pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_nfc%26gt%3B%3B%0A%0A%20%20%20%20%20%20%20%20nxp%2Cnxpnfc-irq%20%3D%20%26lt%3B%26amp%3Bgpio3%2022%200%26gt%3B%3B%0A%20%20%20%20%20%20%20%20nxp%2Cnxpnfc-ven%20%3D%20%26lt%3B%26amp%3Bgpio3%2020%200%26gt%3B%3B%0A%20%20%20%20%20%20%20%20nxp%2Cnxpnfc-fw-dwnld%20%3D%20%26lt%3B%26amp%3Bgpio3%2021%200%26gt%3B%3B%0A%20%20%20%7D%3B%0A%0AThe%20GPIO%20settings%20in%20the%20IOMUXC%3A%0A%0A%26amp%3Biomuxc%20%7B%0A%20%20%20pinctrl_nfc%3A%20nfcgrp%20%7B%0A%20%20%20%20%20%20%20%20fsl%2Cpins%20%3D%20%26lt%3B%0A%20%20%20%20%20%20%20%20%20%20%20MX8MN_IOMUX_SAI5_RXC_GPIO3_IO20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200X19%20%20%2F%2F%20VEN%0A%20%20%20%20%20%20%20%20%20%20%20MX8MN_IOMUX_SAI5_RXD0_GPIO3_IO21%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200X19%20%20%2F%2F%20FW-DWNLD%0A%20%20%20%20%20%20%20%20%20%20%20MX8MN_IOMUX_SAI5_RXD1_GPIO3_IO22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200X19%20%20%2F%2F%20IRQ%0A%20%20%20%20%20%20%20%20%20%26gt%3B%3B%0A%20%20%20%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E3.%20Modify%20the%26nbsp%3Bimx8mn_gki.fragment%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EFile%3A%26nbsp%3B%20android_build%2Fvendor%2Fnxp-opensource%2Fkernel_imx%2Farch%2Farm64%2Fconfigs%2Fimx8mn_gki.fragment%3C%2FP%3E%0A%3CP%3EAdd%20the%20%22CONFIG_NXP_NFC_I2C%3Dm%22%20into%20the%26nbsp%3Bimx8mn_gki.fragment%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E4.%20Add%20the%20settings%20in%20your%20corresponding%20board%20configuration%20files%20in%20Android%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E-%20Go%20to%20the%26nbsp%3Bandroid_build%2Fdevice%2Fnxp%2Fimx8m%2Fevk_8mn%2F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-%20Modify%20the%26nbsp%3BBoardConfig.mk.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20selinux%20permissive%0A%2B%20BOARD_KERNEL_CMDLINE%20%2B%3D%20androidboot.selinux%3Dpermissive%0A%0ABOARD_SEPOLICY_DIRS%20%3A%3D%20%5C%0A%20%20%20%20%20%20%20%24(CONFIG_REPO_PATH)%2Fimx8m%2Fsepolicy%20%5C%0A%20%20%20%20%20%20%20%24(IMX_DEVICE_PATH)%2Fsepolicy%20%20%5C%0A%2B%20%20%20%20%20%20%20vendor%2Fnxp%2Fnfc%2Fsepolicy%20%5C%0A%2B%20%20%20%20%20%20%20vendor%2Fnxp%2Fnfc%2Fsepolicy%2Fnfc%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20the%20%22nxpnfc_i2c.ko%22%20to%20the%20ShareBoardConfig.mk.%20Make%20sure%20the%20path%20and%20the%20filename%20are%20correct.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fnet%2Fphy%2Frealtek.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fpps%2Fpps_core.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fptp%2Fptp.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fnet%2Fethernet%2Ffreescale%2Ffec.ko%0A%2B%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fnfc%2Fpn7160%2Fnxpnfc_i2c.ko%0Aendif%0A%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Ftrusty%2Ftrusty-core.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Ftrusty%2Ftrusty-log.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Ftrusty%2Ftrusty-ipc.ko%20%5C%0A%20%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Ftrusty%2Ftrusty-virtio.ko%20%5C%0A%2B%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Fnfc%2Fpn7160%2Fnxpnfc_i2c.ko%0Aelse%0ABOARD_VENDOR_RAMDISK_KERNEL_MODULES%20%2B%3D%20%5C%0A%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Finput%2Ftouchscreen%2Fgoodix_ts.ko%20%5C%0A%20%20%20%24(KERNEL_OUT)%2Fdrivers%2Finput%2Ftouchscreen%2Fsynaptics_dsx%2Fsynaptics_dsx_i2c.ko%0AEndif%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20the%20following%20to%20the%20Compatibility_matrix.xml%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CCOMPATIBILITY-MATRIX%20version%3D%221.0%22%20type%3D%22device%22%3E%0A%20%20%20%20%3CHAL%20format%3D%22native%22%20optional%3D%22false%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Enetutils-wrapper%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1.0%3C%2FVERSION%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%20%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Eandroid.hardware.emvco%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERAFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EIEmvco%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERAFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%3C%2FCOMPATIBILITY-MATRIX%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20the%20following%20to%20the%26nbsp%3Bdevice_framework_matrix.xml%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CCOMPATIBILITY-MATRIX%20version%3D%221.0%22%20type%3D%22framework%22%3E%0A%20%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Enxp.hardware.secureime%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EISecureIME%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%20%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Enxp.hardware.imx_dek_extractor%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EIDek_Extractor%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%20%20%20%20%3CHAL%20format%3D%22hidl%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Evendor.nxp.nxpnfc%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E2.0%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EINxpNfc%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%20%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Eandroid.hardware.emvco%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EIEmvco%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%3C%2FCOMPATIBILITY-MATRIX%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20the%20following%20to%20the%26nbsp%3Bevk_8mn.mk%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20------nfc-------%0A%24(call%20inherit-product%2C%20vendor%2Fnxp%2Fnfc%2Fdevice-nfc.mk)%0A%24(call%20inherit-product%2C%20vendor%2Fnxp%2Femvco%2Fdevice-emvco.mk)%0APRODUCT_PACKAGES%20%2B%3D%20%5C%0A%20%20%20%20%20%20%20%20android.hardware.nfc-service.nxp%0A%0APRODUCT_PACKAGES%20%2B%3D%20%5C%0A%20%20%20%20%20%20%20%20com.nxp.emvco%20%5C%0A%20%20%20%20%20%20%20%20com.nxp.nfc%20%5C%0A%20%20%20%20%20%20%20%20nfc_nci_nxp_pn72xx%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20the%20nxpnfc_i2c%20in%20init.rc%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%23%20Grant%20permission%20for%20fetching%20available_pages%20info%20of%20statsd%0A%20%20%20%20chown%20system%20system%20%2Fproc%2Fpagetypeinfo%0A%20%20%20%20chmod%200440%20%2Fproc%2Fpagetypeinfo%0A%0A%20%20%20%20exec%20u%3Ar%3Avendor_modprobe%3As0%20--%20%2Fvendor%2Fbin%2Fmodprobe%20-a%20-d%20%5C%0A%20%20%20%20%2Fvendor%2Flib%2Fmodules%20nxpnfc_i2c%0A%20%20%20%20write%20%2Fsys%2Fpower%2Fwake_lock%20nosleep%0A%0Aon%20post-fs-data%20%26amp%3B%26amp%3B%20property%3Avendor.skip.charger_not_need%3D0%0A%20%20%20%20setprop%20vold.post_fs_data_done%201%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20Add%20nxpnfc%20to%20ueventd.nxp.rc%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%2Fsys%2Fdevices%2Fvirtual%2Fthermal%2Fthermal_zone*%20trip_point_0_hyst%200660%20system%20system%0A%2Fsys%2Fdevices%2Fvirtual%2Fthermal%2Fthermal_zone*%20trip_point_1_hyst%200660%20system%20system%0A%0A%2Fdev%2Fdmabuf_imx%20%20%20%20%20%20%20%20%20%20%200664%20%20%20system%20%20%20%20%20system%0A%2Fsys%2Fclass%2Fbacklight%2F*%20brightness%200660%20system%20system%0A%0A%2Fdev%2Fttymxc1%20%20%20%20%20%20%20%20%20%20%20%20%20%200666%20%20%20nfc%20%20%20nfc%0A%2Fdev%2Fttymxc2%20%20%20%20%20%20%20%20%20%20%20%20%20%200666%20%20%20nfc%20%20%20nfc%0A%2Fdev%2Fnxpnfc%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200666%20%20%20nfc%20%20%20nfc%0A%0A%23%20for%20libcamera%0A%2Fdev%2Fmedia*%200660%20system%20camera%0A%2Fdev%2Fv4l-subdev*%200660%20system%20camera%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E5.%20Apply%20the%20NXP%20AOSP%20patches%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EAs%20the%20official%20NXP%20NFC%20patches%20is%20only%20for%20AOSP%26nbsp%3Bandroid-15.0.0_r1%2C%20and%20there%20are%20big%20different%20between%26nbsp%3Bandroid-15.0.0_r1%20and%26nbsp%3Bandroid-15.0.0_r32.%20So%2C%20before%20apply%20the%20patches%2C%20I%20copy%20the%20nfc%20folders%20from%20android-15.0.0_r1%20to%20replace%20the%20nfc%20folders%20in%20android-15.0.0_r32.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFirst%2C%20download%20the%20AOSP%26nbsp%3Bandroid-15.0.0_r1%20from%20github.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20mkdir%20android-15.0.0_r1%20%0A%24%20cd%20android-15.0.0_r1%20%0A%24%20repo%20init%20-u%20https%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fmanifest%20-b%20android-15.0.0_r1%0A%24%20repo%20sync%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThen%2C%20remove%20the%20following%20folders%20from%20android-15.0.0_r32.%20And%20then%20copy%20the%20following%20nfc%20folders%20from%20android-15.0.0_r1%20to%20replace%20the%20same%20folders%20in%20android-15.0.0_r32.%3C%2FP%3E%0A%3CP%3Epackages%2Fapps%2FNfc%3C%2FP%3E%0A%3CP%3Eframeworks%2Fbase%2Fnfc%3C%2FP%3E%0A%3CP%3Eframeworks%2Fbase%2Fnfc-extras%3C%2FP%3E%0A%3CP%3Esystem%2Fnfc%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3Efor%20example%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20rm%20-rf%20android_build%2Fpackages%2Fapps%2FNfc%0A%24%20cp%20-ra%20android-15.0.0_r1%2Fpackages%2Fapps%2FNfc%20android_build%2Fpackages%2Fapps%2F%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20write%20a%20script%20to%20download%20the%20patches%20from%20the%20github.%20Customer%20could%20put%20the%20following%20scripts%20on%20the%20same%20directory%20with%20android_build.%3C%2FP%3E%0A%3CP%3EAOSP_adaptation.sh%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20nxp_nci_hal_nfc%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnxp_nci_hal_nfc.git%22%0Acd%20nxp_nci_hal_nfc%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acp%20-rf%20*%20%20..%2Fandroid_build%2Fpackages%2Fapps%2FNfc%2F%0Acd%20..%0A%0A%23%20nxp_nci_hal_libnfc-nci%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnxp_nci_hal_libnfc-nci.git%22%0Acd%20nxp_nci_hal_libnfc-nci%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acp%20-rf%20*%20%20..%2Fandroid_build%2Fsystem%2Fnfc%2F%0Acd%20..%0A%0A%23%20nfcandroid_nfc_hidlimpl%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_nfc_hidlimpl.git%22%0Acd%20nfcandroid_nfc_hidlimpl%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acp%20-rf%20*%20%20..%2Fandroid_build%2Fhardware%2Fnxp%2Fnfc%0Acd%20..%0A%0A%23%20nfcandroid_frameworks%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_frameworks.git%22%0Acd%20nfcandroid_frameworks%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Amkdir%20..%2Fandroid_build%2Fvendor%2Fnxp%2Fframeworks%0Acp%20-rf%20*%20..%2Fandroid_build%2Fvendor%2Fnxp%2Fframeworks%0Acd%20..%0A%0A%23%20nfcandroid_emvco_aidlimpl%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_emvco_aidlimpl.git%22%0Acd%20nfcandroid_emvco_aidlimpl%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Amkdir%20%20..%2Fandroid_build%2Fhardware%2Fnxp%2Femvco%0Acp%20-rf%20*%20%20..%2Fandroid_build%2Fhardware%2Fnxp%2Femvco%0Acd%20..%0A%0A%23%20nfcandroid_platform_reference%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_platform_reference.git%22%0Acd%20nfcandroid_platform_reference%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acp%20-rf%20vendor%2Fnxp%2F*%20%20%20..%2Fandroid_build%2Fvendor%2Fnxp%2F%0Acd%20..%0A%0A%23%20nfcandroid_infra_test_apps%0Agit%20clone%20https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_infra_test_apps.git%0Acd%20nfcandroid_infra_test_apps%2F%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acd%20test_apps%2F%0Acp%20-rf%20SMCU_Switch%2F%20%20..%2F..%2Fandroid_build%2Fpackages%2Fapps%2F%0Acp%20-rf%20EMVCoModeSwitchApp%2F%20%20..%2F..%2Fandroid_build%2Fpackages%2Fapps%2FNfc%2F%0Acp%20-rf%20load_unload%2F%20%20..%2F..%2Fandroid_build%2Fhardware%2Fnxp%2Fnfc%2F%0Acp%20-rf%20SelfTestAidl%2F%20%20..%2F..%2Fandroid_build%2Fhardware%2Fnxp%2Fnfc%2F%0Acd%20..%2F..%0A%0A%23%20nfcandroid_infra_comm_libs%0Agit%20clone%20%22https%3A%2F%2Fgithub.com%2Fnxp-nfc-infra%2Fnfcandroid_infra_comm_libs.git%22%0Acd%20nfcandroid_infra_comm_libs%0Agit%20checkout%20br_ar_15_comm_infra_dev%0Acp%20-rf%20nfc_tda%2F%20%20..%2Fandroid_build%2Fsystem%2F%0Acp%20-rf%20emvco_tda%2F%20emvco_tda_test%2F%20%20..%2Fandroid_build%2Fhardware%2Fnxp%2Femvco%2F%0Acp%20-rf%20NfcTdaTestApp%2F%20%20..%2Fandroid_build%2Fpackages%2Fapps%2FNfc%2F%0Acd%20..%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EApply_patches.sh%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ecd%20android_build%2Fbuild%2Fbazel%2F%0Apatch%20-p1%20%26lt%3B%20%20..%2F..%2F..%2Fnfcandroid_platform_reference%2Fbuild_cfg%2Fbuild_pf_patches%2FAROOT_build_bazel.patch%0Acd%20..%2Frelease%0Apatch%20-p1%20%26lt%3B%20..%2F..%2F..%2Fnfcandroid_platform_reference%2Fbuild_cfg%2Fbuild_pf_patches%2FAROOT_build_release.patch%0Acd%20..%2F..%2Fexternal%2Flibchrome%0Apatch%20-p1%20%26lt%3B%20..%2F..%2F..%2Fnfcandroid_platform_reference%2Fbuild_cfg%2Fbuild_pf_patches%2FAROOT_external_libchrome.patch%0Acd%20..%2F..%2Fframeworks%2Fbase%0Apatch%20-p1%20%26lt%3B%20..%2F..%2F..%2Fnfcandroid_platform_reference%2Fbuild_cfg%2Fbuild_pf_patches%2FAROOT_frameworks_base.patch%0Acd%20..%2F..%2Fsystem%2Flogging%0Apatch%20-p1%20%26lt%3B%20..%2F..%2F..%2Fnfcandroid_platform_reference%2Fbuild_cfg%2Fbuild_pf_patches%2FAROOT_system_logging.patch%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESo%2C%20run%20the%26nbsp%3BAOSP_adaptation.sh%20first%2C%20then%20run%20the%26nbsp%3BApply_patches.sh.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E6.%26nbsp%3BPut%20changes%20into%20hardwatre%2Finterfaces%2Fcompatibility_matrices%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EDifferent%20compatibility%20matrix%20for%20different%20Android%20versions.%3C%2FP%3E%0A%3CP%3EFile%3A%20android_build%2Fhardware%2Finterfaces%2Fcompatibility_matrices%2Fcompatibility_matrix.202404.xml%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%3CHAL%20format%3D%22aidl%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Eandroid.hardware.audio.effect%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1-2%3C%2FVERSION%3E%0A%20%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EIFactory%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%20%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%20%20%20%20%3C%2FHAL%3E%0A%2B%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%2B%20%20%20%20%20%20%20%3CNAME%3Enxp.hardware.imx_dek_extractor%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%2B%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EIDek_Extractor%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%2B%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%2B%20%20%20%3C%2FHAL%3E%0A%2B%20%20%20%3CHAL%20format%3D%22hidl%22%20optional%3D%22true%22%3E%0A%2B%20%20%20%20%20%20%20%3CNAME%3Evendor.nxp.nxpnfc%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%3CVERSION%3E2.0%3C%2FVERSION%3E%0A%2B%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EINxpNfc%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%2B%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%2B%20%20%20%3C%2FHAL%3E%0A%2B%20%20%20%3CHAL%20format%3D%22aidl%22%20optional%3D%22true%22%3E%0A%2B%20%20%20%20%20%20%20%3CNAME%3Evendor.nxp.emvco%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%3CVERSION%3E1%3C%2FVERSION%3E%0A%2B%20%20%20%20%20%20%20%3CINTERFACE%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CNAME%3EINxpEmvco%3C%2FNAME%3E%0A%2B%20%20%20%20%20%20%20%20%20%20%20%3CINSTANCE%3Edefault%3C%2FINSTANCE%3E%0A%2B%20%20%20%20%20%20%20%3C%2FINTERFACE%3E%0A%2B%20%20%20%3C%2FHAL%3E%0A%20%20%20%20%3CHAL%20format%3D%22aidl%22%3E%0A%20%20%20%20%20%20%20%20%3CNAME%3Eandroid.hardware.audio.sounddose%3C%2FNAME%3E%0A%20%20%20%20%20%20%20%20%3CVERSION%3E1-3%3C%2FVERSION%3E%3C%2FHAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E7.%20Change%20the%20device%20specific%20.mk%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EFor%20pn7160%2C%26nbsp%3BNXP_NFC_HW%20should%20equal%20to%20pn7160.%3C%2FP%3E%0A%3CP%3EFor%20pn7220%2C%26nbsp%3BNXP_NFC_HW%20should%20equal%20to%20pn7220_i2cs.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFile%20%3A%20android_build%2Fvendor%2Fnxp%2Fnfc%2Fdevice-nfc.mk%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%23%23%23%23%0A%23%23%23%23%23%20NXP%20NFC%20Device%20Configuration%20makefile%0A%23%23%23%23%23%23%0A%0ANXP_NFC_HOST%20%3A%3D%20%24(TARGET_PRODUCT)%0Aifndef%20TARGET_NXP_NFC_HW%0ANXP_NFC_HW%20%3A%3D%20pn7160%0Aelse%0ANXP_NFC_HW%20%3A%3D%20%24(TARGET_NXP_NFC_HW)%0Aendif%0ANXP_NFC_PLATFORM%20%3A%3D%20pn54x%0ANXP_VENDOR_DIR%20%3A%3D%20nxp%0ANXP_I2CM_S%20%3A%3D%20%24(TARGET_NXP_I2C_M_S)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFile%3A%20android_build%2Fvendor%2Fnxp%2Femvco%2Fdevice-emvco.mk%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ENXP_VENDOR_DIR%20%3A%3D%20nxp%0ANXP_NFC_HW%20%3A%3D%20%24(TARGET_NXP_NFC_HW)%0Aifeq%20(%24(strip%20%24(TARGET_NXP_NFC_HW))%2C)%0A%20%20%20%20NXP_NFC_HW%20%3A%3D%20pn7160%0Aendif%0A%0A%23%20Nfc%20service%20has%20dependency%20with%20EMVCo%20JAR%0APRODUCT_PACKAGES%20%2B%3D%20%5C%0A%20%20%20%20com.nxp.emvco%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E8.%20Now%2C%20you%20can%20start%20to%20build%20the%20Android%20BSP%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EFor%20i.MX8MN%20EVK%2C%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20source%20build%2Fenvsetup.sh%0A%24%20lunch%20evk_8mn-nxp_stable-userdebug%0A%24%20export%20TARGET_RELEASE%3Dnxp_stable%0A%24%20build_build_var_cache%0A%24%20.%2Fimx-make.sh%20-j4%202%26gt%3B%26amp%3B1%20%7C%20tee%20build-log.txt%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWhen%20building%20the%20BSP%2C%20there%20will%20have%20many%20errors%20during%20the%20build.%20I%20list%20some%20errors%20and%20the%20reference%20solution%20below%20for%20customer%20reference.%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22border-style%3A%20solid%3B%20width%3A%20100%25%3B%20border-color%3A%20black%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2227px%22%3E%3CFONT%20size%3D%225%22%3EError%3C%2FFONT%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2227px%22%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EReference%20Solution%3C%2FFONT%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22776px%22%3EComplain%20about%20the%20nfc_aconifg_flags.%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22776px%22%3E%0A%3CP%3Epackages%2Fapps%2FNfc%2Fflags%2FAndroid.bp%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eaconfig_declarations%20%7B%0A%2F%2F%20%20%20%20name%3A%20%22nfc_aconfig_flags%22%2C%0A%20%20%20%20name%3A%20%22com.android.nfc.flags-aconfig%22%2C%0A%20%20%20%20package%3A%20%22com.android.nfc.flags%22%2C%0A%20%20%20%20container%3A%20%22system%22%2C%0A%20%20%20%20srcs%3A%20%5B%22nfc_flags.aconfig%22%5D%2C%0A%7D%0A%0Ajava_aconfig_library%20%7B%0A%2F%2F%20%20%20%20name%3A%20%22nfc_aconfig_flags_lib%22%2C%0A%2F%2F%20%20%20%20aconfig_declarations%3A%20%22nfc_aconfig_flags%22%2C%0A%20%20%20%20name%3A%20%22com.android.nfc.flags-aconfig-java%22%2C%0A%20%20%20%20aconfig_declarations%3A%20%22com.android.nfc.flags-aconfig%22%2C%0A%20%20%20%20min_sdk_version%3A%20%2233%22%2C%0A%20%20%20%20apex_available%3A%20%5B%0A%20%20%20%20%20%20%20%20%22%2F%2Fapex_available%3Aplatform%22%2C%0A%20%20%20%20%20%20%20%20%22com.android.nfcservices%22%2C%0A%20%20%20%20%5D%2C%0A%7D%0A%0Ajava_library%20%7B%0A%20%20%20%20name%3A%20%22nfc_flags_lib%22%2C%0A%20%20%20%20sdk_version%3A%20%22system_current%22%2C%0A%20%20%20%20min_sdk_version%3A%20%2233%22%2C%0A%20%20%20%20srcs%3A%20%5B%0A%20%20%20%20%20%20%20%20%22lib%2F**%2F*.java%22%2C%0A%20%20%20%20%5D%2C%0A%20%20%20%20static_libs%3A%20%5B%0A%20%20%20%20%20%20%20%20%22com.android.nfc.flags-aconfig-java%22%2C%0A%20%20%20%20%5D%2C%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22142px%22%3EComplain%20about%20the%26nbsp%3Bandroid.hardware.nfc-V2-ndk%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22142px%22%3EFile%3A%20hardware%2Finterfaces%2Fnfc%2Faidl%2Fvts%2Ffunctional%2FAndroid.bp%0A%3CBR%20%2F%3E%0A%3CP%3EChange%26nbsp%3Bandroid.hardware.nfc-V2-ndk%26nbsp%3B%20to%20vendor.nxp.nxpnfc_aidl-V2-ndk%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2298px%22%3E%0A%3CBR%20%2F%3E%0A%3CP%3Eplatform_testing%2Fbuild%2Ftasks%2Ftests%2Fnative_test_list.mk%3A%20error%3A%20continuous_native_tests%3A%20Unknown%20installed%20file%20for%20module%20'libnfc-nci-jni-tests'%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2298px%22%3Eremove%20'libnfc-nci-jni-tests'%20in%26nbsp%3B%0A%3CP%3Enative_test_list.mk%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22164px%22%3E%0A%3CP%3Eerror%3A%20packages%2Fapps%2FNfc%2Ftests%2Finstrumentation%2FAndroid.bp%3A6%3A1%3A%20module%20%22NfcNciInstrumentationTests%22%20variant%20%22android_common%22%3A%20cannot%20depend%20directly%20on%20java_sdk_library%20%22android.test.runner%22%3B%20try%20depending%20on%20%22android.test.runner.stubs%22%2C%20%22android.test.runner.stubs.system%22%2C%20%22android.test.runner.stubs.test%22%2C%20or%20%22android.test.runner.impl%22%20instead%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22164px%22%3E%0A%3CP%3EThe%20hints%20are%20gave%20in%20the%20error%20message..%3C%2FP%3E%0A%3CP%3EChange%20the%20%22android.test.runner%22%20to%26nbsp%3B%22android.test.runner.stubs%22%2C%20%22android.test.runner.stubs.system%22%2C%20%22android.test.runner.stubs.test%22%2C%20or%20%22android.test.runner.impl%22.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22326px%22%3E%0A%3CP%3Eerror%3A%20vendor%2Fnxp%2Fframeworks%2Fnfc%2FAndroid.bp%3A12%3A1%3A%20module%20%22com.nxp.nfc%22%20variant%20%22android_common%22%3A%20depends%20on%20%2F%2Fframeworks%2Fbase%2Fnfc%3Aframework-nfc.impl%20which%20is%20not%20visible%20to%20this%20module%3C%2FP%3E%0A%3CP%3EYou%20may%20need%20to%20add%20%22%2F%2Fvendor%2Fnxp%2Fframeworks%2Fnfc%22%20to%20its%20visibility%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22326px%22%3E%0A%3CP%3EFile%20%3A%26nbsp%3Bframeworks%2Fbase%2Fnfc%2FAndroid.bp%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20permitted_packages%3A%20%5B%0A%20%20%20%20%20%20%20%20%22android.nfc%22%2C%0A%20%20%20%20%20%20%20%20%22com.android.nfc%22%2C%0A%20%20%20%20%5D%2C%0A%20%20%20%20impl_library_visibility%3A%20%5B%0A%20%20%20%20%20%20%20%20%22%2F%2Fframeworks%2Fbase%3A__subpackages__%22%2C%0A%20%20%20%20%20%20%20%20%22%2F%2Fcts%2Fhostsidetests%2Fmultidevices%2Fnfc%3A__subpackages__%22%2C%0A%20%20%20%20%20%20%20%20%22%2F%2Fcts%2Ftests%2Ftests%2Fnfc%22%2C%0A%20%20%20%20%20%20%20%20%22%2F%2Fvendor%3A__subpackages__%22%2C%0A%20%20%20%20%20%20%20%20%22%2F%2Fpackages%2Fapps%2FNfc%3A__subpackages__%22%2C%0A%20%20%20%20%5D%2C%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22135px%22%3E%0A%3CBR%20%2F%3E%0A%3CP%3Epackages%2Fapps%2FNfc%2Fnci%2Fsrc%2Fcom%2Fandroid%2Fnfc%2Fdhimpl%2FNativeT4tNfceeManager.java%3A20%3A%20error%3A%20duplicate%20class%3A%20com.android.nfc.dhimpl.NativeT4tNfceeManager%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22135px%22%3EEdit%20the%20file%0A%3CP%3Epackages%2Fapps%2FNfc%2Fnci%2Fsrc%2Fcom%2Fandroid%2Fnfc%2Fdhimpl%2FNativeT4tNfceeManager.java%3C%2FP%3E%0A%3CP%3Ethen%20comment%20out%20the%20duplicated%20class.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22318px%22%3E%0A%3CP%3Eandroid%2FR.java%3A12483%3A%20error%3A%20could%20not%20resolve%20field%20FLAG_NFC_ASSOCIATED_ROLE_SERVICES%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F50990%22%20target%3D%22_blank%22%3E%40android%3C%2FA%3E.annotation.FlaggedApi(android.nfc.Flags.FLAG_NFC_ASSOCIATED_ROLE_SERVICES)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22318px%22%3EEdit%26nbsp%3B%0A%3CP%3Eframeworks%2Fbase%2Fnfc%2Fjava%2Fandroid%2Fnfc%2Fflags.aconfig%3C%2FP%3E%0A%3CP%3EAdd%20the%20below%20flag.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eflag%20%7B%0A%20%20%20%20name%3A%20%22nfc_associated_role_services%22%0A%20%20%20%20is_exported%3A%20true%0A%20%20%20%20namespace%3A%20%22nfc%22%0A%20%20%20%20description%3A%20%22Share%20wallet%20role%20routing%20priority%20with%20associated%20services%22%0A%20%20%20%20bug%3A%20%22366243361%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22172px%22%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFAILED%3A%3C%2FP%3E%0A%3CP%3Eplatform_testing%2Fbuild%2Ftasks%2Ftests%2Fnative_test_list.mk%3A%20error%3A%20continuous_native_tests%3A%20Unknown%20installed%20file%20for%20module%20'libnfc-nci-tests'%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22172px%22%3E%0A%3CP%3ERemove%20the%20libnfc-nci-tests%20in%26nbsp%3Bnative_test_list.mk.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22342px%22%3E%0A%3CBR%20%2F%3E%0A%3CP%3Eprebuilts%2Fclang%2Fhost%2Flinux-x86%2Fclang-r536225%2Finclude%2Fc%2B%2B%2Fv1%2Fstring%3A780%3A43%3A%20error%3A%20implicit%20instantiation%20of%20undefined%20template%20'std%3A%3Achar_traits%3CUNSIGNED%20char%3D%22%22%3E'%3C%2FUNSIGNED%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20780%20%7C%26nbsp%3B%26nbsp%3B%20static_assert((is_same%26lt%3B_CharT%2C%20typename%20traits_type%3A%3Achar_type%26gt%3B%3A%3Avalue)%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%5E%3C%2FP%3E%0A%3CP%3Epackages%2Fapps%2FNfc%2Fnci%2Fjni%2FNativeNfcTda.cpp%3A32%3A35%3A%20note%3A%20in%20instantiation%20of%20template%20class%20'std%3A%3Abasic_string%3CUNSIGNED%20char%3D%22%22%3E'%20requested%20here%3C%2FUNSIGNED%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%2032%20%7C%20static%20std%3A%3Abasic_string%3CUINT8_T%3E%20sRxTdaDataBuff%3B%3C%2FUINT8_T%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%5E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22342px%22%3E%26nbsp%3BEdit%20the%20packages%2Fapps%2FNfc%2Fnci%2Fjni%2FNativeNfcTda.cpp%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eusing%20android%3A%3Abase%3A%3AStringPrintf%3B%0Aextern%20bool%20nfc_debug_enabled%3B%0ASyncEvent%20sCtLibSyncEvt%3B%0A%2F%2Fstatic%20std%3A%3Abasic_string%3CUINT8_T%3E%20sRxTdaDataBuff%3B%0Astatic%20std%3A%3Abasic_string%3CCHAR%3E%20sRxTdaDataBuff%3B%3C%2FCHAR%3E%3C%2FUINT8_T%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20height%3D%22386px%22%3E%0A%3CP%3Epackages%2Fapps%2FNfc%2Fnci%2Fjni%2FNativeT4tNfcee.cpp%3A493%3A21%3A%20error%3A%20no%20matching%20member%20function%20for%20call%20to%20'append'%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20493%20%7C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20sRxDataBuffer.append(data.p_data%2C%20data.len)%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20~~~~~~~~~~~~~~%5E~~~~~%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20height%3D%22386px%22%3EEdit%20the%20packages%2Fapps%2FNfc%2Fnci%2Fjni%2FNativeT4tNfcee.cpp%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Evoid%20NativeT4tNfcee%3A%3At4tReadComplete(tNFA_STATUS%20status%2C%20tNFA_RX_DATA%20data)%20%7B%0A%20%20mT4tOpStatus%20%3D%20status%3B%0A%20%20if%20(status%20%3D%3D%20NFA_STATUS_OK)%20%7B%0A%20%20%20%20if%20(data.len%20%26gt%3B%200)%20%7B%0A%20%20%20%20%20%20sRxDataBuffer.insert(sRxDataBuffer.end()%2C%20data.p_data%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data.p_data%20%2B%20data.len)%3B%0A%20%20%20%20%20%20LOG(DEBUG)%20%26lt%3B%26lt%3B%20StringPrintf(%22%25s%3A%20Read%20Data%20len%20new%3A%20%25d%20%22%2C%20__func__%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data.len)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20SyncEventGuard%20g(mT4tNfcEeRWCEvent)%3B%0A%20%20mT4tNfcEeRWCEvent.notifyOne()%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20height%3D%22273px%22%3E%0A%3CP%3Eframeworks%2Fbase%2Fcore%2Fjava%2Fandroid%2Fprovider%2FSettings.java%3A2351%3A%20error%3A%20could%20not%20resolve%20field%20FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%40FlaggedApi(android.nfc.Flags.FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS)%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3CTD%20height%3D%22273px%22%3E%0A%3CP%3EFile%3A%20frameworks%2Fbase%2Fnfc%2Fjava%2Fandroid%2Fnfc%2Fflags.aconfig%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAdd%20the%20following%20to%20the%20flags.aconfig%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eflag%20%7B%0A%20%20%20%20name%3A%20%22nfc_action_manage_services_settings%22%0A%20%20%20%20is_exported%3A%20true%0A%20%20%20%20namespace%3A%20%22nfc%22%0A%20%20%20%20description%3A%20%22Add%20Settings.ACTION_MANAGE_OTHER_NFC_SERVICES_SETTINGS%22%0A%20%20%20%20bug%3A%20%22358129872%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThere%20are%20some%20errors%20are%20not%20listed%20in%20the%20table%20because%20there%20will%20have%20some%20hints%20to%20correct%20the%20error%20in%20the%20error%20message.%20Customer%20could%20follow%20the%20hints%20and%20base%20on%20the%20needs%20to%20modify%20the%20source%20code.%3C%2FP%3E%0A%3CP%3ESometime%2C%20customer%20could%20compare%20the%20source%20code%20between%20r1%20and%20r32.%20Here%20is%20the%20AOSP%20source%20code%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcs.android.com%2Fandroid%2Fplatform%2Fsuperproject%2F%2B%2Fandroid-15.0.0_r32%3A%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eandroid-15.0.0_r32%3C%2FA%3E%26nbsp%3B%20and%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcs.android.com%2Fandroid%2Fplatform%2Fsuperproject%2F%2B%2Fandroid-15.0.0_r1%3A%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eandroid-15.0.0_r1%3C%2FA%3E.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E9.%20Download%20the%20image%20to%20the%20i.MX8MN%20EVK%20board%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E-%20Switch%20to%20download%20mode%20on%20the%208MN%20EVK%20board%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22evk_switch.png%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22evk_switch.png%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367902i331A044340ECFD11%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22evk_switch.png%22%20alt%3D%22evk_switch.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E-%20Download%20the%20Android%2015%20BSP%20i.MX8MN%20EVK%20demo%20image%20from%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Fembedded-software%2Fi-mx-software%2Fandroid-os-for-i-mx-applications-processors%3AIMXANDROID%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAndroid%20BSP%20web%20page%3C%2FA%3E%20first.%20Because%20there%20are%20UUU%20script%20and%20necessary%20image%20files%20already%20in%20the%20demo%20image%20package.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-%20Download%20the%20UUU%20from%20here%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fmfgtools%2Freleases%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EReleases%20%C2%B7%20nxp-imx%2Fmfgtools%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E-%20Put%20the%20UUU%20executable%20file%20into%20the%20demo%20image%20folder.%26nbsp%3Buuu_imx_android_flash.bat%20is%20the%20script%20also%20in%20the%20same%20folder.%3C%2FP%3E%0A%3CP%3E-%20After%20your%20building%20is%20succeed%2C%20Copy%20the%20images%20to%20the%20demo%20image%20folder.%20The%20images%20are%20located%20in%20android_build%2Fout%2Ftarget%2Fproduct%2Fevk_8mn%2F%3C%2FP%3E%0A%3CP%3E-%20Run%26nbsp%3Bthe%20UUU%20script%20to%20download%20the%20images%20to%20the%20EVK%20board.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22uuu.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22uuu.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367888iD3C93EF3628D033B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22uuu.jpg%22%20alt%3D%22uuu.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EReference%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNFC-Knowledge-Base%2Fi-MX6ULL-EVK-running-Yocto-Linux-PN7160%2Fta-p%2F1994337%22%20target%3D%22_blank%22%3Ei.MX6ULL%20EVK%20running%20Yocto%20Linux%20%2B%20PN7160%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNFC-Knowledge-Base%2FPorting-PN7160-to-Android-14-on-i-MX8M-Nano-board%2Fta-p%2F2001159%22%20target%3D%22_blank%22%3EPorting%20PN7160%20to%20Android%2014%20on%20i.MX8M%20Nano%20board%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Fembedded-software%2Fi-mx-software%2Fandroid-os-for-i-mx-applications-processors%3AIMXANDROID%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAndroid%20OS%20for%20i.MX%20Applications%20Processors%20%7C%20NXP%20Semiconductors%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14608.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPN7160%2FPN7220%20%E2%80%93%20Android%2015%20porting%20guide%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fproducts%2FPN7160%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPlug-n-Play%20NFC%20Frontend%20with%20Integrated%20Firmware%20%7C%20NXP%20Semiconductors%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎12-10-2025 12:38 AM
Updated by: