From a4e2aa1345709126d40c3ce66eb6a243d84b4129 Mon Sep 17 00:00:00 2001
From: Amith Yamasani <yamasani@google.com>
Date: Wed, 15 Jun 2016 15:27:48 -0700
Subject: [PATCH] Allow installd to delete the foreign-dex folder

Grant installd the policies to recursively delete
the foreign-dex folder when removing a user. Otherwise
the user cleanup will partially fail and cause a boot loop
when the userId is reused as some later point.

Bug: 29285673
Change-Id: I023f150cffbeb10b6014f48bca9eb0922c2d630a
---
 installd.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/installd.te b/installd.te
index 365722b3f..ebd759174 100644
--- a/installd.te
+++ b/installd.te
@@ -119,6 +119,9 @@ allow installd user_profile_data_file:dir create_dir_perms;
 allow installd user_profile_data_file:file create_file_perms;
 allow installd user_profile_data_file:dir rmdir;
 allow installd user_profile_data_file:file unlink;
+allow installd user_profile_foreign_dex_data_file:dir { add_name getattr rmdir open read write search remove_name };
+allow installd user_profile_foreign_dex_data_file:file { getattr rename unlink };
+
 # Files created/updated by profman dumps.
 allow installd profman_dump_data_file:dir { search add_name write };
 allow installd profman_dump_data_file:file { create setattr open write };
-- 
GitLab