What you are asking for requires root to do with MacroDroid only but is possible.Hi,
I am searching for these 2 actons:
1. To close or restart an app. I can find "launch new app" but nothing to close. I found "kill background" but in my case it doent help.
2. Action to power off the device. Is there nothing like this?!
Thanks
Well, i found it, but because i dont have root, killing app will not work, right?What you are asking for requires root to do with MacroDroid only but is possible.
In MacroDroid's settings, enable "Enable root features".
This is also interesting, but how and where to use these commands?I think it is possible with the adb command.
App force stopadb shell am force-stop PACKAGE NAME
Turn off poweradb shell reboot -p
2. To turn off the phone, without root and without adb, you can use Android Shortcuts -> Power Options and UI Interaction (XY) actions. It requires the screen on and unlockedHi,
I am searching for these 2 actons:
1. To close or restart an app. I can find "launch new app" but nothing to close. I found "kill background" but in my case it doent help.
2. Action to power off the device. Is there nothing like this?!
Thanks
What is the sense of that? Why would i want to power off my device while my screen is on? My wish is to auto power-off the device when the screen stays switched-off for a long time, for example for mor than 3 hoursIt requires the screen on and unlocked
Unfortunately it doesn't work on non rooted devices.I think it is possible with the adb command.
App force stopadb shell am force-stop PACKAGE NAME
Turn off poweradb shell reboot -p
@Qarboz is quite right to power off on non rooted devices.Well, i found it, but because i dont have root, killing app will not work, right?
This is also interesting, but how and where to use these commands?
I'm confused, why would it not work if it literally does?Unfortunately it doesn't work on non rooted devices.
Just use screen on action, then android shortcut --> power options then use UI Interaction to select power off button.Ok, but is this possible with the hint from @Qarboz ?
The above adb command worked on my non-root Android 9 device.Unfortunately it doesn't work on non rooted devices.
I do not know how to trigger when the screen is off for 3 hours.My wish is to auto power-off the device when the screen stays switched-off for a long time, for example for mor than 3 hours
I'm confused, why would it not work if it literally does?
ADB does not require root...
I tried it and got a Permission denial...The above adb command worked on my non-root Android 9 device.
Can you tell me in what environment you ran adb?I tried it and got a Permission denial...
You mean on my PC? It was a very long time ago...Can you tell me in what environment you ran adb?
I thought you were speaking about the way I first installed adb...I also tried running it from my PC and it worked.