aboutsummaryrefslogtreecommitdiff
path: root/rootdir/etc/init.batterysecret.rc
blob: abfc11a23c21d4c7c91bbf22de6cb0f9ed1d08cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
on property:sys.boot_completed=1
    chmod 0664 /sys/class/Charging_Adapter/pd_adapter/usbpd_verifed
    chmod 0664 /sys/class/Charging_Adapter/pd_adapter/request_vdm_cmd
    chmod 0664 /sys/class/Charging_Adapter/pd_adapter/verify_process
    chmod 0664 /sys/class/qcom-battery/odm_battery/pd_auth
    chmod 0664 /sys/class/qcom-battery/odm_battery/verify_digest
    chmod 0664 /sys/class/qcom-battery/odm_battery/real_type
    chmod 0664 /sys/class/qcom-battery/odm_battery/authentic
    chmod 0664 /sys/class/qcom-battery/odm_battery/input_suspend

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/Charging_Adapter/pd_adapter/usbpd_verifed
    chmod 0664 /sys/class/Charging_Adapter/pd_adapter/request_vdm_cmd
    chmod 0664 /sys/class/Charging_Adapter/pd_adapter/verify_process
    chmod 0664 /sys/class/qcom-battery/odm_battery/pd_auth
    chmod 0664 /sys/class/qcom-battery/odm_battery/verify_digest
    chmod 0664 /sys/class/qcom-battery/odm_battery/real_type
    chmod 0664 /sys/class/qcom-battery/odm_battery/authentic
    chmod 0664 /sys/class/qcom-battery/odm_battery/input_suspend