blob: 2c6d570fe63239c7def1362dc1c3a42a7d1e04bb [file] [log] [blame]
Charles Chen3d4a6b72023-01-17 08:16:44 +00001###
2### isolated_compute_apps.
3###
4### This file defines the rules for isolated apps that requires the permission
5### to gather data with service manager and require computational resources to
6### improve the performance to process data under a sandbox. This
7### isolated_compute_app restricts data egress to protect the privacy.
8###
9### TODO(b/266923392): Clean rules for isolated_compute_app characteristics
10###
11type isolated_compute_app, domain;
12
13typeattribute isolated_compute_app coredomain;
14
15app_domain(isolated_compute_app)
16isolated_app_domain(isolated_compute_app)
17
18allow isolated_compute_app audioserver_service:service_manager find;
19allow isolated_compute_app cameraserver_service:service_manager find;
20allow isolated_compute_app content_capture_service:service_manager find;
21allow isolated_compute_app device_state_service:service_manager find;
22allow isolated_compute_app speech_recognition_service:service_manager find;
23
24# Enable access to hardware services for camera functionalilites
25hal_client_domain(isolated_compute_app, hal_allocator)
26hwbinder_use(isolated_compute_app)
27
28# Write app-specific trace data to the Perfetto traced damon. This requires
29# connecting to its producer socket and obtaining a (per-process) tmpfs fd.
30perfetto_producer(isolated_compute_app)
31
32# Allow profiling if the main app has been marked as profileable or
33# debuggable.
34can_profile_heap(isolated_compute_app)
35can_profile_perf(isolated_compute_app)
36
37#####
38##### Neverallow
39#####
40
41# Do not allow isolated_compute_app to access hardware service except for the
42# ones necessary for camera service.
43# TODO (b/266555480): The permission should be guarded by compliance test.
44# Remove the negation for member domains when refactorization is done.
45# neverallow isolated_compute_app {
46# hwservice_manager_type
47# -hal_graphics_allocator_hwservice
48# -hal_graphics_mapper_hwservice
49# -hidl_allocator_hwservice
50# -hidl_manager_hwservice
51# -hidl_memory_hwservice
52# }:hwservice_manager *;