Use non-Admin (root) option to lock screen

386 views
Skip to first unread message

roirraw...@gmail.com

unread,
Jul 4, 2017, 12:02:35 AM7/4/17
to Automate
Hi. Huge fan of Automate and love to that apps like this are making use of the customizable quick setting tiles option although I've done some complex things with Automate as well.

I'm using the 100% stock Pixel ROM but rooted and the only ways I've found to have a Lock quick setting tile is to either make use of an app being implemented as Admin or the the use of another app that I won't name but it unfortunately lags a lot. To be clear, it locks the screen using root instead of as Admin, so I'm still able to unlock the phone with my fingerprint after. Apps that use Admin to lock make it so that my PIN is required to unlock.

Nova Launcher Prime has three options to lock through gestures (such as double tap a blank spot on the home screen), but I'd rather use a quick setting tile. The first time you use the gesture you assign in Nova to lock the screen, Nova prompts which of the three methods to use.

Admin, like everyone else, a second option I don't remember but was probably just simulating screen off with a black screen for a few seconds and then locking, or using root. The root method locks immediately but since it's not using Admin, the fingerprint reader can still be used to unlock immediately after.

If there is any way to implement a similar root method, that would be very helpful. If be willing to donate extra for the feature.

Thanks and take care.

Henrik "The Developer" Lindqvist

unread,
Jul 4, 2017, 2:15:07 PM7/4/17
to Automate, roirraw...@gmail.com
Try using the Shell command superuser block to simulate a power button press:
input keyevent 26

Source:
https://android.stackexchange.com/questions/171571/manually-lock-device-without-smart-lock/171592

Kevin Eckenrode

unread,
Jul 4, 2017, 2:57:47 PM7/4/17
to Automate, roirraw...@gmail.com
Ah!  Thank you, works perfectly.  I was trying to think of the correct keyword to search the available blocks, but didn't think of Shell.  LOL!

Where can I donate more towards the continued support and development?

Thanks again,

nick.i...@gmail.com

unread,
Jun 13, 2018, 2:02:08 PM6/13/18
to Automate
Any chance there's a way to accomplish something similar (lock screen w/ fingerprint, voice assistant, etc still enabled) on a device that hasn't been rooted?

Henrik "The Developer" Lindqvist

unread,
Jun 13, 2018, 2:30:23 PM6/13/18
to Automate
Use the Device Lock block.
Reply all
Reply to author
Forward
0 new messages