diff --git a/common.mk b/common.mk
index 9bb078d..a1fd242 100644
--- a/common.mk
+++ b/common.mk
@@ -213,6 +213,7 @@ PRODUCT_PACKAGES += \
ueventd.qcom.rc
PRODUCT_PACKAGES += \
+ init.nfc.samsung.rc \
init.samsung.bsp.rc \
init.samsung.connector.rc \
init.samsung.display.rc \
@@ -264,6 +265,25 @@ PRODUCT_COPY_FILES += \
$(AUDIO_HAL_DIR)/configs/common/codec2/service/1.0/c2audio.vendor.ext-arm64.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/c2audio.vendor.ext-arm64.policy \
$(AUDIO_HAL_DIR)/configs/common/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml
+# NFC
+PRODUCT_PACKAGES += \
+ android.hardware.nfc@1.2.vendor \
+ android.hardware.secure_element@1.2.vendor \
+ com.android.nfc_extras \
+ libchrome.vendor \
+ nqnfcinfo \
+ Tag
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
+ frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
+ frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
+ frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
+ frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
+ frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
+ frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml \
+ frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml
+
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
diff --git a/init/Android.bp b/init/Android.bp
index a303100..bc29e7f 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -9,6 +9,13 @@ prebuilt_etc {
vendor: true,
}
+prebuilt_etc {
+ name: "init.nfc.samsung.rc",
+ src: "init.nfc.samsung.rc",
+ sub_dir: "init",
+ vendor: true,
+}
+
prebuilt_etc {
name: "init.qcom.rc",
src: "init.qcom.rc",
@@ -19,8 +26,8 @@ prebuilt_etc {
prebuilt_etc {
name: "init.qcom.usb.rc",
src: "init.qcom.usb.rc",
- vendor: true,
sub_dir: "init/hw",
+ vendor: true,
}
prebuilt_etc {
diff --git a/init/init.nfc.samsung.rc b/init/init.nfc.samsung.rc
new file mode 100644
index 0000000..3ebdad7
--- /dev/null
+++ b/init/init.nfc.samsung.rc
@@ -0,0 +1,36 @@
+on late-init
+# PVDD enable
+ write /sys/class/nfc_sec/pvdd "1"
+
+on post-fs-data
+ write /sys/class/nfc_sec/pvdd "2"
+# NFC KEY
+ mkdir /data/vendor/nfc 0770 nfc nfc
+
+# NFC driver permission
+ chmod 0660 /dev/p3
+ chown system system /dev/p3
+ chmod 0660 /dev/p61
+ chown system system /dev/p61
+ chmod 0660 /dev/st54spi
+ chown system system /dev/st54spi
+
+on boot
+ write /sys/class/nfc_sec/pvdd "3"
+# NFC driver permission
+ chmod 0660 /dev/sec-nfc
+ chown nfc nfc /dev/sec-nfc
+ chmod 0660 /dev/p3
+ chown system system /dev/p3
+ chmod 0660 /dev/pn547
+ chown nfc nfc /dev/pn547
+ chmod 0660 /dev/p61
+ chown system system /dev/p61
+ chmod 0660 /dev/st21nfc
+ chown nfc nfc /dev/st21nfc
+ chmod 0660 /dev/st54spi
+ chown system system /dev/st54spi
+
+# For NFC hardware SKU
+on boot && property:ro.boot.nfc.feature.chipname=*
+ setprop ro.vendor.nfc.feature.chipname ${ro.boot.nfc.feature.chipname}
diff --git a/proprietary-files.txt b/proprietary-files.txt
index eedf4c8..930d9f3 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1203,7 +1203,14 @@ vendor/lib64/qti.video.utils.videobufferlayout.so
-vendor/lib64/libvmmem.so
# NFC
+vendor/bin/hw/nxp.android.hardware.nfc@1.2-service
+vendor/etc/init/nxp.android.hardware.nfc@1.2-service.rc
+vendor/etc/libese-nxp.conf
vendor/etc/libnfc-nxp.conf
+vendor/etc/vintf/manifest/nxp.android.hardware.nfc@1.2-service.xml
+vendor/lib64/ese_spi_nxp.so
+vendor/lib64/nfc_nci_nxpsn.so
+vendor/lib64/vendor.samsung.hardware.nfc@2.0.so
# NFC firmware
vendor/firmware/nfc/libsn220u_fw.so
@@ -1391,6 +1398,7 @@ vendor/lib64/libengmode_client.so
vendor/lib64/libqdpr.so
vendor/lib64/libril_sem.so
vendor/lib64/libsec-ril.so
+vendor/lib64/libsec_semRil.so
vendor/lib64/libsecril-client.so
vendor/lib64/libvkmanager_vendor.so
vendor/lib64/vendor.qti.hardware.data.connectionfactory-V1-ndk.so
@@ -1433,6 +1441,10 @@ vendor/bin/ssr_diag
vendor/bin/ssr_setup
vendor/bin/subsystem_ramdump
+# Secure element
+vendor/bin/hw/android.hardware.secure_element@1.2-service
+vendor/etc/init/android.hardware.secure_element@1.2-service.rc
+
# Sensors
vendor/bin/init.qcom.sensors.sh
vendor/bin/sensors.qti
diff --git a/vendor.prop b/vendor.prop
index 25b3dad..77e4942 100644
--- a/vendor.prop
+++ b/vendor.prop
@@ -160,6 +160,23 @@ debug.c2.use_dmabufheaps=1
debug.stagefright.ccodec=4
debug.stagefright.omx_default_rank=0
+# NFC
+ro.camera.notify_nfc=1
+ro.vendor.nfc.feature.chipname=NXP_SN100U
+ro.vendor.nfc.info.antpos=1
+ro.vendor.nfc.info.antposX=37.0
+ro.vendor.nfc.info.antposY=79.0
+ro.vendor.nfc.info.deviceWidth=76.2
+ro.vendor.nfc.info.deviceHeight=157.8
+ro.vendor.nfc.info.deviceFoldable=false
+ro.vendor.nfc.support.advancedsetting=true
+ro.vendor.nfc.support.autoselect=true
+ro.vendor.nfc.support.defaultaid=false
+ro.vendor.nfc.support.nonaid=false
+ro.vendor.nfc.support.othercategory=true
+ro.vendor.nfc.support.uicc=true
+ro.vendor.nfc.support.ese=true
+
# NTP
persist.backup.ntpServer=0.pool.ntp.org
diff --git a/vintf/device_framework_matrix.xml b/vintf/device_framework_matrix.xml
index 1702964..0d6bcdf 100644
--- a/vintf/device_framework_matrix.xml
+++ b/vintf/device_framework_matrix.xml
@@ -115,4 +115,12 @@
default
+
+ vendor.samsung.hardware.nfc
+ 2.0
+
+ ISehNfc
+ default
+
+
diff --git a/vintf/manifest_kalama.xml b/vintf/manifest_kalama.xml
index 4950175..8e479f9 100644
--- a/vintf/manifest_kalama.xml
+++ b/vintf/manifest_kalama.xml
@@ -125,15 +125,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
-
- android.hardware.nfc
- hwbinder
- 1.2
-
- INfc
- default
-
-
vendor.nxp.hardware.nfc
hwbinder