Screen Timeout Issue

Dimlos

Well-known member
Shell script did not work, but the adb command did.

With ADB Shell [Tasker Plugin], no root is needed.
 

Attachments

  • screen timeout.jpg
    screen timeout.jpg
    333.9 KB · Views: 34
  • adb shell command.jpg
    adb shell command.jpg
    253.2 KB · Views: 27

FrameXX

Well-known member
Shell script did not work, but the adb command did.

With ADB Shell [Tasker Plugin], no root is needed.
Nice.

It's important to note that after every restart of your device you will need to setup adb tcpip again.
 

Swap_File

New member
On Oxygen OS 12 on my OnePlus 8 Pro:

Shell script: "settings put system screen_off_timeout 30000"

Actions - Shell Script - Rooted - No Helper: Works

Actions - Shell Script - Non-Rooted - No Helper : Doesn't work.

Actions - Shell Script - Rooted - Helper : Doesn't work.

Actions - Shell Script - Non-Rooted - No Helper : Doesn't work.

Actions - System Setting - System: Doesn't work.

Actions - System Setting - Secure - No Helper: Doesn't work.

Actions - System Setting - Secure - With Helper : Doesn't work.

Actions - System Setting - Global - No Helper: Doesn't work.

Actions - System Setting - Global - With Helper : Doesn't work.

Actions - Set Screen Time Out : Doesn't work.
 

dhj49er

Well-known member
Is this going to be resolved soon ? Screen time out issue is quite annoying... thank you !
I don't think the issue is in Macrodroid.
The issue exists on many Oppo phones and now One plus phones that have moved to the Oppo OS.
I no longer have an Oppo phone and my new Huawei phone doesn't have this issue. It also sets media volume when the screen is off, something else the Oppo phone didn't do.
The Huawei has the annoying confirmation dialog when an app tries to turn on or off Bluetooth.
Unfortunately phone manufacturers like to customise Android for their own OS, some more than others, so there will be differences.
 
OK then I suppose it's not possible to modify MD so as to make this functionality work on Oppo devices... That's too bad, because playing with sreen off delay and AOD settings was very nice. Thank you anyway for your hard work.
 
I just tried it (I didn't want a solution involving pluging the phone to my PC at every restart, but I don't have a choice obviously) and I think it works. Thank you !
 

Jacob L

Moderator (Lawsonator)
I just tried it (I didn't want a solution involving pluging the phone to my PC at every restart, but I don't have a choice obviously) and I think it works. Thank you !
You don't need to plug it in on every reboot. The ADB permissions stay once granted
 
Oh, OK... But didn't FrameXX say "after every restart of your device you will need to setup adb tcpip again." ? Anyway, I'll try and see by myself.

And also, I wanted to play with AOD settings. I saw that the (secure) settings were, apparently :
Setting_AodEnable=1
Setting_AodSwitchEnable=1

I tried some ADB shell commands but, although it's done without any error, AOD won't be activated this way. I must miss something I suppose...
 

Jacob L

Moderator (Lawsonator)
Oh, OK... But didn't FrameXX say "after every restart of your device you will need to setup adb tcpip again." ? Anyway, I'll try and see by myself.

And also, I wanted to play with AOD settings. I saw that the (secure) settings were, apparently :
Setting_AodEnable=1
Setting_AodSwitchEnable=1

I tried some ADB shell commands but, although it's done without any error, AOD won't be activated this way. I must miss something I suppose...
I made a mistake about the reboot thing. Also MacroDroid has an ambient display action built in, maybe that helps
 

FrameXX

Well-known member
Oh, OK... But didn't FrameXX say "after every restart of your device you will need to setup adb tcpip again." ?

That's how it works with ADB Shell tasker plugin app, however granting permissions with ADB is permanent until you uninstall MacroDroid.
 

Dimlos

Well-known member
I believe it is possible to turn AOD on and off without ADB...
First post is about screen timeouts, not AOD. If we are on different topics, maybe we should have a separate thread?
 
Yes when I updated my OP8T to Android 12, AOD, screen off delay, and volume settings stopped working properly. Soon after there was a MD update which fixed the volume settings. Screen off delay is now +/- fixed thanks to the ADB shell command solution. But regarding AOD I couldn't find something (the built in MD command doesn't work anymore for me).
Noted for another thread.
Thank you !
 

Tokkka

New member
I want to revive this thread and add my observations. I use an OnePlus 7t and I updated to Android 12 a few months ago. Since then the regular way of changing the timeout didn't work anymore. I now use the MD change system settings action to edit the timeout, as my device is rooted that kind of works (screen_off_timeout = 60000)... BUT it's so annoying that you can't set the timeout to a value which is not a setting you can also set via the settings app. If I try to set the value to 45000 it just sets the value to the next lower step you can see in the system settings app, which is 30000...

Has anyone found a solution to this specific aspect of this problem?
 

Swap_File

New member
I don't know of any way to set an arbitrary timeout on OOS12 or OOS13, but if you want to stay awake for a certain amount of time, you can automate pressing an unknown button to keep your phone awake. I haven't noticed any side effects from this.
 

Attachments

  • 1681769359510.png
    1681769359510.png
    231.5 KB · Views: 11

mmjoshi

Member
I want to revive this thread and add my observations. I use an OnePlus 7t and I updated to Android 12 a few months ago. Since then the regular way of changing the timeout didn't work anymore. I now use the MD change system settings action to edit the timeout, as my device is rooted that kind of works (screen_off_timeout = 60000)... BUT it's so annoying that you can't set the timeout to a value which is not a setting you can also set via the settings app. If I try to set the value to 45000 it just sets the value to the next lower step you can see in the system settings app, which is 30000...

Has anyone found a solution to this specific aspect of this problem?
I am facing similar issues when I migrated from stock Android 11 on Nokia 6.1, which is an Android One phone to realme Narzo 50 running Android 13 version of Android implementation by realme, which I believe is similar to the one running on Oppo phones. I had posted on this forum couple of days back outlining the problem. I am repeating my post below.

Quote

Couple of days back I migrated to Realme Narzo50 Pro running Android 13 fr9 Nokia 6.1 running Android 11. Unfortunately the transition has not been smooth. Following are the major issues I am facing with macros which were running flawlessly on Nokia.
01. Unable to change the media volume depending on which app, e.g. VLC, YouTube etc. are running. The launch of the app is detected correctly but the action to change the volume doesn't eork.
02. Similarly, changing the screen time out value doesn't change depending on tbe app launched. The launch of the app is detected correctly but the command to change the screen time out is ineffective .
03. The trigger to detect music has stopped playing doesn't get fired when the music stops.
Are there any specific settings I need to do differently on Android 13? Definitely want all my macros to work on Android 13.
Hope I don't face more issues as I start testing other macros.

Issue 02 still persists. My phone is not rooted but have installed the MD Helper program and the ADB Tasker Plugin. Would like to know how to use the tcpip command using the PC. Hopefully that will fix my issue.
 
Top