Move camera's coredomain sepolicy to product

Because they are installed to product partition and it's Treble
violation to assign them with vendor sepolicy

Bug: 296512192
Test: lunch panther and build
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:85f9b1e5bc9320a4ab8dc3f6d26027dba76882c6)
Merged-In: I2d2c2a8027eed2b3e2ee1a78d629d44b99867128
Change-Id: I2d2c2a8027eed2b3e2ee1a78d629d44b99867128
This commit is contained in:
Inseob Kim 2023-09-05 13:13:01 +09:00 committed by Cherrypicker Worker
parent 561ef431f3
commit dc624c5311
17 changed files with 30 additions and 34 deletions

View File

@ -1,4 +1,6 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/vendor
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/product/public
PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/product/private
PRODUCT_PACKAGES_DEBUG += dump_camera

View File

@ -0,0 +1,9 @@
typeattribute vendor_pbcs_app coredomain;
app_domain(vendor_pbcs_app);
dontaudit vendor_pbcs_app system_app_data_file:dir *;
allow vendor_pbcs_app app_api_service:service_manager find;
# Allow PBCS to find Camera Service.
allow vendor_pbcs_app cameraserver_service:service_manager find;

View File

@ -0,0 +1,12 @@
typeattribute vendor_pcs_app coredomain;
app_domain(vendor_pcs_app);
allow vendor_pcs_app {
app_api_service
audioserver_service
cameraserver_service
mediametrics_service
mediaserver_service
radio_service
}:service_manager find;

View File

@ -0,0 +1 @@
type vendor_pbcs_app, domain;

View File

@ -0,0 +1 @@
type vendor_pcs_app, domain;

View File

@ -1,16 +1,3 @@
type vendor_pbcs_app, domain, coredomain;
# TODO(b/296512192): move vendor_pbcs_app out of vendor sepolicy
typeattribute vendor_pbcs_app vendor_seapp_assigns_coredomain_violators;
app_domain(vendor_pbcs_app);
dontaudit vendor_pbcs_app system_app_data_file:dir *;
allow vendor_pbcs_app app_api_service:service_manager find;
# Allow PBCS to find Camera Service.
allow vendor_pbcs_app cameraserver_service:service_manager find;
# Allow PBCS to add the ServiceBinder service to ServiceManager.
add_service(vendor_pbcs_app, vendor_camera_binder_service);
# Allow PBCS to add the LyricConfigProvider service to ServiceManager.
@ -18,8 +5,8 @@ add_service(vendor_pbcs_app, vendor_camera_lyricconfigprovider_service);
# Allow PBCS to add the CameraIdRemapper service to ServiceManager.
add_service(vendor_pbcs_app, vendor_camera_cameraidremapper_service);
binder_call(vendor_pbcs_app, hal_camera_default);
# Allow PBCS to read debug system properties of the form vendor.camera.pbcs.debug.*
# and persist.vendor.camera.pbcs.debug.*
get_prop(vendor_pbcs_app, vendor_camera_pbcs_debug_prop);
binder_call(vendor_pbcs_app, hal_camera_default);

View File

@ -1,19 +1,3 @@
type vendor_pcs_app, domain, coredomain;
# TODO(b/296512192): move vendor_pcs_app out of vendor sepolicy
typeattribute vendor_pcs_app vendor_seapp_assigns_coredomain_violators;
app_domain(vendor_pcs_app);
allow vendor_pcs_app {
app_api_service
audioserver_service
cameraserver_service
mediametrics_service
mediaserver_service
radio_service
}:service_manager find;
# Allow PCS to find the LyricConfigProvider service through ServiceManager.
allow vendor_pcs_app vendor_camera_lyricconfigprovider_service:service_manager find;
# Allow PCS to find the CameraIdRemapper service through ServiceManager.
@ -21,6 +5,6 @@ allow vendor_pcs_app vendor_camera_cameraidremapper_service:service_manager find
allow vendor_pcs_app hal_pixel_remote_camera_service:service_manager add;
binder_call(vendor_pcs_app, hal_camera_default);
binder_call(vendor_pcs_app, hal_pixel_remote_camera_service);
binder_call(vendor_pcs_app, hal_camera_default);