Revert^2 "Add pm.archiving.enabled system property"
This reverts commit 840041d5d203294f5888d4a7e50d8d9a5dce5ca0.
Reason for revert: 202404 prebuilts must not be changed since freeze.
Change-Id: I320fde8de611ad4ae1546f4ce754871a0646dcc4
diff --git a/private/compat/202404/202404.cil b/private/compat/202404/202404.cil
index 2b775be..02bbced 100644
--- a/private/compat/202404/202404.cil
+++ b/private/compat/202404/202404.cil
@@ -813,6 +813,7 @@
(expandtypeattribute (pipefs_202404) true)
(expandtypeattribute (platform_app_202404) true)
(expandtypeattribute (platform_compat_service_202404) true)
+(expandtypeattribute (pm_archiving_enabled_prop_202404) true)
(expandtypeattribute (pmsg_device_202404) true)
(expandtypeattribute (port_202404) true)
(expandtypeattribute (port_device_202404) true)
@@ -2204,6 +2205,7 @@
(typeattributeset pipefs_202404 (pipefs))
(typeattributeset platform_app_202404 (platform_app))
(typeattributeset platform_compat_service_202404 (platform_compat_service))
+(typeattributeset pm_archiving_enabled_prop_202404 (pm_archiving_enabled_prop))
(typeattributeset pmsg_device_202404 (pmsg_device))
(typeattributeset port_202404 (port))
(typeattributeset port_device_202404 (port_device))
diff --git a/private/compat/34.0/34.0.ignore.cil b/private/compat/34.0/34.0.ignore.cil
index c5b9edd..1477766 100644
--- a/private/compat/34.0/34.0.ignore.cil
+++ b/private/compat/34.0/34.0.ignore.cil
@@ -27,6 +27,7 @@
virtual_camera_service
ot_daemon_service
ot_daemon_socket
+ pm_archiving_enabled_prop
remote_auth_service
security_state_service
sensitive_content_protection_service
diff --git a/private/priv_app.te b/private/priv_app.te
index 5c3f351..9ba2c95 100644
--- a/private/priv_app.te
+++ b/private/priv_app.te
@@ -293,3 +293,6 @@
bluetooth_socket iucv_socket rxrpc_socket isdn_socket phonet_socket ieee802154_socket caif_socket
alg_socket nfc_socket kcm_socket qipcrtr_socket smc_socket xdp_socket
} *;
+
+# Allow priv_apps to check if archiving is enabled
+get_prop(priv_app, pm_archiving_enabled_prop)
diff --git a/private/property.te b/private/property.te
index 7c3d035..994594d 100644
--- a/private/property.te
+++ b/private/property.te
@@ -798,3 +798,9 @@
-system_app
-device_as_webcam
} usb_uvc_enabled_prop:file no_rw_file_perms;
+
+neverallow {
+ domain
+ -init
+ -vendor_init
+} pm_archiving_enabled_prop:property_service set;
diff --git a/private/property_contexts b/private/property_contexts
index e8d876a..6629169 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -1656,6 +1656,9 @@
# Properties for game manager service
persist.graphics.game_default_frame_rate.enabled u:object_r:game_manager_config_prop:s0 exact bool
+# Properties for app archiving
+pm.archiving.enabled u:object_r:pm_archiving_enabled_prop:s0 exact bool
+
# Properties for ThreadNetworkService
threadnetwork.country_code u:object_r:threadnetwork_config_prop:s0 exact string
diff --git a/private/system_app.te b/private/system_app.te
index af9d168..9795746 100644
--- a/private/system_app.te
+++ b/private/system_app.te
@@ -174,6 +174,9 @@
# Settings app reads ro.usb.uvc.enabled
get_prop(system_app, usb_uvc_enabled_prop)
+# Settings and Launcher apps read pm.archiving.enabled
+get_prop(system_app, pm_archiving_enabled_prop)
+
# Settings app reads and writes the wifi blob database
allow system_app connectivityblob_data_file:dir rw_dir_perms;
allow system_app connectivityblob_data_file:file create_file_perms;
diff --git a/private/system_server.te b/private/system_server.te
index ded2c7b..f6ae092 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -1626,6 +1626,10 @@
-system_server
} threadnetwork_config_prop:file no_rw_file_perms;
+# Allow system server to read pm.archiving.enabled prop
+# TODO(azilio): Remove system property after archiving testing is completed.
+get_prop(system_server, pm_archiving_enabled_prop)
+
# Allow accessing /mnt/pre_reboot_dexopt/chroot, to load the new service-art.jar
# in Pre-reboot Dexopt.
allow system_server pre_reboot_dexopt_file:dir { getattr search };