Grant wmtrace access to platform_app:systemui

Grant read/write access to anyone for /data/misc/wmtrace folder on
debuggable builds, it's further protected by the selinux policy.

This is to allow systemui process to write proto logs to the same folder
on device as WindowManager, both can contribute to the transitions like
PiP, Split-Screen and etc.

Bug: 251513116
Test: adb shell dumpsys activity service SystemUIService \
      WMShell protolog [start | stop]
Ignore-AOSP-First: cherry-pick of aosp/2397772
Merged-In: Ice57efa17c61d132b02c0a11a762c24d772bd90a
Change-Id: Ice57efa17c61d132b02c0a11a762c24d772bd90a
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 02e51d2..c3216da 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -1269,11 +1269,13 @@
     setenv HOSTNAME console
 
 on property:ro.debuggable=1
-    # Give writes to anyone for the trace folder on debug builds.
+    # Give writes to the same group for the trace folder on debug builds,
+    # it's further protected by selinux policy.
     # The folder is used to store method traces.
     chmod 0773 /data/misc/trace
-    # Give reads to anyone for the window trace folder on debug builds.
-    chmod 0775 /data/misc/wmtrace
+    # Give writes and reads to anyone for the window trace folder on debug builds,
+    # it's further protected by selinux policy.
+    chmod 0777 /data/misc/wmtrace
     # Give reads to anyone for the accessibility trace folder on debug builds.
     chmod 0775 /data/misc/a11ytrace