vendor_xiaomi_sweet/proprietary/vendor/etc/init/init.batterysecret.rc
basamaryan 741bcfb529
sweet: Import from V13.0.15.0.SKFMIXM
Change-Id: I84ba021fe706d41a7be91c2035cedd9693c2f432
2023-05-19 02:06:59 +05:30

30 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
seclabel u:r:batterysecret:s0
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