From fcbd3efa1c8cef31f03117beae721278cb6d8b02 Mon Sep 17 00:00:00 2001 From: Adam Boardman Date: Wed, 6 Jan 2021 15:59:03 +0000 Subject: [PATCH] Adding bind blanking of rogue android services that fail to start and we probably don't need anyway (TrustKernel OS stuff probably for fingerprint sensor) --- lib/systemd/system/bind-vendor.service | 12 ++++++++++++ usr/bin/droid/bind_vendor.sh | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 lib/systemd/system/bind-vendor.service create mode 100644 usr/bin/droid/bind_vendor.sh diff --git a/lib/systemd/system/bind-vendor.service b/lib/systemd/system/bind-vendor.service new file mode 100644 index 0000000..20b418c --- /dev/null +++ b/lib/systemd/system/bind-vendor.service @@ -0,0 +1,12 @@ +[Unit] +Description=Bind mount certain files over /vendor +After=vendor.mount +DefaultDependencies=no + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/bin/sh /usr/bin/droid/bind_vendor.sh + +[Install] +WantedBy=local-fs.target diff --git a/usr/bin/droid/bind_vendor.sh b/usr/bin/droid/bind_vendor.sh new file mode 100644 index 0000000..887f97f --- /dev/null +++ b/usr/bin/droid/bind_vendor.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +#droid-hal-cosmopda-bin had these, uncertain if they are needed with the new LineageOS based generic android rootfs +#mount -o ro,bind /usr/libexec/droid-hybris/vendor/lib64/hw/audio.primary.mt6771.so /vendor/lib64/hw/audio.primary.mt6771.so +#mount -o ro,bind /usr/libexec/droid-hybris/vendor/lib64/libmtk-ril.so /vendor/lib64/libmtk-ril.so + +#disable secure_element and keymaster as tyey always fail +mount -o ro,bind /dev/null /vendor/etc/init/android.hardware.secure_element@1.0-service.rc +mount -o ro,bind /dev/null /vendor/etc/init/android.hardware.keymaster@3.0-service.rc