idmap.te 1.1 KB

123456789101112131415161718192021222324252627282930
  1. # idmap, when executed by installd
  2. type idmap, domain;
  3. type idmap_exec, system_file_type, exec_type, file_type;
  4. # TODO remove /system/bin/idmap and the link between idmap and installd (b/118711077)
  5. # Use open file to /data/resource-cache file inherited from installd.
  6. allow idmap installd:fd use;
  7. allow idmap resourcecache_data_file:file create_file_perms;
  8. allow idmap resourcecache_data_file:dir rw_dir_perms;
  9. # Ignore reading /proc/<pid>/maps after a fork.
  10. dontaudit idmap installd:file read;
  11. # Open and read from target and overlay apk files passed by argument.
  12. allow idmap apk_data_file:file r_file_perms;
  13. allow idmap apk_data_file:dir search;
  14. # Allow /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files
  15. allow idmap { apk_tmp_file apk_private_tmp_file }:file r_file_perms;
  16. allow idmap { apk_tmp_file apk_private_tmp_file }:dir search;
  17. # Allow apps access to /vendor/app
  18. r_dir_file(idmap, vendor_app_file)
  19. # Allow apps access to /vendor/overlay
  20. r_dir_file(idmap, vendor_overlay_file)
  21. # Allow the idmap2d binary to register as a service and communicate via AIDL
  22. binder_use(idmap)
  23. add_service(idmap, idmap_service)