Screen Off broken?

chaoscreater

Active member
Not sure if this is a bug or not, but Screen Off (no lock screen) suddenly broke on one of my devices and this is even with me testing the action directly (without any constraints).

The weird thing is, Screen Off with lockscreen works perfectly fine, just that Screen Off by itself doesn't. Restarted device and tested again, same issue.

Anyone come across this before?
 

RSF

Well-known member
Looks like Screen Off (No Lock) requires the phone to be rooted ...
Screenshot 2022-10-05 3.16.20 PM.png

... is the phone rooted? It seems unlikely that it'd somehow "un-root" itself, if it used to work, but perhaps this is a new requirement of the action?
 

chaoscreater

Active member
The phone is rooted 100%. I can run other root actions just fine.

Screen Off itself doesn't show it requires root either and that's the option I'm using (2nd option). Anyway, I've added MacroDroid as the Device Admin and now I can set Screen Off without lock again. I'm not sure why I had to do this, as it wasn't required before, but whatever.
 

RSF

Well-known member
Good that it's working again with that change...

As to what might have caused the issue: my setup requires MacroDroid to be the default assistant (so as to control Airplane mode) and I've noticed in the past week or two that I've had to remove and re-apply MacroDroid as default assistant every couple days to get Airplane mode actions to work. Maybe a glitch got introduced in either a recent MD or Android update affecting this general area of MD being the device assistant and/or admin...
 

chaoscreater

Active member
Good that it's working again with that change...

As to what might have caused the issue: my setup requires MacroDroid to be the default assistant (so as to control Airplane mode) and I've noticed in the past week or two that I've had to remove and re-apply MacroDroid as default assistant every couple days to get Airplane mode actions to work. Maybe a glitch got introduced in either a recent MD or Android update affecting this general area of MD being the device assistant and/or admin...

That doesn't make sense still.

a) I never had to use Device Admin OR Device Assistant just to control Screen Off action. I have root and this worked perfectly fine before. If you're not using root to perform actions and you rely on either Device Assistant, Accessibility or even MacroDroid Helper, then yes you may run into issues, where either the permissions for them are removed, OR perhaps they're not running in the background (e.g. MacroDroid Helper not running would mean it can't intercept calls from MacroDroid). As another example, if you force close MacroDroid on MIUI devices, Accessibility services need to be re-configured. Of course, the new ADB workaround/hack in the MacroDroid settings can help with this, but you get my point.

Device Admin however, does not lose its permission regardless of the situation.

The problem is NOT that I had MD set as Device Admin and the permission got reset. The problem is that I never had to set MD as Device Admin to make Screen Off work and now I have to. Even with Screen Off (no lock with root), it didn't work. If you're using Screen Off (no lock with root), then it shouldn't even care about Device Admin. If you then say OH but maybe MacroDroid somehow can't detect root, then no that's not the case either. Other actions that require root work just fine. It's not a loss of permission issue.

b) You can set MD as the default assistant in the systems (or maybe it's global?) table easily. I can easily use MacroDroid to set this and so this is never an issue for me.
 
Last edited:

chaoscreater

Active member
Does the screen off action work for some amount of time if you reboot your device?

Nope, it doesn't work even if I reboot the device. The weird thing is that I haven't changed anything at all. The device that is having this issue is very rarely used. The device hasn't gone through any ROM updates, nor any Play Store app updates, or any other types of updates at all. It's literally just sitting on my desk, and I only ever rarely use it as a portable external monitor (using SuperDisplay app).

Screen off is working fine now with MD set as device admin. Although, it's a bit weird why this is required when the Root screen off action doesn't work...
 
Top