From 1019870fba7f89742f91b5b42e60ba46a36a5fa6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 16 Sep 2019 18:43:21 +0200 Subject: [PATCH] Mark mediacodec_2{6,7,8} as hal_omx_server The commit 7baf725ea6 broke OMX on O/O-MR1(/P?) vendors. Previous to this commit, all OMX codecs had to use "mediacodec" type, after this commit, omx codecs just had to get hal_omx_server attribute. This commit left to the vendor the charge of adding "hal_omx_server" attribute to mediacodec. However this can't work on non-Q vendors. On P vendor, versioned_plat_pub contains the appdomain <=> mediacodec allows, so OMX isn't technically broken on those devices. But to ensure it won't break in the future, mark 28's mediacodec as hal_omx_server as well This fixes broken OMX decoding on O/O-MR1 vendors, failing with the following denial: avc: denied { call } for comm=4E444B204D65646961436F6465635F scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:mediacodec:s0 tclass=binder permissive=0 Bug: 141186440 Change-Id: I018f8d9aabc77e7ea86ca14734b1ab2edfdf8ed1 --- prebuilts/api/29.0/private/compat/26.0/26.0.cil | 1 + prebuilts/api/29.0/private/compat/27.0/27.0.cil | 1 + prebuilts/api/29.0/private/compat/28.0/28.0.cil | 1 + private/compat/26.0/26.0.cil | 1 + private/compat/27.0/27.0.cil | 1 + private/compat/28.0/28.0.cil | 1 + 6 files changed, 6 insertions(+) diff --git a/prebuilts/api/29.0/private/compat/26.0/26.0.cil b/prebuilts/api/29.0/private/compat/26.0/26.0.cil index 3b3dae1c6..60f42b9c4 100644 --- a/prebuilts/api/29.0/private/compat/26.0/26.0.cil +++ b/prebuilts/api/29.0/private/compat/26.0/26.0.cil @@ -336,6 +336,7 @@ (typeattributeset mdnsd_socket_26_0 (mdnsd_socket)) (typeattributeset mdns_socket_26_0 (mdns_socket)) (typeattributeset mediacasserver_service_26_0 (mediacasserver_service)) +(typeattributeset hal_omx_server (mediacodec_26_0)) (typeattributeset mediacodec_26_0 (mediacodec)) (typeattributeset mediacodec_exec_26_0 (mediacodec_exec)) (typeattributeset mediacodec_service_26_0 (mediacodec_service)) diff --git a/prebuilts/api/29.0/private/compat/27.0/27.0.cil b/prebuilts/api/29.0/private/compat/27.0/27.0.cil index 365d791a7..8c8f82fc8 100644 --- a/prebuilts/api/29.0/private/compat/27.0/27.0.cil +++ b/prebuilts/api/29.0/private/compat/27.0/27.0.cil @@ -1047,6 +1047,7 @@ (typeattributeset mdnsd_27_0 (mdnsd)) (typeattributeset mdnsd_socket_27_0 (mdnsd_socket)) (typeattributeset mdns_socket_27_0 (mdns_socket)) +(typeattributeset hal_omx_server (mediacodec_27_0)) (typeattributeset mediacodec_27_0 (mediacodec)) (typeattributeset mediacodec_exec_27_0 (mediacodec_exec)) (typeattributeset mediacodec_service_27_0 (mediacodec_service)) diff --git a/prebuilts/api/29.0/private/compat/28.0/28.0.cil b/prebuilts/api/29.0/private/compat/28.0/28.0.cil index 305cb3acb..338cbd027 100644 --- a/prebuilts/api/29.0/private/compat/28.0/28.0.cil +++ b/prebuilts/api/29.0/private/compat/28.0/28.0.cil @@ -1242,6 +1242,7 @@ (typeattributeset mdnsd_28_0 (mdnsd)) (typeattributeset mdnsd_socket_28_0 (mdnsd_socket)) (typeattributeset mdns_socket_28_0 (mdns_socket)) +(typeattributeset hal_omx_server (mediacodec_28_0)) (typeattributeset mediacodec_28_0 (mediacodec)) (typeattributeset mediacodec_exec_28_0 (mediacodec_exec)) (typeattributeset mediacodec_service_28_0 (mediacodec_service)) diff --git a/private/compat/26.0/26.0.cil b/private/compat/26.0/26.0.cil index 2d1a612ae..1cdde2bc5 100644 --- a/private/compat/26.0/26.0.cil +++ b/private/compat/26.0/26.0.cil @@ -336,6 +336,7 @@ (typeattributeset mdnsd_socket_26_0 (mdnsd_socket)) (typeattributeset mdns_socket_26_0 (mdns_socket)) (typeattributeset mediacasserver_service_26_0 (mediacasserver_service)) +(typeattributeset hal_omx_server (mediacodec_26_0)) (typeattributeset mediacodec_26_0 (mediacodec)) (typeattributeset mediacodec_exec_26_0 (mediacodec_exec)) (typeattributeset mediacodec_service_26_0 (mediacodec_service)) diff --git a/private/compat/27.0/27.0.cil b/private/compat/27.0/27.0.cil index 4b4d87b0c..0996e972a 100644 --- a/private/compat/27.0/27.0.cil +++ b/private/compat/27.0/27.0.cil @@ -1044,6 +1044,7 @@ (typeattributeset mdnsd_27_0 (mdnsd)) (typeattributeset mdnsd_socket_27_0 (mdnsd_socket)) (typeattributeset mdns_socket_27_0 (mdns_socket)) +(typeattributeset hal_omx_server (mediacodec_27_0)) (typeattributeset mediacodec_27_0 (mediacodec)) (typeattributeset mediacodec_exec_27_0 (mediacodec_exec)) (typeattributeset mediacodec_service_27_0 (mediacodec_service)) diff --git a/private/compat/28.0/28.0.cil b/private/compat/28.0/28.0.cil index d51909d08..0de0ad570 100644 --- a/private/compat/28.0/28.0.cil +++ b/private/compat/28.0/28.0.cil @@ -1238,6 +1238,7 @@ (typeattributeset mdnsd_28_0 (mdnsd)) (typeattributeset mdnsd_socket_28_0 (mdnsd_socket)) (typeattributeset mdns_socket_28_0 (mdns_socket)) +(typeattributeset hal_omx_server (mediacodec_28_0)) (typeattributeset mediacodec_28_0 (mediacodec)) (typeattributeset mediacodec_exec_28_0 (mediacodec_exec)) (typeattributeset mediacodec_service_28_0 (mediacodec_service))