diff --git a/public/domain_deprecated.te b/public/domain_deprecated.te index 97777533dd3f51c67f69bb7c77f812b51f239829..7a26becdccf97b7f0b75dca63282b4dd4fe813ef 100644 --- a/public/domain_deprecated.te +++ b/public/domain_deprecated.te @@ -1,11 +1,12 @@ # rules removed from the domain attribute # Search /storage/emulated tmpfs mount. -allow domain_deprecated tmpfs:dir r_dir_perms; +allow { domain_deprecated -installd } tmpfs:dir r_dir_perms; userdebug_or_eng(` auditallow { domain_deprecated -appdomain + -installd -sdcardd -surfaceflinger -system_server diff --git a/public/installd.te b/public/installd.te index c5b45b461ce664742735f96c195403b62c1049a1..359356aa32fb74e3f94811e65f52d8c1b347575f 100644 --- a/public/installd.te +++ b/public/installd.te @@ -54,6 +54,12 @@ allow installd media_rw_data_file:file { getattr unlink }; allow installd system_data_file:dir relabelfrom; allow installd media_rw_data_file:dir relabelto; +# Delete /data/media files through sdcardfs, instead of going behind its back +allow installd tmpfs:dir r_dir_perms; +allow installd storage_file:dir search; +allow installd sdcardfs:dir { search open read write remove_name getattr rmdir }; +allow installd sdcardfs:file { getattr unlink }; + # Upgrade /data/misc/keychain for multi-user if necessary. allow installd misc_user_data_file:dir create_dir_perms; allow installd misc_user_data_file:file create_file_perms;