From 693af826f2f87093dbaa6a61d50a45d26a50f042 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Sat, 24 Apr 2021 02:54:40 +0200 Subject: [PATCH] s5neolte: build nfc hal from source Change-Id: Ief7ef8f2a597b1a978ea4b0ec4e41391cec03a99 --- configs/nfc/libnfc-sec-hal.conf | 17 +++++++++++++++++ configs/nfc/libnfc-sec.conf | 22 ---------------------- device.mk | 4 ++-- manifest.xml | 5 +++-- proprietary-files.txt | 1 - 5 files changed, 22 insertions(+), 27 deletions(-) diff --git a/configs/nfc/libnfc-sec-hal.conf b/configs/nfc/libnfc-sec-hal.conf index 0ae023b..dc9e765 100644 --- a/configs/nfc/libnfc-sec-hal.conf +++ b/configs/nfc/libnfc-sec-hal.conf @@ -33,3 +33,20 @@ FW_UPDATE_MODE=2 ## Clock option for X-Tal FW_CFG_CLK_SPEED=0x12 +############################################################################### +# Presence Check Method +# PRESENCE_CHECK_ALGORITHM=0 : [default] Automatic select for below 4 method. +# PRESENCE_CHECK_ALGORITHM=1 : Read Empty I block. +# PRESENCE_CHECK_ALGORITHM=2 : Sleep/Wakeup Command +# PRESENCE_CHECK_ALGORITHM=3 : Read binary for CH0(K version method) +# PRESENCE_CHECK_ALGORITHM=4 : Read binary for CH3 +# Default : No use (AUTO) +# For China Region : Use Method 3 +############################################################################### +PRESENCE_CHECK_ALGORITHM=3 + +################################################################################# +# Set max transceive length for IsoDep frames +# Standard 0x105 (261) +# Extended 0xFEFF (65279) +ISO_DEP_MAX_TRANSCEIVE=0xFEFF diff --git a/configs/nfc/libnfc-sec.conf b/configs/nfc/libnfc-sec.conf index 7a94a93..42b0ee7 100644 --- a/configs/nfc/libnfc-sec.conf +++ b/configs/nfc/libnfc-sec.conf @@ -123,18 +123,6 @@ MAX_RF_DATA_CREDITS=1 # 6) OBERTHUR_WARM_RESET_COMMAND must be enabled for all eSE model OBERTHUR_WARM_RESET_COMMAND=0x03 -############################################################################### -# 7) Presence Check Method -# PRESENCE_CHECK_ALGORITHM=0 : [default] Automatic select for below 4 method. -# PRESENCE_CHECK_ALGORITHM=1 : Read Empty I block. -# PRESENCE_CHECK_ALGORITHM=2 : Sleep/Wakeup Command -# PRESENCE_CHECK_ALGORITHM=3 : Read binary for CH0(K version method) -# PRESENCE_CHECK_ALGORITHM=4 : Read binary for CH3 -# Default : No use (AUTO) -# For China Region : Use Method 3 -############################################################################### -PRESENCE_CHECK_ALGORITHM=3 - ############################################################################### # Application options APPL_TRACE_LEVEL=0xFF @@ -179,13 +167,3 @@ NFA_DM_DISC_DURATION_POLL=500 # 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) # 3: FPM CE in snooze mode, Switch Off, Battery Off still available. SCREEN_OFF_POWER_STATE=3 - -############################################################################### -# NCI Hal Module name -NCI_HAL_MODULE="nfc_nci" - -################################################################################# -# Set max transceive length for IsoDep frames -# Standard 0x105 (261) -# Extended 0xFEFF (65279) -ISO_DEP_MAX_TRANSCEIVE=0xFEFF diff --git a/device.mk b/device.mk index 47b5713..c904de4 100644 --- a/device.mk +++ b/device.mk @@ -66,7 +66,7 @@ PRODUCT_PACKAGES += \ # NFC PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/nfc/libnfc-sec-hal.conf:system/etc/libnfc-sec-hal.conf \ + $(LOCAL_PATH)/configs/nfc/libnfc-sec-hal.conf:system/etc/libnfc-sec-vendor.conf \ $(LOCAL_PATH)/configs/nfc/libnfc-sec.conf:system/etc/libnfc-nci.conf \ $(LOCAL_PATH)/configs/nfc/nfcee_access.xml:system/etc/nfcee_access.xml @@ -76,7 +76,7 @@ PRODUCT_PACKAGES += \ NfcNci \ Tag \ com.android.nfc_extras \ - android.hardware.nfc@1.0-impl + android.hardware.nfc@1.2-service.samsung # Permissions PRODUCT_COPY_FILES += \ diff --git a/manifest.xml b/manifest.xml index 52f7163..6cd5849 100644 --- a/manifest.xml +++ b/manifest.xml @@ -147,12 +147,13 @@ android.hardware.nfc - passthrough - 1.0 + hwbinder + 1.2 INfc default + @1.2::INfc/default android.hardware.power diff --git a/proprietary-files.txt b/proprietary-files.txt index 1428790..e7779aa 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -69,7 +69,6 @@ etc/wifi/nvram_net.txt:vendor/etc/wifi/nvram_net.txt # NFC etc/sec_s3fwrn7_rfreg.bin -lib/hw/nfc_nci.universal7580.so vendor/firmware/sec_s3fwrn7_firmware.bin # cbd, from boot.img and pinned to stop removal when extracting from system image -- 2.20.1