3

I'm turning crazy finding the way to launch the screensaver activity that can be launched from Settings > Display > Screensaver. I want to simulate from ADB clicking on the option "start now" inside the screensaver options because I need to configure some TV's to quickly launch the screensaver on demand.

I have all of them connected through Intel sticks using Android x86 Nougat stable, I can do adb through wifi without issues and I even installed Simple SSH to access through SSH in case of needed.

The keyevents are working, but there is no keyevent to launch the screensaver, only to simulate the power off button, which causes the wireless connection to go down no matter what is configured in the sleep / battery saving settings.

Is there any chance to fix this?

Thanks!

Nobitakun
  • 31
  • 1
  • 3
  • Have you tried the d-pad commands via [ADB Shell Input Events](https://stackoverflow.com/q/7789826/295004) to "walk" your way via focus to the settings screen? – Morrison Chang Mar 28 '19 at 20:08

1 Answers1

6

I have found the following adb command works on devices that I develop on:

adb shell am start -n "com.android.systemui/.Somnambulator"

Credit to https://stackoverflow.com/a/21485967/11385462 for pointing in the right direction. YMMV.

JacquesBauer
  • 226
  • 2
  • 7