From 6ed4c96703d9c5d7edcb6210ac80cf539bf7bae3 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Thu, 19 Oct 2023 23:08:10 +0200 Subject: [PATCH] sweet: Build AIDL NXP NFC HAL Change-Id: I6ace3ac149c84d2cb9e2773e7ef5ddbf24c35b92 --- BoardConfig.mk | 4 ---- configs/hidl/manifest-nfc.xml | 11 ----------- device.mk | 2 +- rootdir/etc/init.sweet.rc | 7 +++---- sepolicy/vendor/file_contexts | 3 +++ sepolicy/vendor/service_contexts | 2 ++ 6 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 configs/hidl/manifest-nfc.xml create mode 100644 sepolicy/vendor/service_contexts diff --git a/BoardConfig.mk b/BoardConfig.mk index 235915e..caa2334 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -17,10 +17,6 @@ TARGET_PROVIDES_AUDIO_EXTNS := true # HIDL DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/manifest.xml -DEVICE_MANIFEST_SKUS += sweet -DEVICE_MANIFEST_SWEET_FILES := \ - $(DEVICE_MANIFEST_FILE) \ - $(DEVICE_PATH)/configs/hidl/manifest-nfc.xml # Kernel TARGET_KERNEL_CONFIG += vendor/sweet.config diff --git a/configs/hidl/manifest-nfc.xml b/configs/hidl/manifest-nfc.xml deleted file mode 100644 index 02182c0..0000000 --- a/configs/hidl/manifest-nfc.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - - diff --git a/device.mk b/device.mk index 2f4779b..fb9e66c 100644 --- a/device.mk +++ b/device.mk @@ -47,7 +47,7 @@ PRODUCT_PACKAGES += \ Tag PRODUCT_PACKAGES += \ - android.hardware.nfc@1.2-service + android.hardware.nfc-service.nxp PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf \ diff --git a/rootdir/etc/init.sweet.rc b/rootdir/etc/init.sweet.rc index d8de975..73056e5 100644 --- a/rootdir/etc/init.sweet.rc +++ b/rootdir/etc/init.sweet.rc @@ -1,10 +1,9 @@ on property:ro.boot.product.vendor.sku=sweet enable vendor.nfc_hal_service -service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.2-service +service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc-service.nxp override - class hal + class early_hal user nfc - group nfc - writepid /dev/cpuset/system-background/tasks + group nfc drmrpc system disabled diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 6ebce14..4a13b12 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -12,3 +12,6 @@ # Persist subsystem /mnt/vendor/persist/subsys(/.*)? u:object_r:persist_subsys_file:s0 + +# NFC +/vendor/bin/hw/android\.hardware\.nfc-service\.nxp u:object_r:hal_nfc_default_exec:s0 diff --git a/sepolicy/vendor/service_contexts b/sepolicy/vendor/service_contexts new file mode 100644 index 0000000..2e7eb73 --- /dev/null +++ b/sepolicy/vendor/service_contexts @@ -0,0 +1,2 @@ +# NFC +vendor.nxp.nxpnfc_aidl.INxpNfc/default u:object_r:hal_nfc_service:s0