recovery: Allow kernel to read and write unlabeled files
10-04 09:32:55.504 626 626 W kworker/6:3: type=1400 audit(0.0:1498): avc: denied { read } for name="bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:34:15.124 397 397 W kworker/6:1: type=1400 audit(0.0:1494): avc: denied { open } for path="/batinfo/bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:36:49.484 399 399 W kworker/6:2: type=1400 audit(0.0:1366): avc: denied { write } for name="Batpercentage" dev="sde50" ino=15 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
Change-Id: Ib22560ca9149b729529797b004bcb2ee4879c317
diff --git a/sepolicy/twrp.te b/sepolicy/twrp.te
index 3892ed6..7d700ce 100755
--- a/sepolicy/twrp.te
+++ b/sepolicy/twrp.te
@@ -4,6 +4,7 @@
permissive logd;
permissive adbd;
permissive fastbootd;
+ allow kernel unlabeled:file rw_file_perms;
allow kernel tmpfs:file { read };
allow kernel recovery:fd { use };
')