vasanthfriend
vasanthfriend

Reputation: 153

How to control bluetooth operations using adb shell?

I am working on automating bluetooth actions on android like enable/disable, pairing/unpairing devices etc.

I want to know how to interact with unrooted android device for above mentioned bluetooth operations using adb shell commands or android intents.

For example, i want to know which devices are bluetooth paired with my android phone using adb shell commands.

is it possible?

Upvotes: 15

Views: 25795

Answers (1)

lojza
lojza

Reputation: 1891

dumpsys is your friend:

  • Find your bluetooth service (must be running): adb shell dumpsys -l
  • Mine is bluetooth_manager, so I run: adb shell dumpsys bluetooth_manager
  • In output you can find section "Bonded devices"

Upvotes: 0

Related Questions