blob: e2efee45f9772148388f182cd28268d7f6a7c225 [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
14allow recovery system_data_file:file r_file_perms;
15
16# Manage fstab and /adb_keys
17allow recovery rootfs:file create_file_perms;
Steve Kondikaeec0ac2015-11-26 02:19:44 -080018allow recovery rootfs:file link;
Matt Mower2806bc42014-12-19 10:45:10 -060019allow 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
Dan Pasanene33cc1d2014-12-14 10:36:10 -060022allow recovery media_rw_data_file:dir r_dir_perms;
23allow recovery media_rw_data_file:file r_file_perms;
Matt Mower2806bc42014-12-19 10:45:10 -060024allow recovery vfat:dir r_dir_perms;
25allow recovery vfat:file r_file_perms;
26allow recovery sdcard_posix:dir r_dir_perms;
27allow recovery sdcard_posix:file r_file_perms;
Dan Pasanene33cc1d2014-12-14 10:36:10 -060028
Steve Kondik06ec5852014-12-01 10:38:25 -080029# Control properties
30allow recovery recovery_prop:property_service set;
31
Ricardo Cerqueirac738cc22015-01-03 04:23:08 +000032# recursive rm for wipes... :(
33allow recovery file_type:dir { rw_dir_perms rmdir };
34allow recovery file_type:notdevfile_class_set { unlink getattr };
35# wipe saves and restores the layout version
36allow recovery install_data_file:file create_file_perms;
Tom Marshallb4bf9502015-03-09 15:08:27 -070037allow recovery system_data_file:file create_file_perms;
Ricardo Cerqueirac738cc22015-01-03 04:23:08 +000038
Ricardo Cerqueirac75446d2015-02-05 22:33:47 +000039# /cache/recovery things: command and logs
40allow recovery recovery_cache_file:dir create_dir_perms;
41allow recovery recovery_cache_file:file create_file_perms;
42
Steve Kondik74891fa2015-08-05 17:54:33 -070043# set system properties for various things
44allow recovery system_prop:property_service set;
Steve Kondik06ec5852014-12-01 10:38:25 -080045')