From 93bf9b613b2bc5a6852370fb98138dd509484065 Mon Sep 17 00:00:00 2001 From: Yu-Chi Cheng Date: Mon, 29 Mar 2021 23:00:01 -0700 Subject: [PATCH] Labelled EdgeTPU service libraries as SP-HAL. The EdgeTPU service libraries (libedgetpu_client.google.so and com.google.edgetpu-V1-ndk.so) provide both the system_ext and vendor variants. Since these need to be linked by pre-built applications from /product/, this change labelled them as the same_process_hal_file in order to allow the applications to link with the vendor variant. Bug: 184008444 Test: tested on local Oriole with GCA. Change-Id: I8c510f51ccc1a76d14978962d72fd91f15bf7a90 --- whitechapel/vendor/google/file_contexts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/whitechapel/vendor/google/file_contexts b/whitechapel/vendor/google/file_contexts index 6edb5ce0..79e224dc 100644 --- a/whitechapel/vendor/google/file_contexts +++ b/whitechapel/vendor/google/file_contexts @@ -347,14 +347,22 @@ # EdgeTPU device (DarwiNN) /dev/abrolhos u:object_r:edgetpu_device:s0 + +# EdgeTPU logging service /vendor/bin/hw/android\.hardware\.edgetpu\.logging@service-edgetpu-logging u:object_r:edgetpu_logging_exec:s0 + +# EdgeTPU service binary and libraries /system_ext/bin/hw/vendor\.google\.edgetpu@1\.0-service u:object_r:edgetpu_server_exec:s0 +/vendor/lib64/com\.google\.edgetpu-V1-ndk_platform\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/libedgetpu_client\.google\.so u:object_r:same_process_hal_file:s0 + +# EdgeTPU runtime libraries /vendor/lib64/libedgetpu_darwinn2\.so u:object_r:same_process_hal_file:s0 /vendor/lib64/libedgetpu_util\.so u:object_r:same_process_hal_file:s0 -/data/vendor/hal_neuralnetworks_darwinn(/.*)? u:object_r:hal_neuralnetworks_darwinn_data_file:s0 -# EdgeTPU data file +# EdgeTPU data files /data/edgetpu(/.*)? u:object_r:edgetpu_service_data_file:s0 +/data/vendor/hal_neuralnetworks_darwinn(/.*)? u:object_r:hal_neuralnetworks_darwinn_data_file:s0 # Tetheroffload Service /dev/dit2 u:object_r:vendor_toe_device:s0