adb wakeup not wakes up galaxy s8 I'm looking for adb command to wake up my galaxy s8.

When I had galaxy s7 I used successfully this command:

adb shell input keyevent KEYCODE_WAKEUP


but in s8 this command just wake it up for a moment and then the screen is black again.

Can you help me find a way to wake up my phone and leave it awake?
Try this command:

adb shell "dumpsys power | grep "Display Power: state=ON" | xargs -0 test -z" &amp;&amp; adb shell input key event 26


  This will first check to see if the screen is on. If it isn't, it will
  emulate the power key, which will turn on the device's screen.


Credits: Vimalraj Selvam