How to manage bluetooth operations using adb shell?

I am working on automation of bluetooth actions on Android, for example, enable / disable, pairing / unlocking devices, etc.

I want to know how to interact with an unmanaged Android device for the above bluetooth operations using adb shell commands or Android intentions.

For example, I want to know which Bluetooth devices are connected to my Android phone using the adb shell commands.

Is it possible?

+7
android shell bluetooth adb
source share
1 answer

dumpsys is your friend:

  • Find your bluetooth service (should be running): adb shell dumpsys -l
  • Mine is bluetooth_manager, so I run: adb shell dumpsys bluetooth_manager
  • At the output you can find the section "Communication devices"
+1
source share

All Articles