Can't get termux shortcut to work with macrodroid

rickl

New member
Hi,
I'm running a oneplus 5T with Android 12. I use Nova7 as my everyday launcher. I have the latest version of Termux installed from F-Droid. I also have the macrodroid helper and all necessary permissions enabled (I believe). I've been using macrodroid to call a termux shell script for quite a few years and it has worked well with Android <10. Unfortunately, with Android 10 or above it's not working. Here's what happens:
  1. Inside macrodroid, I edit my macro and click the 'Add Action' and choose 'Launch Shortcut'.
  2. I'm presented with a list of shortcuts which includes 'Termux shortcut'.
  3. After selecting termux shortcut, I'm presented with the list of shortcuts that Termux knows about. These are basically shell script choices. The one I'm trying to use is called 'backup.sh'.
  4. After selecting that choice, I get an android window titled 'Add to Home Screen'. It's as if I was trying to choose to add the termux shortcut widget to my android home screen.
  5. I choose 'Add automatically' and the widget shows up as a clickable icon on my home screen, but macrodroid doesn't seem to know it exists.
  6. If I clicked on 'Add automatically', I'm returned to the macrodroid 'Add Action' list. Then if I hit the macrodroid left arrow next to 'Add Action', I'm returned to the macrodroid macro edit screen with NO action being registered.
For what it's worth, the termux shortcut works fine if I click on it from the Android home screen - outside of macrodroid.
 

e.t.l

Member
Install Termux:Tasker from F-Droid.
Please read README.md on GitHub for configuration.
You can call Termux as a plugin from MacroDroid.
Could you give an example of a configuration that works with the Termux:Tasker plugin from Macrodroid? The reason I ask is that I can't seem to get it to give me anything for stdout, even when I'm inputting simple commands that seem like they should work
 

Dimlos

Well-known member
There are so many reasons why Termux does not work well that we cannot identify them. In most cases, you write a script in Termux and select it in Termux:Tasker instead of typing commands into Termux:Tasker.

Here is a link to a thread that explains Termux, which may be helpful.
 
Top