uncrypt.te 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # uncrypt
  2. type uncrypt, domain, mlstrustedsubject;
  3. type uncrypt_exec, system_file_type, exec_type, file_type;
  4. allow uncrypt self:global_capability_class_set { dac_override dac_read_search };
  5. userdebug_or_eng(`
  6. # For debugging, allow /data/local/tmp access
  7. r_dir_file(uncrypt, shell_data_file)
  8. ')
  9. # Read /cache/recovery/command
  10. # Read /cache/recovery/uncrypt_file
  11. allow uncrypt cache_file:dir search;
  12. allow uncrypt cache_recovery_file:dir rw_dir_perms;
  13. allow uncrypt cache_recovery_file:file create_file_perms;
  14. # Read OTA zip file at /data/ota_package/.
  15. allow uncrypt ota_package_file:dir r_dir_perms;
  16. allow uncrypt ota_package_file:file r_file_perms;
  17. # Write to /dev/socket/uncrypt
  18. unix_socket_connect(uncrypt, uncrypt, uncrypt)
  19. # Set a property to reboot the device.
  20. set_prop(uncrypt, powerctl_prop)
  21. # Raw writes to block device
  22. allow uncrypt self:global_capability_class_set sys_rawio;
  23. allow uncrypt misc_block_device:blk_file w_file_perms;
  24. allow uncrypt block_device:dir r_dir_perms;
  25. # Access userdata block device.
  26. allow uncrypt userdata_block_device:blk_file w_file_perms;
  27. r_dir_file(uncrypt, rootfs)
  28. # uncrypt reads /proc/cmdline
  29. allow uncrypt proc_cmdline:file r_file_perms;
  30. # Read files in /sys
  31. r_dir_file(uncrypt, sysfs_dt_firmware_android)