From 5dc6a4573af389de9bdcfede77ce291b80c06922 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 17 Jul 2019 20:11:18 +0200 Subject: [PATCH] Add bluetooth in the list of features to check HIDL manifest for, to trigger packagemange feature --- base.mk | 4 +++- rw-system.sh | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base.mk b/base.mk index 3fc54cd..ff54e1a 100644 --- a/base.mk +++ b/base.mk @@ -2,7 +2,9 @@ #TODO: Proper detection PRODUCT_COPY_FILES := \ frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml \ - frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml + frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ + frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ #Use a more decent APN config PRODUCT_COPY_FILES += \ diff --git a/rw-system.sh b/rw-system.sh index 7a139ab..3c7c05e 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -134,6 +134,11 @@ if ! grep android.hardware.biometrics.fingerprint /vendor/manifest.xml && ! grep mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml fi +if ! grep android.hardware.bluetooth /vendor/manifest.xml && ! grep android.hardware.bluetooth /vendor/etc/vintf/manifest.xml; then + mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth.xml + mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth_le.xml +fi + if getprop ro.hardware | grep -qF qcom && [ -f /sys/class/backlight/panel0-backlight/max_brightness ] && grep -qvE '^255$' /sys/class/backlight/panel0-backlight/max_brightness; then setprop persist.sys.qcom-brightness "$(cat /sys/class/backlight/panel0-backlight/max_brightness)"