diff --git a/device/friendlyelec/nanopi3/aosp_nanopi3.mk b/device/friendlyelec/nanopi3/aosp_nanopi3.mk
index 24b889c4ad5..b92a5b3b57b 100644
--- a/device/friendlyelec/nanopi3/aosp_nanopi3.mk
+++ b/device/friendlyelec/nanopi3/aosp_nanopi3.mk
@@ -24,6 +24,8 @@ PRODUCT_BRAND ?= Android
PRODUCT_MODEL ?= FriendlyELEC RK3588
PRODUCT_MANUFACTURER ?= FriendlyELEC (www.friendlyelec.com)
+include device/friendlyelec/nanopi3/bluetooth.mk
+
# for testing only
ifeq ($(INSTALL_GAPPS_FOR_TESTING), yes)
diff --git a/device/friendlyelec/nanopi3/bluetooth.mk b/device/friendlyelec/nanopi3/bluetooth.mk
new file mode 100644
index 00000000000..ebfa944c640
--- /dev/null
+++ b/device/friendlyelec/nanopi3/bluetooth.mk
@@ -0,0 +1,73 @@
+#
+# Copyright 2014 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Bluetooth HAL
+ifeq ($(TARGET_USE_BTLINUX_HAL_IMPL),true)
+DEVICE_MANIFEST_FILE += device/friendlyelec/nanopi3/manifest_bluetooth.xml
+
+PRODUCT_PACKAGES += \
+ android.hardware.bluetooth@1.0-impl \
+ android.hardware.bluetooth@1.1-service.btlinux
+
+PRODUCT_PACKAGES += \
+ libaptX_encoder \
+ libaptXHD_encoder \
+ libldacBT_enc \
+ libldacBT_abr
+
+PRODUCT_PACKAGES += android.hardware.bluetooth.audio@2.0-impl
+
+# From device/rockchip/common/modules/bluetooth.mk
+PRODUCT_PACKAGES += \
+ libbluetooth_audio_session \
+ libbluetooth_audio_session_aidl \
+ android.hardware.bluetooth.audio-impl \
+ audio.bluetooth.default
+
+PRODUCT_PRODUCT_PROPERTIES += \
+ bluetooth.core.le.inquiry_scan_interval=3000
+
+# Set supported Bluetooth profiles to enabled
+PRODUCT_PRODUCT_PROPERTIES += \
+ bluetooth.profile.asha.central.enabled?=true \
+ bluetooth.profile.a2dp.source.enabled?=true \
+ bluetooth.profile.avrcp.target.enabled?=true \
+ bluetooth.profile.bas.client.enabled?=true \
+ bluetooth.profile.gatt.enabled?=true \
+ bluetooth.profile.hfp.ag.enabled?=true \
+ bluetooth.profile.hid.device.enabled?=true \
+ bluetooth.profile.hid.host.enabled?=true \
+ bluetooth.profile.map.server.enabled?=true \
+ bluetooth.profile.opp.enabled?=true \
+ bluetooth.profile.pan.nap.enabled?=true \
+ bluetooth.profile.pan.panu.enabled?=true \
+ bluetooth.profile.pbap.server.enabled?=true \
+ bluetooth.profile.sap.server.enabled?=true
+
+# Audio policy
+PRODUCT_COPY_FILES += \
+ frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml \
+ frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml
+
+# Feature
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml
+ifeq ($(BOARD_BLUETOOTH_LE_SUPPORT),true)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
+endif
+
+endif
diff --git a/device/friendlyelec/nanopi3/manifest_bluetooth.xml b/device/friendlyelec/nanopi3/manifest_bluetooth.xml
new file mode 100644
index 00000000000..4d70779e0a5
--- /dev/null
+++ b/device/friendlyelec/nanopi3/manifest_bluetooth.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ android.hardware.bluetooth
+ hwbinder
+ 1.1
+
+ IBluetoothHci
+ default
+
+
+
diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index 1951032b309..073bd2d401d 100644
--- a/device/rockchip/common/device.mk
+++ b/device/rockchip/common/device.mk
@@ -200,7 +200,14 @@ PRODUCT_COPY_FILES += \
endif
# Bluetooth
+ifneq ($(TARGET_USE_BTLINUX_HAL_IMPL),true)
+ifeq ($(call math_gt_or_eq,$(ROCKCHIP_LUNCHING_API_LEVEL),34),true)
+DEVICE_MANIFEST_FILE += \
+ device/rockchip/common/manifests/android.hardware.bluetooth@1.0-service.xml
+endif
+
$(call inherit-product, device/rockchip/common/modules/bluetooth.mk)
+endif
ifeq ($(BOARD_WIFI_SUPPORT),true)
PRODUCT_COPY_FILES += \
diff --git a/device/rockchip/common/manifests/android.hardware.bluetooth@1.0-service.xml b/device/rockchip/common/manifests/android.hardware.bluetooth@1.0-service.xml
new file mode 100644
index 00000000000..9b210d25542
--- /dev/null
+++ b/device/rockchip/common/manifests/android.hardware.bluetooth@1.0-service.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ android.hardware.bluetooth
+ hwbinder
+ 1.0
+
+ IBluetoothHci
+ default
+
+
+
diff --git a/device/rockchip/common/manifests/manifest_level_34.xml b/device/rockchip/common/manifests/manifest_level_34.xml
index db306c1dba4..df11f047581 100644
--- a/device/rockchip/common/manifests/manifest_level_34.xml
+++ b/device/rockchip/common/manifests/manifest_level_34.xml
@@ -17,14 +17,5 @@
default
-
- android.hardware.bluetooth
- hwbinder
- 1.0
-
- IBluetoothHci
- default
-
-
diff --git a/device/rockchip/common/wifi_bt_common.mk b/device/rockchip/common/wifi_bt_common.mk
index 4ac2bd4cf67..016e006d4ed 100644
--- a/device/rockchip/common/wifi_bt_common.mk
+++ b/device/rockchip/common/wifi_bt_common.mk
@@ -48,9 +48,9 @@ WIFI_DRIVER_FW_PATH_STA := "/vendor/etc/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_PATH_P2P := "/vendor/etc/firmware/fw_bcm4329_p2p.bin"
WIFI_DRIVER_FW_PATH_AP := "/vendor/etc/firmware/fw_bcm4329_apsta.bin"
BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_BCM := true
-#BOARD_HAVE_BLUETOOTH_RTK := true
-BOARD_HAVE_BLUETOOTH_AIC := true
-BOARD_HAVE_BLUETOOTH_SEEKWAVE := true
+BOARD_HAVE_BLUETOOTH_BCM ?= true
+#BOARD_HAVE_BLUETOOTH_RTK ?= true
+BOARD_HAVE_BLUETOOTH_AIC ?= true
+BOARD_HAVE_BLUETOOTH_SEEKWAVE ?= true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR ?= device/rockchip/$(TARGET_BOARD_PLATFORM)/bluetooth
endif
diff --git a/device/rockchip/rk356x/nanopi5/BoardConfig.mk b/device/rockchip/rk356x/nanopi5/BoardConfig.mk
index 8968704bff1..0e7f5c62f4c 100644
--- a/device/rockchip/rk356x/nanopi5/BoardConfig.mk
+++ b/device/rockchip/rk356x/nanopi5/BoardConfig.mk
@@ -34,6 +34,12 @@ WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
WIFI_DRIVER_FW_PATH_STA := "/dev/null"
WIFI_DRIVER_FW_PATH_AP := "/dev/null"
+BOARD_HAVE_BLUETOOTH_AIC := false
+BOARD_HAVE_BLUETOOTH_BCM := false
+BOARD_HAVE_BLUETOOTH_RTK := false
+TARGET_USE_BTLINUX_HAL_IMPL := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/rk356x/nanopi5/bluetooth
+
# No dtbo.img in boot.img
BOARD_INCLUDE_DTB_IN_BOOTIMG :=
BOARD_PREBUILT_DTBIMAGE_DIR :=
diff --git a/device/rockchip/rk356x/nanopi5/bluetooth/bdroid_buildcfg.h b/device/rockchip/rk356x/nanopi5/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 00000000000..f49240758da
--- /dev/null
+++ b/device/rockchip/rk356x/nanopi5/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME "nanopi5"
+
+#define BTA_DM_COD {0x1A, 0x01, 0x10}
+
+#define BLE_PRIVACY_SPT FALSE
+#define BLE_VND_INCLUDED FALSE
+
+#define BTA_HCI_RESET FALSE
+
+#endif
diff --git a/device/rockchip/rk356x/nanopi5_box/BoardConfig.mk b/device/rockchip/rk356x/nanopi5_box/BoardConfig.mk
index f8db81129a0..290c1fa6e18 100644
--- a/device/rockchip/rk356x/nanopi5_box/BoardConfig.mk
+++ b/device/rockchip/rk356x/nanopi5_box/BoardConfig.mk
@@ -37,6 +37,12 @@ WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
WIFI_DRIVER_FW_PATH_STA := "/dev/null"
WIFI_DRIVER_FW_PATH_AP := "/dev/null"
+BOARD_HAVE_BLUETOOTH_AIC := false
+BOARD_HAVE_BLUETOOTH_BCM := false
+BOARD_HAVE_BLUETOOTH_RTK := false
+TARGET_USE_BTLINUX_HAL_IMPL := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/rk356x/nanopi5/bluetooth
+
# No dtbo.img in boot.img
BOARD_INCLUDE_DTB_IN_BOOTIMG :=
BOARD_PREBUILT_DTBIMAGE_DIR :=
diff --git a/device/rockchip/rk356x/nanopi5_box/manifest.xml b/device/rockchip/rk356x/nanopi5_box/manifest.xml
index 82b8a8b79c4..fdc058f4c1e 100644
--- a/device/rockchip/rk356x/nanopi5_box/manifest.xml
+++ b/device/rockchip/rk356x/nanopi5_box/manifest.xml
@@ -17,15 +17,6 @@
default
-
- android.hardware.bluetooth
- hwbinder
- 1.0
-
- IBluetoothHci
- default
-
-
android.hardware.graphics.composer
hwbinder
diff --git a/device/rockchip/rk3588/nanopi6/BoardConfig.mk b/device/rockchip/rk3588/nanopi6/BoardConfig.mk
index 6d302756b77..c89452ab9d9 100644
--- a/device/rockchip/rk3588/nanopi6/BoardConfig.mk
+++ b/device/rockchip/rk3588/nanopi6/BoardConfig.mk
@@ -35,6 +35,12 @@ WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
WIFI_DRIVER_FW_PATH_STA := "/dev/null"
WIFI_DRIVER_FW_PATH_AP := "/dev/null"
+BOARD_HAVE_BLUETOOTH_AIC := false
+BOARD_HAVE_BLUETOOTH_BCM := false
+BOARD_HAVE_BLUETOOTH_RTK := false
+TARGET_USE_BTLINUX_HAL_IMPL := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/rk3588/nanopi6/bluetooth
+
# No dtbo.img in boot.img
BOARD_INCLUDE_DTB_IN_BOOTIMG :=
BOARD_PREBUILT_DTBIMAGE_DIR :=
diff --git a/device/rockchip/rk3588/nanopi6/bluetooth/bdroid_buildcfg.h b/device/rockchip/rk3588/nanopi6/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 00000000000..5207a0b2eb0
--- /dev/null
+++ b/device/rockchip/rk3588/nanopi6/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME "nanopi6"
+
+#define BTA_DM_COD {0x1A, 0x01, 0x10}
+
+#define BLE_PRIVACY_SPT TRUE
+#define BLE_VND_INCLUDED FALSE
+
+#define BTA_HCI_RESET FALSE
+
+#endif
diff --git a/device/rockchip/rk3588/nanopi6_box/BoardConfig.mk b/device/rockchip/rk3588/nanopi6_box/BoardConfig.mk
index 9470e1c7b95..abf3a3d6142 100644
--- a/device/rockchip/rk3588/nanopi6_box/BoardConfig.mk
+++ b/device/rockchip/rk3588/nanopi6_box/BoardConfig.mk
@@ -37,6 +37,12 @@ WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
WIFI_DRIVER_FW_PATH_STA := "/dev/null"
WIFI_DRIVER_FW_PATH_AP := "/dev/null"
+BOARD_HAVE_BLUETOOTH_AIC := false
+BOARD_HAVE_BLUETOOTH_BCM := false
+BOARD_HAVE_BLUETOOTH_RTK := false
+TARGET_USE_BTLINUX_HAL_IMPL := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/rockchip/rk3588/nanopi6/bluetooth
+
# No dtbo.img in boot.img
BOARD_INCLUDE_DTB_IN_BOOTIMG :=
BOARD_PREBUILT_DTBIMAGE_DIR :=
diff --git a/device/rockchip/rk3588/nanopi6_box/manifest.xml b/device/rockchip/rk3588/nanopi6_box/manifest.xml
index 82b8a8b79c4..fdc058f4c1e 100644
--- a/device/rockchip/rk3588/nanopi6_box/manifest.xml
+++ b/device/rockchip/rk3588/nanopi6_box/manifest.xml
@@ -17,15 +17,6 @@
default
-
- android.hardware.bluetooth
- hwbinder
- 1.0
-
- IBluetoothHci
- default
-
-
android.hardware.graphics.composer
hwbinder