X6833B: Configure Sensors stack

Refs: 3bf7b31611

Co-authored-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
This commit is contained in:
dodyirawan85 2023-12-09 16:54:57 +07:00
parent 8551890ccc
commit f401f30c14
6 changed files with 29 additions and 10 deletions

View file

@ -46,6 +46,11 @@ $(KEYMASTER_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $@" $(hide) echo "Linking $@"
@ln -sf $(subst default,trustonic,$(notdir $@)) $@ @ln -sf $(subst default,trustonic,$(notdir $@)) $@
SENSOR_SYMLINKS := $(TARGET_OUT_VENDOR)/lib64/hw/sensors.$(TARGET_BOARD_PLATFORM).so
$(SENSOR_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $(notdir $@)"
@ln -sf sensors.mediatek.V2.0.so $@
VENDOR_PLATFORM_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/, $(strip $(shell cat $(DEVICE_PATH)/symlink/vendor.txt))) VENDOR_PLATFORM_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/, $(strip $(shell cat $(DEVICE_PATH)/symlink/vendor.txt)))
$(VENDOR_PLATFORM_SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(VENDOR_PLATFORM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $(notdir $@)" $(hide) echo "Linking $(notdir $@)"
@ -56,6 +61,7 @@ ALL_DEFAULT_INSTALLED_MODULES += \
$(DISPLAY_SYMLINKS) \ $(DISPLAY_SYMLINKS) \
$(GATEKEEPER_SYMLINKS) \ $(GATEKEEPER_SYMLINKS) \
$(KEYMASTER_SYMLINKS) \ $(KEYMASTER_SYMLINKS) \
$(SENSOR_SYMLINKS) \
$(VENDOR_PLATFORM_SYMLINKS) $(VENDOR_PLATFORM_SYMLINKS)
endif endif

View file

@ -35,6 +35,9 @@ ro.hardware.gatekeeper=trustonic
ro.crypto.volume.filenames_mode=aes-256-cts ro.crypto.volume.filenames_mode=aes-256-cts
ro.hardware.kmsetkey=trustonic ro.hardware.kmsetkey=trustonic
# Sensors
ro.vendor.mtk.sensor.support=yes
# TEE # TEE
ro.vendor.mtk_trustonic_tee_support=1 ro.vendor.mtk_trustonic_tee_support=1

View file

@ -0,0 +1 @@
android.hardware.sensors@2.X-subhal-mediatek.so

View file

@ -216,16 +216,6 @@
<fqname>@1.2::ISecureElement/SIM1</fqname> <fqname>@1.2::ISecureElement/SIM1</fqname>
<fqname>@1.2::ISecureElement/SIM2</fqname> <fqname>@1.2::ISecureElement/SIM2</fqname>
</hal> </hal>
<hal format="hidl">
<name>android.hardware.sensors</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>ISensors</name>
<instance>default</instance>
</interface>
<fqname>@2.0::ISensors/default</fqname>
</hal>
<hal format="hidl"> <hal format="hidl">
<name>android.hardware.soundtrigger</name> <name>android.hardware.soundtrigger</name>
<transport>hwbinder</transport> <transport>hwbinder</transport>

View file

@ -171,6 +171,18 @@ PRODUCT_COPY_FILES += \
# Project ID Quota # Project ID Quota
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Sensors
PRODUCT_PACKAGES += \
libsensorndkbridge \
android.hardware.sensors@1.0.vendor \
android.hardware.sensors@2.1.vendor \
android.frameworks.sensorservice@1.0.vendor \
android.hardware.sensors@2.1-service.multihal \
android.hardware.sensors@2.0-ScopedWakelock.vendor
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
# Shipping API level # Shipping API level
PRODUCT_SHIPPING_API_LEVEL := 31 PRODUCT_SHIPPING_API_LEVEL := 31

View file

@ -486,6 +486,13 @@ vendor/lib64/libpowerhalwrap_vendor.so
vendor/lib64/libtranlog.so vendor/lib64/libtranlog.so
vendor/lib64/vendor.mediatek.hardware.power@2.0.so vendor/lib64/vendor.mediatek.hardware.power@2.0.so
# Sensors
vendor/lib64/hw/android.hardware.sensors@2.X-subhal-mediatek.so
vendor/lib64/hw/sensors.mediatek.V2.0.so
vendor/lib64/libhfmanager.so
vendor/lib64/libhwm.so
vendor/lib64/libksensor.so
# TEE # TEE
vendor/app/mcRegistry/020f0000000000000000000000000000.drbin vendor/app/mcRegistry/020f0000000000000000000000000000.drbin
vendor/app/mcRegistry/020f0000000000000000000000000000.tlbin vendor/app/mcRegistry/020f0000000000000000000000000000.tlbin