From 3bf5c1c76a77de3238727dd80c26aa27631c7346 Mon Sep 17 00:00:00 2001 From: bengris32 Date: Wed, 17 Jul 2024 08:07:12 +0800 Subject: [PATCH] LG8n: Use enable instead of start for Neural Networks service * The MTK Neural Networks service is started via a property trigger. This HAL starts a lot earlier than other HALs since it is started with start instead of enable, the difference between them being that start will immediately cause the service to try and start, while enable effectively removes the disabled attribute from the service (so in the case of a HAL, it will be started with all the other services in class hal instead of immediately). * This initially didn't have any side effects until I noticed the Neural Networks service constantly crashing in offline charger mode. To fix this, simply convert the start command to an enable to ensure that this service is not only started at the right time (in class hal), but also only started when needed (and not in offline charger mode). Change-Id: Iacf310fb2211117aaf028ad6bf0814a7d447cf53 Signed-off-by: bengris32 Signed-off-by: Shirayuki39 --- extract-files.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extract-files.sh b/extract-files.sh index 749b426..9534c7f 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -81,6 +81,9 @@ function blob_fixup { vendor/bin/hw/android.hardware.media.c2@1.2-mediatek-64b) "${PATCHELF}" --replace-needed "libavservices_minijail_vendor.so" "libavservices_minijail.so" "${2}" ;; + vendor/etc/init/android.hardware.neuralnetworks-shim-service-mtk.rc) + sed -i 's/start/enable/' "$2" + ;; vendor/lib*/hw/mt6789/vendor.mediatek.hardware.pq@2.15-impl.so) "$PATCHELF" --replace-needed "libutils.so" "libutils-v32.so" "$2" ;;