Allow authfs_service to add itself to service manager

Fixes: 196018177
Test: atest MicrodroidHostTestCases
Change-Id: Ib47b8bf5d5d683e7f163e8f69d8a06ffe8f2675b
diff --git a/microdroid/system/private/authfs_service.te b/microdroid/system/private/authfs_service.te
index 8461f3c..c3d356e 100644
--- a/microdroid/system/private/authfs_service.te
+++ b/microdroid/system/private/authfs_service.te
@@ -11,6 +11,7 @@
 
 # Allow running as a binder service.
 binder_call(authfs_service, servicemanager)
+add_service(authfs_service, authfs_binder_service)
 
 # Allow domain transition into authfs.
 domain_auto_trans(authfs_service, authfs_exec, authfs)
diff --git a/microdroid/system/private/service_contexts b/microdroid/system/private/service_contexts
index 24cc446..3489055 100644
--- a/microdroid/system/private/service_contexts
+++ b/microdroid/system/private/service_contexts
@@ -15,5 +15,6 @@
 android.security.metrics                  u:object_r:keystore_metrics_service:s0
 android.security.remoteprovisioning       u:object_r:remoteprovisioning_service:s0
 apexservice                               u:object_r:apex_service:s0
+authfs_service                            u:object_r:authfs_binder_service:s0
 manager                                   u:object_r:service_manager_service:s0
 *                                         u:object_r:default_android_service:s0
diff --git a/microdroid/system/public/type.te b/microdroid/system/public/type.te
index bd27d59..0ee9f89 100644
--- a/microdroid/system/public/type.te
+++ b/microdroid/system/public/type.te
@@ -1,6 +1,7 @@
 # Miscellaneous types
 type adb_service, system_server_service, system_api_service, service_manager_type;
 type apex_service, service_manager_type;
+type authfs_binder_service, service_manager_type;
 type authorization_service, service_manager_type;
 type credstore_service, app_api_service, service_manager_type;
 type default_android_hwservice, hwservice_manager_type, protected_hwservice;