Find connected bluetooth device name using adb? [duplicate]
Find connected bluetooth device name using adb? [duplicate]
This question already has an answer here:
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.
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1 Answer
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)
...................................
...................................
i want the name of the connected device only. bonded devices list is showing multiple BT devices, is the first one always the connected one? also could you provide a way to parse this dump to get just the name of the connected BTdevice. Thanks.
– JerryGoyal
Jul 2 at 13:11