Add permission to installd to delete `virtualizationservice_data_file`
Terminal app had re-labelled its data file to `virtualizationservice_data_file`,
but we don't use that label anymore, so removed permission as well.
But it causes sepolicy error when updating from older version.
At least to recover with clean image, we need to provide a way to clear
terminal app in developer's option.
Bug: 383026786
Change-Id: I4563156c436e34c0adbf81799e709391fde6d0b4
Test: install older version and update terminal app, while preserving data
diff --git a/private/installd.te b/private/installd.te
index 55e962a..50c378a 100644
--- a/private/installd.te
+++ b/private/installd.te
@@ -226,6 +226,13 @@
allow installd storage_area_key_file:file unlink;
')
+# Allow installd to delete the terminal app's data file.
+# `virtualizationservice_data_file` was used for a while, but it needs to be
+# deleted when terminal feature is disabled.
+# TODO(b/383026786): Remove this rule once the there is no
+# `virtualizationservice_data_file` in terminal app anymore..
+allow installd virtualizationservice_data_file:file unlink;
+
###
### Neverallow rules
###