mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_miatoll.git
synced 2025-04-29 02:37:19 +09:00
miatoll: Fixup sensors list
* With MIUI 13, Xiaomi deleted sensor_temperature from its sensor list * Let's use a simple script that clears out the long gone sensor entry from the list Change-Id: I7d1ba1aeb40627f5732422a4135cc5394be83703
This commit is contained in:
parent
265a57d6b3
commit
1d56ce6642
@ -349,7 +349,8 @@ PRODUCT_PACKAGES += \
|
|||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
init.qcom.early_boot.sh \
|
init.qcom.early_boot.sh \
|
||||||
init.qcom.sh \
|
init.qcom.sh \
|
||||||
init.qti.chg_policy.sh
|
init.qti.chg_policy.sh \
|
||||||
|
init.sensors_fixup.sh
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
init.device.rc \
|
init.device.rc \
|
||||||
|
@ -23,6 +23,12 @@ sh_binary {
|
|||||||
vendor: true,
|
vendor: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "init.sensors_fixup.sh",
|
||||||
|
src: "bin/init.sensors_fixup.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
||||||
// fstab
|
// fstab
|
||||||
prebuilt_etc {
|
prebuilt_etc {
|
||||||
name: "fstab.qcom",
|
name: "fstab.qcom",
|
||||||
|
8
rootdir/bin/init.sensors_fixup.sh
Normal file
8
rootdir/bin/init.sensors_fixup.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/vendor/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2023 The LineageOS Project
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
sed -i '/sensor_temperature/d' /mnt/vendor/persist/sensors/sensors_list.txt
|
@ -81,6 +81,8 @@ on fs
|
|||||||
mkdir /mnt/vendor/persist/subsys 0770 root system
|
mkdir /mnt/vendor/persist/subsys 0770 root system
|
||||||
mkdir /mnt/vendor/persist/audio 0755 system system
|
mkdir /mnt/vendor/persist/audio 0755 system system
|
||||||
mkdir /mnt/vendor/persist/haptics 0755 system system
|
mkdir /mnt/vendor/persist/haptics 0755 system system
|
||||||
|
# Clean out sensor_temperature from the sensor list
|
||||||
|
start vendor.sensors_fixup
|
||||||
|
|
||||||
on post-fs
|
on post-fs
|
||||||
write /dev/ipa 1
|
write /dev/ipa 1
|
||||||
@ -156,6 +158,12 @@ service vendor.thermal-engine /vendor/bin/thermal-engine -c /vendor/etc/thermal-
|
|||||||
user root
|
user root
|
||||||
group root
|
group root
|
||||||
|
|
||||||
|
service vendor.sensors_fixup /vendor/bin/init.sensors_fixup.sh
|
||||||
|
class main
|
||||||
|
user system
|
||||||
|
group system
|
||||||
|
oneshot
|
||||||
|
|
||||||
on property:init.svc.vendor.per_mgr=running
|
on property:init.svc.vendor.per_mgr=running
|
||||||
start vendor.per_proxy
|
start vendor.per_proxy
|
||||||
|
|
||||||
|
3
sepolicy/vendor/file_contexts
vendored
3
sepolicy/vendor/file_contexts
vendored
@ -53,6 +53,9 @@
|
|||||||
/vendor/lib64/libxmi_high_dynamic_range\.so u:object_r:same_process_hal_file:s0
|
/vendor/lib64/libxmi_high_dynamic_range\.so u:object_r:same_process_hal_file:s0
|
||||||
/vendor/lib64/libxml2_vendor\.so u:object_r:same_process_hal_file:s0
|
/vendor/lib64/libxml2_vendor\.so u:object_r:same_process_hal_file:s0
|
||||||
|
|
||||||
|
# Sensors
|
||||||
|
/vendor/bin/init\.sensors_fixup\.sh u:object_r:vendor_init-qcom-sensors-sh_exec:s0
|
||||||
|
|
||||||
# Thermal
|
# Thermal
|
||||||
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0
|
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0
|
||||||
/vendor/bin/thermal_symlinks u:object_r:init-thermal-symlinks-sh_exec:s0
|
/vendor/bin/thermal_symlinks u:object_r:init-thermal-symlinks-sh_exec:s0
|
||||||
|
2
sepolicy/vendor/init-qcom-sensors-sh.te
vendored
Normal file
2
sepolicy/vendor/init-qcom-sensors-sh.te
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
allow vendor_init-qcom-sensors-sh vendor_persist_sensors_file:dir rw_dir_perms;
|
||||||
|
allow vendor_init-qcom-sensors-sh vendor_persist_sensors_file:file create_file_perms;
|
Loading…
x
Reference in New Issue
Block a user