#integrated process type charger_monitor, domain; type charger_monitor_exec, exec_type, file_type; #started by init init_daemon_domain(charger_monitor) #charger monitor will use uevent, visit sysfs and use the wake lock allow charger_monitor self:netlink_kobject_uevent_socket { read create setopt bind }; allow charger_monitor sysfs:file rw_file_perms; allow charger_monitor sysfs_wake_lock:file rw_file_perms; allow charger_monitor sysfs_battery_supply:dir search; allow charger_monitor sysfs_battery_supply:file rw_file_perms; allow charger_monitor sysfs_usb_supply:dir search; allow charger_monitor sysfs_usb_supply:file r_file_perms;