umi: Enable xiaomi powershare HAL
This commit is contained in:
@@ -24,8 +24,16 @@ TARGET_KERNEL_CONFIG := vendor/umi_defconfig
|
||||
# OTA assert
|
||||
TARGET_OTA_ASSERT_DEVICE := umi
|
||||
|
||||
# PowerShare
|
||||
SOONG_CONFIG_NAMESPACES += XIAOMI_POWERSHARE
|
||||
SOONG_CONFIG_XIAOMI_POWERSHARE := WIRELESS_TX_ENABLE_PATH
|
||||
SOONG_CONFIG_XIAOMI_POWERSHARE_WIRELESS_TX_ENABLE_PATH := /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/power_supply/wireless/reverse_chg_mode
|
||||
|
||||
# Properties
|
||||
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
|
||||
|
||||
# Sepolicy
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
|
||||
|
||||
# Inherit from the proprietary version
|
||||
include vendor/xiaomi/umi/BoardConfigVendor.mk
|
||||
|
||||
@@ -38,6 +38,10 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml
|
||||
|
||||
# PowerShare
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.powershare@1.0-service.xiaomi
|
||||
|
||||
# Rootdir
|
||||
PRODUCT_PACKAGES += \
|
||||
init.device.rc
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# PowerShare
|
||||
on boot
|
||||
chown system system /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/power_supply/wireless/reverse_chg_mode
|
||||
|
||||
# FOD
|
||||
on property:ro.boot.hwlevel=P0.1
|
||||
setprop vendor.lineage.fod.position_x 449
|
||||
setprop vendor.lineage.fod.position_y 1825
|
||||
|
||||
2
sepolicy/vendor/file_contexts
vendored
Normal file
2
sepolicy/vendor/file_contexts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# PowerShare
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.powershare@1\.0-service\.xiaomi u:object_r:hal_lineage_powershare_default_exec:s0
|
||||
2
sepolicy/vendor/hal_lineage_powershare_default.te
vendored
Normal file
2
sepolicy/vendor/hal_lineage_powershare_default.te
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
allow hal_lineage_powershare_default sysfs_battery_supply:dir r_dir_perms;
|
||||
allow hal_lineage_powershare_default sysfs_battery_supply:file rw_file_perms;
|
||||
Reference in New Issue
Block a user