问题
Is there any way to find the connected BT device name using adb shell?
My phone is rooted and I'm building a tasker profile which flashes the BT device name when connected.
回答1:
You want to know your Bluetooth profile name or connected/paired device bluetooth name?
Both names you can get by below command:
adb shell dumpsys bluetooth_manager
The above command will give the output like this:
Bluetooth Status
enabled: true
state: STATE_ON
address: A4:70:D6:80:56:3E
name: Moto G (4) (This is your device name)
time since enabled: 00:03:29.979
Bonded devices:
C0:EE:FB:DA:70:6E [BR/EDR] Oneplus3 (This is connected device name)
...................................
...................................
来源:https://stackoverflow.com/questions/51050395/find-connected-bluetooth-device-name-using-adb