Revert "utils: bdaddr: skip setting bdaddr for 5.4 kernel version" am: 7ae5b14d5d am: 815359d58c

Original change: https://android-review.googlesource.com/c/device/linaro/dragonboard/+/2923814

Change-Id: Icd1d4459bf73fb3a9cd46f14abf4c54f0ff323e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/sepolicy/set_bdaddr.te b/sepolicy/set_bdaddr.te
index 1540d47..c7fa166 100644
--- a/sepolicy/set_bdaddr.te
+++ b/sepolicy/set_bdaddr.te
@@ -4,7 +4,6 @@
 
 # audit2allow
 allow set_bdaddr proc_cmdline:file { open read };
-allow set_bdaddr proc_version:file { open read getattr };
 allow set_bdaddr proc_bootconfig:file { open read };
 allow set_bdaddr rootfs:dir { open read };
 allow set_bdaddr self:bluetooth_socket { bind create read write };
diff --git a/shared/utils/bdaddr/set_bdaddr.sh b/shared/utils/bdaddr/set_bdaddr.sh
index 2e4ff48..e59fa39 100644
--- a/shared/utils/bdaddr/set_bdaddr.sh
+++ b/shared/utils/bdaddr/set_bdaddr.sh
@@ -26,19 +26,6 @@
 # Format the output in xx:xx:xx:xx:xx:xx format for the
 # "bdaddr" command to work.
 
-if /vendor/bin/grep -o 'Linux version 5.4.' /proc/version; then
-    # for 5.4 kernels, setting the bdaddr would cause
-    # bluetooth::StackManager::StartUp crash like reported here:
-    #     https://issuetracker.google.com/issues/318404233
-    # so skipping it here.
-    # It's possible to not integrate this script at building time,
-    # but that way would make 5.4 and other kernel versions use different
-    # super.img files, for development convenience doing the check
-    # at runtime here, so that only boot.img/vendor_boot.img are
-    # necessary for different versions
-    exit 0
-fi
-
 BTADDR=`/vendor/bin/cat /proc/cmdline | /vendor/bin/grep -o serialno.* |\
 	/vendor/bin/cut -f2 -d'=' | /vendor/bin/awk '{printf("c0%010s\n", $1)}' |\
 	/vendor/bin/sed 's/\(..\)/\1:/g' | /vendor/bin/sed '$s/:$//'`