Wireless debugging

mmjoshi

Member
I am on Android 13 running on realme Narzo 50 Pro 5G.

I am using Macrodroid to set different screen time out values based on the app launched. I ask using the MD Helper file and the ADB Tasker plugin by using the following command:

ADB Shell Command
local host:5555
settings put system screen_off_timeout:30000

to ser the screen timeout to 5 minutes.

I ask using the Wireless debugging command
adb tcpip 5555 to tun the localhost at port 5555.

Apart from this I have granted write secure settings permission to the MD Helper app through wireless debugging.

Things work fine as long as the Wireless debugging is turned on in the developer settings. The moment that gets turned off automatically. The only way to get the macro working again is to turn this seeing on manually. Very cumbersome.

I do not want to use the USB debugging as some of my bank applications don't run if USB debugging is turned on.

Any idea on how to get tie resolved?

mj
 

Endercraft

Moderator (& bug finder :D)
I'm not sure what you need to do exactly, can you explain further?
Just to clarify you can't set adb port to 5555 without root or adb tcpip 5555. In tcpip mode disconnecting from wifi should not reset and work offline.

Also after you have done adb hack there is no need to use adb to change the setting. Use the system setting action to set system screen_off_timeout to 30000.
 
Last edited:

mmjoshi

Member
I'm not sure what you need to do exactly, can you explain further?
Just to clarify you can't set adb port to 5555 without root or adb tcpip 5555. In tcpip mode disconnecting from wifi should not reset and work offline.

Also after you have done adb hack there is no need to use adb to change the setting. Use the system setting action to set system screen_off_timeout to 30000.
Thanks for your inputs. I am trying to use the following command to set screen timeout to 5 minutes:

ADB Shell Command
local host:5555
settings put system screen_off_timeout:30000

After reading the forum posts I came to know that since my phone is not ripped, I need run the

adb tcpip 5555 command after switching the wireless debugging mode on. The ADB shell command works perfectly as long as the wireless debugging mode is on. The moment this mode is off, the ADB shell command does not work.

Very frustrating. Hope I have made my workflow clear. I agree thr other ADB hacks are not relevant in this scenario.

Do let me know if you need further clarifications. I would like to solve this problem ASAP.
 

Endercraft

Moderator (& bug finder :D)
after you have done adb hack there is no need to use adb to change the setting. Use the system setting action to set system screen_off_timeout to 30000.
As said here there is no need for ADB Connection adb hack is enough. Actually it's not even needed. You don't need anything adb related to use the action in the system table.
 

mmjoshi

Member
As said here there is no need for ADB Connection adb hack is enough. Actually it's not even needed. You don't need anything adb related to use the action in the system table.
Thanks again. I tried the following command:

System Setting
[system] screen_off_timeout = 30000

Is this the right command? It didn't work.

I am attaching the log file.

What am I doing wrong?
 

Attachments

  • Screenshot_2023-11-10-18-14-33-97_2e840d222d67ef3caca3a1c67d71d48f.jpg
    Screenshot_2023-11-10-18-14-33-97_2e840d222d67ef3caca3a1c67d71d48f.jpg
    861.5 KB · Views: 6

Endercraft

Moderator (& bug finder :D)
You're doing nothing wrong from what I see.
Does it work with adb but not MacroDroid system setting action?
 

mmjoshi

Member
You're doing nothing wrong from what I see.
Does it work with adb but not MacroDroid system setting action?
It does. However, I would prefer your method. Much cleaner and direct. The ADB method forces me to keep the Wireless Debugging option on all the time. A security hazard
 
Top