From e7363c2bc8bd376420747c429000d4e10bcbfeea Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Sat, 3 Oct 2020 17:10:35 +0000 Subject: [PATCH] PL2: Conditionally enable Samsung's NFC service There are different models with different chips, don't force wrong service on wrong model. Signed-off-by: Aayush Gupta Change-Id: If1760991eda8471118e6b718a693f8a77f15e329 --- proprietary-files.txt | 1 - rootdir/etc/init.PL2.target.rc | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/proprietary-files.txt b/proprietary-files.txt index 84edfd1..e58e6a0 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -46,7 +46,6 @@ vendor/etc/PL2/ncf/rear/ISO800_4608x3456.ncf vendor/bin/sec_nfc_test vendor/bin/hw/android.hardware.nfc@1.2-service.sec vendor/bin/hw/vendor.nxp.hardware.nfc@1.2-service -vendor/etc/init/hw/android.hardware.nfc@1.2-service.sec.rc vendor/etc/permissions/com.gsma.services.nfc.sec.xml vendor/etc/nfcee_access.xml vendor/lib/nfc_nci_sec.so diff --git a/rootdir/etc/init.PL2.target.rc b/rootdir/etc/init.PL2.target.rc index 734d30f..5947021 100644 --- a/rootdir/etc/init.PL2.target.rc +++ b/rootdir/etc/init.PL2.target.rc @@ -1,6 +1,3 @@ -#Samsung NFC hidl rc -import /vendor/etc/init/hw/android.hardware.nfc@1.2-service.sec.rc - on early-boot # Audio setprop persist.audio.fluence.voicecomm true @@ -12,9 +9,6 @@ on early-boot # Fingerprint setprop ro.hardware.fingerprint elan - # NFC - setprop ro.hardware.nfc_nci sec - # Radio setprop ro.rf.power.reduction.for.mcc 1 @@ -27,12 +21,9 @@ on post-fs-data # Fingerprint mkdir /data/system/fingerprint 0770 system system - # NFC storage mkdir /data/vendor/nfc 0770 nfc nfc mkdir /data/vendor/nfc/param 0770 nfc nfc - chown nfc nfc /dev/sec-nfc - chmod 0770 /dev/sec-nfc on property:sys.fih.fingerprint=false setprop sys.fih.fingerprint true @@ -74,3 +65,15 @@ service fqcaudioloopback /vendor/bin/fqcaudioloopback_c1n.sh user system oneshot disabled + +service nfc_hal_service-sec /vendor/bin/hw/android.hardware.nfc@1.2-service.sec + class hal + user nfc + disabled + group nfc + +on property:ro.boot.nfc=sec + chown nfc nfc /dev/sec-nfc + chmod 0770 /dev/sec-nfc + setprop ro.hardware.nfc_nci sec + enable nfc_hal_service-sec