2015-06-19 19:47:26 +02:00
|
|
|
# idmap, when executed by installd
|
2016-12-10 04:30:39 +01:00
|
|
|
type idmap, domain;
|
2018-09-27 19:21:37 +02:00
|
|
|
type idmap_exec, system_file_type, exec_type, file_type;
|
2015-06-19 19:47:26 +02:00
|
|
|
|
2018-06-15 08:08:19 +02:00
|
|
|
# STOPSHIP remove /system/bin/idmap and the link between idmap and installd (b/118711077)
|
2015-06-19 19:47:26 +02:00
|
|
|
# Use open file to /data/resource-cache file inherited from installd.
|
|
|
|
allow idmap installd:fd use;
|
2018-06-15 08:08:19 +02:00
|
|
|
allow idmap resourcecache_data_file:file create_file_perms;
|
|
|
|
allow idmap resourcecache_data_file:dir rw_dir_perms;
|
2015-06-19 19:47:26 +02:00
|
|
|
|
2018-01-24 22:56:28 +01:00
|
|
|
# Ignore reading /proc/<pid>/maps after a fork.
|
|
|
|
dontaudit idmap installd:file read;
|
|
|
|
|
2015-06-19 19:47:26 +02:00
|
|
|
# Open and read from target and overlay apk files passed by argument.
|
|
|
|
allow idmap apk_data_file:file r_file_perms;
|
2015-06-22 09:31:25 +02:00
|
|
|
allow idmap apk_data_file:dir search;
|
2017-04-04 18:30:41 +02:00
|
|
|
|
|
|
|
# Allow apps access to /vendor/app
|
|
|
|
r_dir_file(idmap, vendor_app_file)
|
2017-04-06 01:16:13 +02:00
|
|
|
|
|
|
|
# Allow apps access to /vendor/overlay
|
|
|
|
r_dir_file(idmap, vendor_overlay_file)
|
2018-06-15 08:08:19 +02:00
|
|
|
|
|
|
|
# Allow the idmap2d binary to register as a service and communicate via AIDL
|
|
|
|
binder_use(idmap)
|
|
|
|
add_service(idmap, idmap_service)
|