RM6785: Build stub mtkpower service
* It seems even after adding a dummy libmtkperf_client library,
camera still refuses to work, it seems MediaTek have used a
mix of that client library, and direct HIDL calls to the power
implementation. Build a stub mtkpower service to get around
this limitation.
* https://github.com/mt6768-dev/vendor_mediatek_opensource_interfaces/tree/17ddcd53b8b276454c86c5296f1895ab59800a10/mtkpower/1.2
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: Iea5c8711ba1d71377c840112dff94813a79bbec4
diff --git a/device.mk b/device.mk
index 905b9c1..862ac2b 100644
--- a/device.mk
+++ b/device.mk
@@ -240,7 +240,8 @@
PRODUCT_PACKAGES += \
vendor.mediatek.hardware.mtkpower@1.0.vendor \
- vendor.mediatek.hardware.mtkpower@1.1.vendor
+ vendor.mediatek.hardware.mtkpower@1.1.vendor \
+ vendor.mediatek.hardware.mtkpower@1.2-service.stub
# Properties
include $(LOCAL_PATH)/vendor_prop.mk
diff --git a/manifest.xml b/manifest.xml
index 077df5c..17c2b11 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -337,6 +337,12 @@
</interface>
</hal>
<hal format="hidl">
+ <name>vendor.mediatek.hardware.mtkpower</name>
+ <transport>hwbinder</transport>
+ <fqname>@1.2::IMtkPerf/default</fqname>
+ <fqname>@1.2::IMtkPower/default</fqname>
+ </hal>
+ <hal format="hidl">
<name>vendor.mediatek.hardware.mtkradioex</name>
<transport>hwbinder</transport>
<fqname>@2.0::IMtkRadioEx/imsSlot1</fqname>
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
index 3bb4c92..9911b32 100644
--- a/sepolicy/vendor/file_contexts
+++ b/sepolicy/vendor/file_contexts
@@ -8,6 +8,7 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator-service\.RM6785 u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.health-service\.RM6785 u:object_r:hal_health_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.memtrack-service\.RM6785 u:object_r:hal_memtrack_default_exec:s0
+/(vendor|system/vendor)/bin/hw/vendor\.mediatek\.hardware\.mtkpower@1\.2-service\.stub u:object_r:mtk_hal_power_exec:s0
# Devices
/dev/pn553 u:object_r:nfc_device:s0