How to control bluetooth operations using adb shell?

后端 未结 2 1203
醉梦人生
醉梦人生 2020-12-07 00:39

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 devi

2条回答
  •  我在风中等你
    2020-12-07 01:35

    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"

提交回复
热议问题