Is it possible to do a soft reset (user space?) to MacroDroid or clean phone memory/processor without actually restarting it?

aitn

Member
Hello,

I got the following phone Moto G Pure 2021. It has an Android 11 installed.

After few days of working, the phone seems to get a little slow, some apps are slow to respond and/or specifically the Macrodroid would show this message randomly when something invokes it "MacroDroid isn't responding" with options "Close app" or "Wait" and some apps might just crash.

Restarting the phone fixes these issues, but I'm trying to avoid doing a full restart (either through the physical power button or power tools app restart/shutdown options) - Is there a way to do a soft restart Macrodroid/phone or something that would clear the phone memory/processor so apps operate in a clean way (like after a restart) without the need to actually restart the phone? Is there an app or a setting function that could achieve that? In Memory use in Settings it shows "average memory use in last 3 hours: 2.3 GB / total memory of 2.9 GB. Average used (%): 77%. Free: 663 MB.

TDLR: Is there a way to restart the Macrodroid services without restarting the phone? What's the proper way to do and what order?

Thank you.

P.S.

I found this:

https://source.android.com/docs/core/runtime/soft-restart

But not sure if and how it can be used.
 

Endercraft

Moderator (& bug finder :D)
You can force stop the app from app info.
If the dialog is appearing it's likely you have a macro doing something very long (like json parse or text manipulation) and that hits the performance of your phone.
 

aitn

Member
You can force stop the app from app info.
If the dialog is appearing it's likely you have a macro doing something very long (like json parse or text manipulation) and that hits the performance of your phone.
What happens after you force stop? What's the next thing I need to do? Or will Macrodroid just start by itself again? I found this thread:
and the poster there mentions many more steps:
"
How I currently restart MacroDroid:
1. Disable MD accessibility service
2. Disable MD device admin access (needed so force stop is allowed)
3. Disable MD via home screen toggle (not sure if this is needed, but I don't want to interrupt MD if it's doing something)
4. Force stop MD
5. Enable MD accessibility service
6. Enable MD device admin access
7. Enable MD via home screen toggle"

Is this all needed?
 

Endercraft

Moderator (& bug finder :D)
Force stopping should be enough because MacroDroid can restart and if you configure it to restart all of the missing services like accessibility.

It seems like on some devices you have to disable admin access for MacroDroid to force stop however on Xiaomi it's not needed.


Another way would be to crash MacroDroid using a bug but that's overkill.
 

aitn

Member
Force stopping should be enough because MacroDroid can restart and if you configure it to restart all of the missing services like accessibility.

It seems like on some devices you have to disable admin access for MacroDroid to force stop however on Xiaomi it's not needed.


Another way would be to crash MacroDroid using a bug but that's overkill.
My device is Motorola, do I need to disable admin access for Macrodroid to force stop or not?
"if you configure it to restart all of the missing services like accessibility" - What do you mean by that? How can I check that?
 

Endercraft

Moderator (& bug finder :D)
My device is Motorola, do I need to disable admin access for Macrodroid to force stop or not?
I don't know, test it out yourself :)
"if you configure it to restart all of the missing services like accessibility" - What do you mean by that?
Check the attached macro, this is what I use and it has always been successful at granting accessibility again (I tend to crash MacroDroid in various ways so this is very useful because at the smart time I use it daily).
 

Attachments

  • Change_settings_at_initialisation.macro
    16.8 KB · Views: 6

aitn

Member
I don't know, test it out yourself :)

Check the attached macro, this is what I use and it has always been successful at granting accessibility again (I tend to crash MacroDroid in various ways so this is very useful because at the smart time I use it daily).
Thanks. Not sure I understand what do you mean “this is very useful because at the smart time I use it daily” - What smart time? What do you need to use it daily and why you need to crash MD? What’s the purpose of all of this?
 

Endercraft

Moderator (& bug finder :D)
I mis typed, there is no 'smart time'. If MacroDroid get killed for some reason or you need to force-stop this macro simply grants accessibility permissions again instead of having you doing it manually - it also does that for notification access and assistant if needed.
 
Top