From c69b5e0a69b4efd5e45af6ff833e4c6a52619284 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey <jsharkey@android.com> Date: Thu, 30 Jul 2015 17:51:04 -0700 Subject: [PATCH] Let Settings measure transient free space. Transient volumes like USB drives are only mounted at /mnt/media_rw, but they still appear in Settings > Storage. To show stats like free/used space, give Settings the permissions it needs to access devices mounted there. avc: denied { search } for name="media_rw" dev="tmpfs" ino=8358 scontext=u:r:system_app:s0 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 Bug: 22545248 Change-Id: I273a1729e417873184ad04ba9dd0fec95fd54f97 --- system_app.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system_app.te b/system_app.te index c0ac65be3..08e3f5cc5 100644 --- a/system_app.te +++ b/system_app.te @@ -27,6 +27,9 @@ allow system_app misc_user_data_file:file create_file_perms; auditallow system_app system_data_file:dir { create setattr add_name remove_name rmdir rename }; auditallow system_app system_data_file:file { create setattr append write link unlink rename }; +# Access to vold-mounted storage for measuring free space +allow system_app mnt_media_rw_file:dir search; + # Read wallpaper file. allow system_app wallpaper_file:file r_file_perms; -- GitLab