utils: bdaddr: Add service to set Bluetooth device (MAC) address
The Bluetooth chip does not come with a unique Bluetooth device (MAC)
address configured out of the box. This means that we manually need
to configure the device address.
Otherwise BT will stop working from v6.5 kernel version onwards.
Reference: https://bugs.linaro.org/show_bug.cgi?id=5998
Link: https://github.com/me176c-dev/android_device_asus_K013/commit/cbb7066
[AmitP: Kanged the service from above link, updated the commit
message, built an rc and shell script around this service,
and added SELinux policies.]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I79a364917e0a4d879e4319b45b4c0f7cc7df83d3
diff --git a/rb5/device.mk b/rb5/device.mk
index 5aed224..656b7aa 100644
--- a/rb5/device.mk
+++ b/rb5/device.mk
@@ -33,6 +33,13 @@
android.hardware.boot@1.2-impl.recovery \
android.hardware.boot@1.2-service
+# Set BT address
+PRODUCT_PACKAGES += bdaddr
+
+# Install bdaddr script
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/shared/utils/bdaddr/set_bdaddr.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_bdaddr.sh
+
# Install scripts to set vendor.* properties
PRODUCT_COPY_FILES += \
device/linaro/dragonboard/shared/utils/set_hw.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_hw.sh