aboutsummaryrefslogtreecommitdiff
path: root/sepolicy/vendor/batterysecret.te
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 /sepolicy/vendor/batterysecret.te
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 'sepolicy/vendor/batterysecret.te')
-rw-r--r--sepolicy/vendor/batterysecret.te49
1 files changed, 49 insertions, 0 deletions
diff --git a/sepolicy/vendor/batterysecret.te b/sepolicy/vendor/batterysecret.te
new file mode 100644
index 0000000..b55fc19
--- /dev/null
+++ b/sepolicy/vendor/batterysecret.te
@@ -0,0 +1,49 @@
+type batterysecret, domain;
+type batterysecret_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(batterysecret)
+
+r_dir_file(batterysecret, cgroup)
+r_dir_file(batterysecret, mnt_vendor_file)
+r_dir_file(batterysecret, vendor_sysfs_battery_supply)
+r_dir_file(batterysecret, sysfs_batteryinfo)
+r_dir_file(batterysecret, sysfs_type)
+r_dir_file(batterysecret, vendor_sysfs_usb_supply)
+r_dir_file(batterysecret, vendor_sysfs_usbpd_device)
+
+allow batterysecret {
+ mnt_vendor_file
+ persist_subsys_file
+ rootfs
+}:dir rw_dir_perms;
+
+allow batterysecret {
+ persist_subsys_file
+ sysfs
+ vendor_sysfs_battery_supply
+ sysfs_usb
+ vendor_sysfs_usb_supply
+ vendor_sysfs_usbpd_device
+}:file w_file_perms;
+
+allow batterysecret kmsg_device:chr_file rw_file_perms;
+
+allow batterysecret self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
+
+allow batterysecret self:global_capability_class_set {
+ sys_tty_config
+ sys_boot
+};
+
+allow batterysecret self:capability {
+ chown
+ fsetid
+};
+
+allow batterysecret {
+ system_suspend_hwservice
+ hidl_manager_hwservice
+}:hwservice_manager find;
+
+binder_call(batterysecret, system_suspend_server)
+
+wakelock_use(batterysecret) \ No newline at end of file