Add aidl_lazy_test_server

This is a test service for testing dynamic start/stop of AIDL services. In order to test realistic use cases with SELinux enabled, it requires the same permissions as a regular service.

Bug: 147153962
Test: aidl_lazy_test aidl_lazy_test_1 aidl_lazy_test_2
Change-Id: Ifc3b2eaefba9c06c94f9cf24b4474107d4e26563
This commit is contained in:
Jon Spivack 2020-01-03 16:32:07 -08:00
parent 6570d6d3c7
commit ae2df6b5de
6 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,5 @@
userdebug_or_eng(`
typeattribute aidl_lazy_test_server coredomain;
init_daemon_domain(aidl_lazy_test_server)
')

View File

@ -5,6 +5,9 @@
(typeattribute new_objects)
(typeattributeset new_objects
( new_objects
aidl_lazy_test_server
aidl_lazy_test_server_exec
aidl_lazy_test_service
apex_module_data_file
apex_rollback_data_file
app_integrity_service

View File

@ -341,6 +341,7 @@
/system/bin/simpleperf_app_runner u:object_r:simpleperf_app_runner_exec:s0
/system/bin/notify_traceur\.sh u:object_r:notify_traceur_exec:s0
/system/bin/migrate_legacy_obb_data\.sh u:object_r:migrate_legacy_obb_data_exec:s0
/system/bin/aidl_lazy_test_server u:object_r:aidl_lazy_test_server_exec:s0
#############################
# Vendor files

View File

@ -6,6 +6,8 @@ account u:object_r:account_service:s0
activity u:object_r:activity_service:s0
activity_task u:object_r:activity_task_service:s0
adb u:object_r:adb_service:s0
aidl_lazy_test_1 u:object_r:aidl_lazy_test_service:s0
aidl_lazy_test_2 u:object_r:aidl_lazy_test_service:s0
alarm u:object_r:alarm_service:s0
android.os.UpdateEngineService u:object_r:update_engine_service:s0
android.security.keystore u:object_r:keystore_service:s0

View File

@ -0,0 +1,9 @@
type aidl_lazy_test_server, domain;
type aidl_lazy_test_server_exec, exec_type, file_type, system_file_type;
userdebug_or_eng(`
binder_use(aidl_lazy_test_server)
binder_call(aidl_lazy_test_server, binderservicedomain)
add_service(aidl_lazy_test_server, aidl_lazy_test_service)
')

View File

@ -1,3 +1,4 @@
type aidl_lazy_test_service, service_manager_type;
type apex_service, service_manager_type;
type audioserver_service, service_manager_type;
type batteryproperties_service, app_api_service, ephemeral_app_api_service, service_manager_type;