• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on property:vendor.thermal.link_ready=1
2    mkdir /data/vendor/mitigation 0755 system system
3    chown system system /data/vendor/mitigation
4    start vendor.battery_mitigation
5
6on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,if && property:sys.boot.reason=reboot,uvlo,pmic,if
7    setprop vendor.brownout_reason "uvlo,pmic,if"
8
9on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,pmic,if && property:sys.boot.reason=reboot,ocp,pmic,if
10    setprop vendor.brownout_reason "ocp,pmic,if"
11
12on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,main && property:sys.boot.reason=reboot,uvlo,pmic,main
13    setprop vendor.brownout_reason "uvlo,pmic,main"
14
15on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,sub && property:sys.boot.reason=reboot,uvlo,pmic,sub
16    setprop vendor.brownout_reason "uvlo,pmic,sub"
17
18on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1M && property:sys.boot.reason=reboot,ocp,buck1m
19    setprop vendor.brownout_reason "ocp,buck1m"
20
21on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2M && property:sys.boot.reason=reboot,ocp,buck2m
22    setprop vendor.brownout_reason "ocp,buck2m"
23
24on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3M && property:sys.boot.reason=reboot,ocp,buck3m
25    setprop vendor.brownout_reason "ocp,buck3m"
26
27on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4M && property:sys.boot.reason=reboot,ocp,buck4m
28    setprop vendor.brownout_reason "ocp,buck4m"
29
30on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5M && property:sys.boot.reason=reboot,ocp,buck5m
31    setprop vendor.brownout_reason "ocp,buck5m"
32
33on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6M && property:sys.boot.reason=reboot,ocp,buck6m
34    setprop vendor.brownout_reason "ocp,buck6m"
35
36on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7M && property:sys.boot.reason=reboot,ocp,buck7m
37    setprop vendor.brownout_reason "ocp,buck7m"
38
39on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8M && property:sys.boot.reason=reboot,ocp,buck8m
40    setprop vendor.brownout_reason "ocp,buck8m"
41
42on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9M && property:sys.boot.reason=reboot,ocp,buck9m
43    setprop vendor.brownout_reason "ocp,buck9m"
44
45on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10M && property:sys.boot.reason=reboot,ocp,buck10m
46    setprop vendor.brownout_reason "ocp,buck10m"
47
48on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1S && property:sys.boot.reason=reboot,ocp,buck1s
49    setprop vendor.brownout_reason "ocp,buck1s"
50
51on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2S && property:sys.boot.reason=reboot,ocp,buck2s
52    setprop vendor.brownout_reason "ocp,buck2s"
53
54on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3S && property:sys.boot.reason=reboot,ocp,buck3s
55    setprop vendor.brownout_reason "ocp,buck3s"
56
57on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4S && property:sys.boot.reason=reboot,ocp,buck4s
58    setprop vendor.brownout_reason "ocp,buck4s"
59
60on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5S && property:sys.boot.reason=reboot,ocp,buck5s
61    setprop vendor.brownout_reason "ocp,buck5s"
62
63on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6S && property:sys.boot.reason=reboot,ocp,buck6s
64    setprop vendor.brownout_reason "ocp,buck6s"
65
66on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7S && property:sys.boot.reason=reboot,ocp,buck7s
67    setprop vendor.brownout_reason "ocp,buck7s"
68
69on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8S && property:sys.boot.reason=reboot,ocp,buck8s
70    setprop vendor.brownout_reason "ocp,buck8s"
71
72on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9S && property:sys.boot.reason=reboot,ocp,buck9s
73    setprop vendor.brownout_reason "ocp,buck9s"
74
75on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10S && property:sys.boot.reason=reboot,ocp,buck10s
76    setprop vendor.brownout_reason "ocp,buck10s"
77
78on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKDS && property:sys.boot.reason=reboot,ocp,buckds
79    setprop vendor.brownout_reason "ocp,buckds"
80
81on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKAS && property:sys.boot.reason=reboot,ocp,buckas
82    setprop vendor.brownout_reason "ocp,buckas"
83
84on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKCS && property:sys.boot.reason=reboot,ocp,buckcs
85    setprop vendor.brownout_reason "ocp,buckcs"
86
87on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKBS && property:sys.boot.reason=reboot,ocp,buckbs
88    setprop vendor.brownout_reason "ocp,buckbs"
89
90on property:vendor.brownout.br.feasible=1
91    chown system system data/vendor/mitigation/lastmeal.txt
92
93service vendor.battery_mitigation /vendor/bin/hw/battery_mitigation
94    user system
95    group system
96    capabilities WAKE_ALARM BLOCK_SUSPEND
97