2014-12-01 18:38:25 +00:00
|
|
|
recovery_only(`
|
|
|
|
|
2014-11-26 21:26:14 +00:00
|
|
|
# Secure adb (setup_adbd)
|
|
|
|
allow adbd adb_keys_file:dir search;
|
2014-12-01 18:38:25 +00:00
|
|
|
allow recovery adb_keys_file:dir r_dir_perms;
|
2014-11-26 21:26:14 +00:00
|
|
|
allow recovery adb_keys_file:file r_file_perms;
|
|
|
|
allow recovery shell_prop:property_service set;
|
|
|
|
|
|
|
|
# Recovery dialogs
|
|
|
|
unix_socket_connect(recovery, vold, vold)
|
|
|
|
allow recovery tmpfs:sock_file create_file_perms;
|
2014-12-01 18:38:25 +00:00
|
|
|
|
|
|
|
# Read packages.xml
|
|
|
|
allow recovery system_data_file:file r_file_perms;
|
|
|
|
|
|
|
|
# Manage fstab and /adb_keys
|
|
|
|
allow recovery rootfs:file create_file_perms;
|
2015-11-26 10:19:44 +00:00
|
|
|
allow recovery rootfs:file link;
|
2014-12-19 16:45:10 +00:00
|
|
|
allow recovery rootfs:dir { write create rmdir add_name remove_name };
|
2014-12-01 18:38:25 +00:00
|
|
|
|
2014-12-19 16:45:10 +00:00
|
|
|
# Read storage files and directories
|
2016-04-19 18:34:09 +00:00
|
|
|
allow recovery tmpfs:dir mounton;
|
2014-12-14 16:36:10 +00:00
|
|
|
allow recovery media_rw_data_file:dir r_dir_perms;
|
|
|
|
allow recovery media_rw_data_file:file r_file_perms;
|
2014-12-19 16:45:10 +00:00
|
|
|
allow recovery vfat:dir r_dir_perms;
|
|
|
|
allow recovery vfat:file r_file_perms;
|
|
|
|
allow recovery sdcard_posix:dir r_dir_perms;
|
|
|
|
allow recovery sdcard_posix:file r_file_perms;
|
2014-12-14 16:36:10 +00:00
|
|
|
|
2014-12-01 18:38:25 +00:00
|
|
|
# Control properties
|
|
|
|
allow recovery recovery_prop:property_service set;
|
|
|
|
|
2016-02-08 18:12:58 +00:00
|
|
|
# Set property sys.usb.ffs.ready
|
|
|
|
allow recovery ffs_prop:property_service set;
|
|
|
|
|
2015-01-03 04:23:08 +00:00
|
|
|
# recursive rm for wipes... :(
|
2016-01-13 01:46:52 +00:00
|
|
|
allow app_data_file self:filesystem associate;
|
|
|
|
allow recovery app_data_file:file { read open create write };
|
|
|
|
allow recovery app_data_file:filesystem { relabelto relabelfrom mount unmount };
|
|
|
|
|
2015-01-03 04:23:08 +00:00
|
|
|
allow recovery file_type:dir { rw_dir_perms rmdir };
|
|
|
|
allow recovery file_type:notdevfile_class_set { unlink getattr };
|
|
|
|
# wipe saves and restores the layout version
|
|
|
|
allow recovery install_data_file:file create_file_perms;
|
2015-03-09 22:08:27 +00:00
|
|
|
allow recovery system_data_file:file create_file_perms;
|
2015-01-03 04:23:08 +00:00
|
|
|
|
2015-02-05 22:33:47 +00:00
|
|
|
# /cache/recovery things: command and logs
|
|
|
|
allow recovery recovery_cache_file:dir create_dir_perms;
|
|
|
|
allow recovery recovery_cache_file:file create_file_perms;
|
|
|
|
|
2015-08-06 00:54:33 +00:00
|
|
|
# set system properties for various things
|
|
|
|
allow recovery system_prop:property_service set;
|
2014-12-01 18:38:25 +00:00
|
|
|
')
|