vendor_xiaomi_sweet/proprietary/vendor/etc/init/init.batterysecret.rc
basamaryan 166ab27046
sweet: Drop selinux context from batterysecret init unit
Change-Id: Ib812ddd236fe3f85f8033b3beeba16f3f457804a
2024-06-04 18:53:07 +05:30

29 lines
1.1 KiB
Plaintext

on property:sys.boot_completed=1
chmod 0664 /sys/class/usbpd/usbpd0/usbpd_verifed
chmod 0664 /sys/class/usbpd/usbpd0/request_vdm_cmd
chmod 0664 /sys/class/usbpd/usbpd0/verify_process
chmod 0664 /sys/class/power_supply/usb/pd_authentication
chmod 0664 /sys/class/power_supply/bms/authentic
chmod 0664 /sys/class/power_supply/bms_master/authentic
chmod 0664 /sys/class/power_supply/bms_slave/authentic
service batterysecret /vendor/bin/batterysecret
class last_start
user root
group system system wakelock
disabled
on property:sys.boot_completed=1
start batterysecret
#run batterysecret in off-charge mode
on charger
start batterysecret
chmod 0664 /sys/class/usbpd/usbpd0/usbpd_verifed
chmod 0664 /sys/class/usbpd/usbpd0/request_vdm_cmd
chmod 0664 /sys/class/usbpd/usbpd0/verify_process
chmod 0664 /sys/class/power_supply/usb/pd_authentication
chmod 0664 /sys/class/power_supply/bms/authentic
chmod 0664 /sys/class/power_supply/bms_master/authentic
chmod 0664 /sys/class/power_supply/bms_slave/authentic