Is there a way to power off via intent or shortcut?

Nonhocapito

New member
On my device, MD cannot power off the device normally via action, only through the "alternate" power off.

I understand, however, that this is the "forced" kind of power off. Since I run this action every day, I feel it may be bad for the device to be continuously forced powered off.

I tried using android.intent.action.ACTION_SHUTDOWN but I don't think it's supposed to work either (or maybe I didn't set it up correctly, since I don't know what to put in the class or package names - or it's just for triggers).

Is there any way for me to invoke the regular power off?

On Android 10.

Thanks!
 

Nonhocapito

New member
There's a shutdown action in MacroDroid. You just need to enable root in MacroDroid's settings.
As I stated in my first post, that action does not work on my phone. Only the "alternate" kind, which is the forced poweroff. I have root enabled in macrodroid settings if that's what you're referring to.
 

Mruser35

New member
⭐⭐This actually seems to me to be a an ignorant reply to your question but I've read all the others and no one has mentioned it so here it goes. If you have root then use the shell script action and simply type "reboot -p" without the quotes of course. Be sure to tick rooted. Then use whatever trigger you want to run the action.⭐⭐
 
Last edited:

Mruser35

New member
This actually seems to me to be a an ignorant reply to your question but I've read all the others and no one has mentioned it so here it goes. If you have root then use the shell script action and simply type "reboot -p" without the quotes of course. Be sure to tick rooted. Then use whatever trigger you want to run the action.
⭐Actually when I think of it I can assure you that if you have root access this will definitely solve your problem. If Macrodroid can't do it, use any other app that'll run a shell script then use the shortcut action and run it from Macrodroid. This is a basic Linux command and in no way is it harmful to your device. ⭐
 
Last edited:
Top