Bluetooth enable and disable the use of ADB does not work in Android 7 Samsung Galaxy Note 5

We are trying to enable and disable Bluetooth before we start our automation test with adb commands

Enable

adb shell service call bluetooth_manager 6

Disable

adb shell service call bluetooth_manager 9
adb shell settings put global bluetooth_on 0 in db level

it changes at the db device level, but does not reflect the ui device level, so the test is denied

We get Bluetooth status with this command.

adb shell settings get global bluetooth_on

Is there any other work to enable and disable bluetooth using APPIUM java, because these commands work on some devices, but not on the whole device. I am looking for a permanent solution.

The same teams that work in Android 5 (Lollipop)

+4
source share

Source: https://habr.com/ru/post/1693503/


All Articles