blob: 708d9b6285f4284ab4890ec4f27282f44eed5c34 [file] [log] [blame]
Steve Kondik06ec5852014-12-01 10:38:25 -08001recovery_only(`
2
Tom Marshall39a42442014-11-26 13:26:14 -08003# Secure adb (setup_adbd)
4allow adbd adb_keys_file:dir search;
Steve Kondik06ec5852014-12-01 10:38:25 -08005allow recovery adb_keys_file:dir r_dir_perms;
Tom Marshall39a42442014-11-26 13:26:14 -08006allow recovery adb_keys_file:file r_file_perms;
7allow recovery shell_prop:property_service set;
8
9# Recovery dialogs
10unix_socket_connect(recovery, vold, vold)
11allow recovery tmpfs:sock_file create_file_perms;
Steve Kondik06ec5852014-12-01 10:38:25 -080012
13# Read packages.xml
Steve Kondik5b98d782016-08-26 03:28:00 -070014#allow recovery system_data_file:file r_file_perms;
Steve Kondik06ec5852014-12-01 10:38:25 -080015
16# Manage fstab and /adb_keys
Steve Kondik5b98d782016-08-26 03:28:00 -070017#allow recovery rootfs:file create_file_perms;
18#allow recovery rootfs:file link;
19#allow recovery rootfs:dir { write create rmdir add_name remove_name };
Steve Kondik06ec5852014-12-01 10:38:25 -080020
Matt Mower2806bc42014-12-19 10:45:10 -060021# Read storage files and directories
Pat Erleyda1a9002016-04-19 11:34:09 -070022allow recovery tmpfs:dir mounton;
Dan Pasanene33cc1d2014-12-14 10:36:10 -060023allow recovery media_rw_data_file:dir r_dir_perms;
24allow recovery media_rw_data_file:file r_file_perms;
Matt Mower2806bc42014-12-19 10:45:10 -060025allow recovery vfat:dir r_dir_perms;
26allow recovery vfat:file r_file_perms;
Steve Kondikaa38b562016-08-26 02:31:15 -070027allow recovery sdcard_type:dir r_dir_perms;
28allow recovery sdcard_type:file r_file_perms;
Dan Pasanene33cc1d2014-12-14 10:36:10 -060029
Steve Kondik06ec5852014-12-01 10:38:25 -080030# Control properties
31allow recovery recovery_prop:property_service set;
32
AdrianDC36cb29d2016-02-08 19:12:58 +010033# Set property sys.usb.ffs.ready
34allow recovery ffs_prop:property_service set;
35
Ricardo Cerqueirac738cc22015-01-03 04:23:08 +000036# recursive rm for wipes... :(
Steve Kondik5b98d782016-08-26 03:28:00 -070037#allow app_data_file self:filesystem associate;
38#allow recovery app_data_file:file { read open create write };
39#allow recovery app_data_file:filesystem { relabelto relabelfrom mount unmount };
Pat Erleydb4fb0e2016-01-12 17:46:52 -080040
Steve Kondik5b98d782016-08-26 03:28:00 -070041#allow recovery file_type:dir { rw_dir_perms rmdir };
42#allow recovery file_type:notdevfile_class_set { unlink getattr };
Ricardo Cerqueirac738cc22015-01-03 04:23:08 +000043# wipe saves and restores the layout version
Steve Kondik5b98d782016-08-26 03:28:00 -070044#allow recovery install_data_file:file create_file_perms;
45#allow recovery system_data_file:file create_file_perms;
Ricardo Cerqueirac738cc22015-01-03 04:23:08 +000046
Ricardo Cerqueirac75446d2015-02-05 22:33:47 +000047# /cache/recovery things: command and logs
Steve Kondik5b98d782016-08-26 03:28:00 -070048allow recovery cache_recovery_file:dir create_dir_perms;
49allow recovery cache_recovery_file:file create_file_perms;
Ricardo Cerqueirac75446d2015-02-05 22:33:47 +000050
Steve Kondik74891fa2015-08-05 17:54:33 -070051# set system properties for various things
52allow recovery system_prop:property_service set;
Steve Kondik06ec5852014-12-01 10:38:25 -080053')