aboutsummaryrefslogtreecommitdiff
path: root/rootdir/etc/init.batterysecret.rc
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/etc/init.batterysecret.rc')
-rw-r--r--rootdir/etc/init.batterysecret.rc31
1 files changed, 31 insertions, 0 deletions
diff --git a/rootdir/etc/init.batterysecret.rc b/rootdir/etc/init.batterysecret.rc
new file mode 100644
index 0000000..abfc11a
--- /dev/null
+++ b/rootdir/etc/init.batterysecret.rc
@@ -0,0 +1,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