avicii: Define OEM fast charge sysfs node

* required for oem fast charger detection
 * this forces android to display "charging rapidly" whenever our
   proprietary 30w charger is connected, based on the value of
   this node (0/1)

[SQUASH] martini: sepolicy: address selinux denial for oem fast charge

* 02-18 16:00:08.248  1702  1702 I HwBinder:1702_5: type=1400 audit(0.0:2401): avc: denied { open } for path="/sys/devices/virtual/oplus_chg/battery/voocchg_ing" dev="sysfs" ino=127171 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

* 02-18 15:36:04.348  1683  1683 W HwBinder:1683_5: type=1400 audit(0.0:2430): avc: denied { read } for name="voocchg_ing" dev="sysfs" ino=127167 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
This commit is contained in:
ghostrider-reborn
2023-03-11 21:27:36 +05:30
committed by Sandeep-FED
parent e32d523f9f
commit fe99a3dbd3
2 changed files with 9 additions and 0 deletions

View File

@@ -9,6 +9,10 @@ genfscon sysfs /devices/platform/soc/soc:oneplus_wlchg/power_supply u:object_
genfscon sysfs /devices/platform/soc/soc:oplus,chg_gki/power_supply u:object_r:vendor_sysfs_usb_supply:s0
genfscon sysfs /devices/platform/soc/soc:oplus,chg_intf/oplus_chg u:object_r:vendor_sysfs_usb_supply:s0
genfscon sysfs /devices/virtual/oplus_chg/usb u:object_r:vendor_sysfs_usb_supply:s0
genfscon sysfs /devices/virtual/oplus_chg/battery/voocchg_ing u:object_r:vendor_sysfs_battery_supply:s0
# Display
genfscon proc /devinfo/lcd u:object_r:vendor_proc_display:s0
genfscon proc /touchpanel u:object_r:vendor_proc_display:s0

View File

@@ -1 +1,6 @@
rw_dir_file(system_server, vendor_proc_tri_state_key)
# Allow system_server to read Fast Charging status
allow system_server vendor_sysfs_battery_supply:dir { search };
allow system_server vendor_sysfs_battery_supply:file { getattr open read };
allow system_server vendor_sysfs_battery_supply:file rw_file_perms;