xref: /aosp_15_r20/system/sepolicy/private/idmap.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Workertypeattribute idmap coredomain;
2*e4a36f41SAndroid Build Coastguard Worker
3*e4a36f41SAndroid Build Coastguard Workerinit_daemon_domain(idmap)
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Worker# Allow read + write access to /data/resource-cache
6*e4a36f41SAndroid Build Coastguard Workerallow idmap resourcecache_data_file:file create_file_perms;
7*e4a36f41SAndroid Build Coastguard Workerallow idmap resourcecache_data_file:dir rw_dir_perms;
8*e4a36f41SAndroid Build Coastguard Worker
9*e4a36f41SAndroid Build Coastguard Worker# Open and read from target and overlay apk files passed by argument.
10*e4a36f41SAndroid Build Coastguard Workerallow idmap apk_data_file:file r_file_perms;
11*e4a36f41SAndroid Build Coastguard Workerallow idmap apk_data_file:dir search;
12*e4a36f41SAndroid Build Coastguard Worker
13*e4a36f41SAndroid Build Coastguard Worker# Allow /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files
14*e4a36f41SAndroid Build Coastguard Workerallow idmap { apk_tmp_file apk_private_tmp_file }:file r_file_perms;
15*e4a36f41SAndroid Build Coastguard Workerallow idmap { apk_tmp_file apk_private_tmp_file }:dir search;
16*e4a36f41SAndroid Build Coastguard Worker
17*e4a36f41SAndroid Build Coastguard Worker# Allow apps access to /vendor/app
18*e4a36f41SAndroid Build Coastguard Workerr_dir_file(idmap, vendor_app_file)
19*e4a36f41SAndroid Build Coastguard Worker
20*e4a36f41SAndroid Build Coastguard Worker# Allow apps access to /vendor/overlay
21*e4a36f41SAndroid Build Coastguard Workerr_dir_file(idmap, vendor_overlay_file)
22*e4a36f41SAndroid Build Coastguard Worker
23*e4a36f41SAndroid Build Coastguard Worker# Allow the idmap2d binary to register as a service and communicate via AIDL
24*e4a36f41SAndroid Build Coastguard Workerbinder_use(idmap)
25*e4a36f41SAndroid Build Coastguard Workerbinder_service(idmap)
26*e4a36f41SAndroid Build Coastguard Workeradd_service(idmap, idmap_service)
27