aboutsummaryrefslogtreecommitdiff
path: root/rootdir/etc/init.batterysecret.rc
diff options
context:
space:
mode:
authorkleidione Freitas <kleidione@gmail.com>2022-03-24 09:16:43 -0300
committerkleidione <kleidione@gmail.com>2022-11-09 17:29:16 -0300
commit44d5c9e2cf9f1ce0670be5bedd1e415cd5c3e739 (patch)
tree4516fedba0c65fda9e795d8737d08a7746d41e40 /rootdir/etc/init.batterysecret.rc
parent15eeafbf239f393fcb6ed1a719398e5b7bbd6a19 (diff)
veux: Merge common tree to veux
- Ref: https://github.com/xiaomi-sm6375-devs/android_device_xiaomi_sm6375-common Signed-off-by: kleidione <kleidione@gmail.com>
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