xref: /aosp_15_r20/system/sepolicy/prebuilts/api/29.0/private/installd.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Workertypeattribute installd coredomain;
2*e4a36f41SAndroid Build Coastguard Worker
3*e4a36f41SAndroid Build Coastguard Workerinit_daemon_domain(installd)
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Worker# Run dex2oat in its own sandbox.
6*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, dex2oat_exec, dex2oat)
7*e4a36f41SAndroid Build Coastguard Worker
8*e4a36f41SAndroid Build Coastguard Worker# Run dexoptanalyzer in its own sandbox.
9*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, dexoptanalyzer_exec, dexoptanalyzer)
10*e4a36f41SAndroid Build Coastguard Worker
11*e4a36f41SAndroid Build Coastguard Worker# Run viewcompiler in its own sandbox.
12*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, viewcompiler_exec, viewcompiler)
13*e4a36f41SAndroid Build Coastguard Worker
14*e4a36f41SAndroid Build Coastguard Worker# Run profman in its own sandbox.
15*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, profman_exec, profman)
16*e4a36f41SAndroid Build Coastguard Worker
17*e4a36f41SAndroid Build Coastguard Worker# Run idmap in its own sandbox.
18*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, idmap_exec, idmap)
19*e4a36f41SAndroid Build Coastguard Worker
20*e4a36f41SAndroid Build Coastguard Worker# Run migrate_legacy_obb_data.sh in its own sandbox.
21*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(installd, migrate_legacy_obb_data_exec, migrate_legacy_obb_data)
22*e4a36f41SAndroid Build Coastguard Workerallow installd shell_exec:file rx_file_perms;
23*e4a36f41SAndroid Build Coastguard Worker
24*e4a36f41SAndroid Build Coastguard Worker# Create /data/.layout_version.* file
25*e4a36f41SAndroid Build Coastguard Workertype_transition installd system_data_file:file install_data_file;
26*e4a36f41SAndroid Build Coastguard Worker
27*e4a36f41SAndroid Build Coastguard Worker# For collecting bugreports.
28*e4a36f41SAndroid Build Coastguard Workerallow installd dumpstate:fd use;
29*e4a36f41SAndroid Build Coastguard Workerallow installd dumpstate:fifo_file r_file_perms;
30*e4a36f41SAndroid Build Coastguard Worker
31*e4a36f41SAndroid Build Coastguard Worker# Delete /system/bin/bcc generated artifacts
32*e4a36f41SAndroid Build Coastguard Workerallow installd app_exec_data_file:file unlink;
33*e4a36f41SAndroid Build Coastguard Worker
34*e4a36f41SAndroid Build Coastguard Worker# Capture userdata snapshots to /data/misc_[ce|de]/rollback and
35*e4a36f41SAndroid Build Coastguard Worker# subsequently restore them.
36*e4a36f41SAndroid Build Coastguard Workerallow installd rollback_data_file:dir create_dir_perms;
37*e4a36f41SAndroid Build Coastguard Workerallow installd rollback_data_file:file create_file_perms;
38*e4a36f41SAndroid Build Coastguard Worker
39*e4a36f41SAndroid Build Coastguard Worker# Allow installd to access the runtime feature flag properties.
40*e4a36f41SAndroid Build Coastguard Workerget_prop(installd, device_config_runtime_native_prop)
41*e4a36f41SAndroid Build Coastguard Workerget_prop(installd, device_config_runtime_native_boot_prop)
42*e4a36f41SAndroid Build Coastguard Worker
43*e4a36f41SAndroid Build Coastguard Worker# Allow installd to delete files in /data/staging
44*e4a36f41SAndroid Build Coastguard Workerallow installd staging_data_file:file unlink;
45*e4a36f41SAndroid Build Coastguard Workerallow installd staging_data_file:dir { open read remove_name rmdir search write };
46