Allow apps to write to anr_data_file for /data/anr/traces.txt.
diff --git a/app.te b/app.te
index 99c8e6a..7e06c10 100644
--- a/app.te
+++ b/app.te
@@ -99,6 +99,10 @@
# Read/write wallpaper file (opened by system).
allow appdomain wallpaper_file:file { read write };
+# Write to /data/anr/traces.txt.
+allow appdomain anr_data_file:dir search;
+allow appdomain anr_data_file:file { open append };
+
# Use the Binder.
binder_use(appdomain)
# Perform binder IPC to binder services.
diff --git a/file.te b/file.te
index 312ace8..b6e3a5d 100644
--- a/file.te
+++ b/file.te
@@ -26,7 +26,7 @@
# /data/drm - DRM plugin data
type drm_data_file, file_type, data_file_type;
# /data/anr - ANR traces
-type anr_data_file, file_type, data_file_type;
+type anr_data_file, file_type, data_file_type, mlstrustedobject;
# /data/tombstones - core dumps
type tombstone_data_file, file_type, data_file_type;
# /data/app - user-installed apps