4

Currently I'm working on an app which does Bluetooth scanning in background service. I realized that the phones behaviour is different if I force the device to sleep mode by

adb shell dumpsys battery unplug
adb shell dumpsys deviceidle force-idle

or unplug the physical cable from the device.

I can't find information about that there is a difference. But I recognised a difference already on different devices.

Is there a way to put the device in a I-physical-unplug-and-put-screen-off-mode and still be able to debug with logcat?

Thank you very much.

Fintasys
  • 1,309
  • 1
  • 9
  • 16
  • You may find it useful to `adb connect` over Wi-Fi to your device, as indeed Doze mode may behave differently when the phone is being charged. You can then run the `force-idle` command with the device unplugged. Instructions here: https://stackoverflow.com/a/36080928/1123355 – Elad Nava Feb 05 '22 at 22:52

0 Answers0