-
Notifications
You must be signed in to change notification settings - Fork 9
/
interfacer.te
69 lines (54 loc) · 2.34 KB
/
interfacer.te
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Theme Interfacer needs additional permissions when not running with system_server
# projekt.interfacer.
#
#
type interfacer, domain;
# Add Theme Interfacer to domains
net_domain(interfacer)
app_domain(interfacer)
binder_service(interfacer)
# Modify system dalvik-cache
allow interfacer dalvikcache_data_file:dir r_dir_perms;
allow interfacer dalvikcache_data_file:file rw_file_perms;
# Read and write /data/data subdirectory.
allow interfacer system_app_data_file:dir create_dir_perms;
allow interfacer system_app_data_file:{ file lnk_file } create_file_perms;
# /data/resource-cache
r_dir_file(interfacer, resourcecache_data_file)
# Read wallpaper file.
allow interfacer wallpaper_file:file r_file_perms;
# Read icon file.
allow interfacer icon_file:file r_file_perms;
# Set bootanimation
allow interfacer bootanim:process { getsched setsched };
# Backup of wallpaper imagery uses temporary hard links to avoid data churn
allow interfacer { system_data_file wallpaper_file }:file link;
# Manage ringtones.
allow interfacer ringtone_file:dir { create_dir_perms relabelto };
allow interfacer ringtone_file:file create_file_perms;
# System file accesses.
allow interfacer kernel:system module_request;
allow interfacer system_data_file:dir create_dir_perms;
allow interfacer system_data_file:file create_file_perms;
allow interfacer system_file:dir { r_dir_perms rmdir };
# Allow handling of theme assets
allow interfacer theme_data_file:dir create_dir_perms;
allow interfacer theme_data_file:file create_file_perms;
# Modify system properties
set_prop(interfacer, theme_prop)
# Edit files in /sdcard
allow interfacer media_rw_data_file:dir rw_dir_perms;
allow interfacer media_rw_data_file:file rw_file_perms;
# Services
allow interfacer activity_service:service_manager find;
allow interfacer connectivity_service:service_manager find;
allow interfacer content_service:service_manager find;
allow interfacer display_service:service_manager find;
allow interfacer mount_service:service_manager find;
allow interfacer network_management_service:service_manager find;
allow interfacer overlay_service:service_manager find;
# Allow file and type transition for contexts
type_transition interfacer system_data_file:file theme_data_file "theme";
type_transition interfacer system_data_file:dir theme_data_file;
file_type_auto_trans(interfacer, system_data_file, theme_data_file);