3

I want to use terminal task to to turn the screen off using tasker. I have tried a code like this, and some variants, without success.

am start --user 0 -a android.intent.extra.KEY_EVENT --es KEYCODE_POWER ACTION_DOWN

I have also tinkered with 

android.intent.action.SCREEN_OFF

 but with even less success.

Any ideas as how how I can get this to work? Either with terminal emulator or tasker send intent task?

Note: Not rooted, som shell task in will not work.

And System Lock doesn't work well with finger print reader

1 Answer 1

0

By use adb shell input keyevent <key_code> And for simulating your device power the key code is 26

Adb shell input keyevent 26
1
  • Doesn't work on an unrooted device, when you want to do it on the device itself (not through adb) May 10, 2017 at 13:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .