Add rules for hidl_lazy_test*

eng/userdebug rules added for integration testing of hidl_lazy_test,
similar to aidl_lazy_test.

This is required in sepolicy since the test requires defining a service
in an init.rc file, and so there needs to be sepolicy for init to start
this service.

Bug: 148114689
Test: hidl_lazy_test
Change-Id: Id6549cbb89b62d3f6de1ae2690ce95c3e8656f66
(cherry picked from commit e4f0ccf29c)
Merged-In: Id6549cbb89b62d3f6de1ae2690ce95c3e8656f66
This commit is contained in:
Steven Moreland 2020-03-24 15:35:17 -07:00
parent 85f81e8706
commit eeaef8ace2
6 changed files with 15 additions and 0 deletions

1
private/attributes Normal file
View file

@ -0,0 +1 @@
hal_attribute(lazy_test);

View file

@ -449,6 +449,7 @@
/(system_ext|system/system_ext)/etc/selinux/system_ext_mac_permissions\.xml u:object_r:mac_perms_file:s0 /(system_ext|system/system_ext)/etc/selinux/system_ext_mac_permissions\.xml u:object_r:mac_perms_file:s0
/(system_ext|system/system_ext)/bin/aidl_lazy_test_server u:object_r:aidl_lazy_test_server_exec:s0 /(system_ext|system/system_ext)/bin/aidl_lazy_test_server u:object_r:aidl_lazy_test_server_exec:s0
/(system_ext|system/system_ext)/bin/hidl_lazy_test_server u:object_r:hidl_lazy_test_server_exec:s0
############################# #############################
# Vendor files from /(product|system/product)/vendor_overlay # Vendor files from /(product|system/product)/vendor_overlay

3
private/hal_lazy_test.te Normal file
View file

@ -0,0 +1,3 @@
userdebug_or_eng(`
hal_attribute_hwservice(hal_lazy_test, hal_lazy_test_hwservice)
')

View file

@ -0,0 +1,8 @@
type hidl_lazy_test_server, domain;
type hidl_lazy_test_server_exec, exec_type, file_type, system_file_type;
userdebug_or_eng(`
typeattribute hidl_lazy_test_server coredomain;
init_daemon_domain(hidl_lazy_test_server)
hal_server_domain(hidl_lazy_test_server, hal_lazy_test)
')

1
private/hwservice.te Normal file
View file

@ -0,0 +1 @@
type hal_lazy_test_hwservice, hwservice_manager_type, protected_hwservice;

View file

@ -40,6 +40,7 @@ android.hardware.health.storage::IStorage u:object_r:hal_h
android.hardware.input.classifier::IInputClassifier u:object_r:hal_input_classifier_hwservice:s0 android.hardware.input.classifier::IInputClassifier u:object_r:hal_input_classifier_hwservice:s0
android.hardware.ir::IConsumerIr u:object_r:hal_ir_hwservice:s0 android.hardware.ir::IConsumerIr u:object_r:hal_ir_hwservice:s0
android.hardware.keymaster::IKeymasterDevice u:object_r:hal_keymaster_hwservice:s0 android.hardware.keymaster::IKeymasterDevice u:object_r:hal_keymaster_hwservice:s0
android.hardware.tests.lazy::ILazy u:object_r:hal_lazy_test_hwservice:s0
android.hardware.light::ILight u:object_r:hal_light_hwservice:s0 android.hardware.light::ILight u:object_r:hal_light_hwservice:s0
android.hardware.lowpan::ILowpanDevice u:object_r:hal_lowpan_hwservice:s0 android.hardware.lowpan::ILowpanDevice u:object_r:hal_lowpan_hwservice:s0
android.hardware.media.omx::IOmx u:object_r:hal_omx_hwservice:s0 android.hardware.media.omx::IOmx u:object_r:hal_omx_hwservice:s0