diff --git a/motomods.xml b/motomods.xml index e303ec7fb7ef3f8f24a7caf07f959175e84ef52d..60c8c7d48457628767e48088ed02aa520416a9c7 100644 --- a/motomods.xml +++ b/motomods.xml @@ -18,4 +18,13 @@ </interface> <fqname>@1.0::IEQServiceHIDL/default</fqname> </hal> + <hal format="hidl"> + <name>motorola.hardware.health</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IMotHealth</name> + <instance>default</instance> + </interface> + </hal> </manifest> diff --git a/proprietary-files.txt b/proprietary-files.txt index a4cbaa78cd17662d3a523811623ff8ff98ebfd9c..b76d9ffc73e512d11a659a874b3089207aeafba8 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -455,6 +455,12 @@ vendor/lib64/libkeymasterdeviceutils.so vendor/lib64/libkeymasterprovision.so vendor/lib64/libkeymasterutils.so +# MotHealth +vendor/bin/hw/motorola.hardware.health@1.0-service +vendor/etc/init/motorola.hardware.health@1.0-service.rc +vendor/lib/motorola.hardware.health@1.0.so +vendor/lib64/motorola.hardware.health@1.0.so + # Moto Mods -system/priv-app/ModFmwkProxyService/ModFmwkProxyService.apk|37a020b2350748a5f684870d652a1e3e31d8d1e2 -system/priv-app/ModService/ModService.apk|c823ccd189721d1c39ba667e8a7d1151cdf88a8d diff --git a/sepolicy-mods/vendor/file_contexts b/sepolicy-mods/vendor/file_contexts index a28629127f03ee3dad2cbaae452d63b397d3eb47..d1142b4d725f1a57a1ea094a841f8a206f38d487 100644 --- a/sepolicy-mods/vendor/file_contexts +++ b/sepolicy-mods/vendor/file_contexts @@ -1,3 +1,4 @@ +/(vendor|system/vendor)/bin/hw/motorola\.hardware\.health@1\.0-service u:object_r:hal_health_default_exec:s0 /(vendor|system/vendor)/bin/init\.gbmods\.sh u:object_r:init_mods_exec:s0 /(vendor|system/vendor)/bin/mods_camd u:object_r:mods_camd_exec:s0 /(vendor|system/vendor)/lib(64)?/libmodmanager\.so u:object_r:same_process_hal_file:s0 diff --git a/sepolicy-mods/vendor/hal_health_default.te b/sepolicy-mods/vendor/hal_health_default.te index 55c0d3daec0f46d0e212054348bdbf005b96bd3f..656e6a7720ffaf416e5a06b99d804afc8c8803d5 100644 --- a/sepolicy-mods/vendor/hal_health_default.te +++ b/sepolicy-mods/vendor/hal_health_default.te @@ -1,2 +1,13 @@ -allow hal_health_default sysfs_greybus:dir r_dir_perms; -allow hal_health_default sysfs_greybus:file rw_file_perms; +allow hal_health_default { + sysfs_battery_supply + sysfs_greybus + sysfs +}:dir r_dir_perms; + +allow hal_health_default { + sysfs_battery_supply + sysfs_greybus + sysfs +}:file rw_file_perms; + +allow hal_health_default self:binder call; diff --git a/sepolicy-mods/vendor/hwservice_contexts b/sepolicy-mods/vendor/hwservice_contexts index 26eddc1ec576a7a9c69b92dd5ad7df6eef7843e1..d2d5471bf47f1b9dab9d2e8616db51393830f81b 100644 --- a/sepolicy-mods/vendor/hwservice_contexts +++ b/sepolicy-mods/vendor/hwservice_contexts @@ -1,3 +1,3 @@ com.motorola.mod::IModManager u:object_r:hal_modmanager_hwservice:s0 +motorola.hardware.health::IMotHealth u:object_r:hal_health_hwservice:s0 motorola.hardware.vibrator::IMotVibrator u:object_r:hal_motvibrator_hwservice:s0 -