Termux and executables

200 views
Skip to first unread message

João Estudante

unread,
Jun 20, 2023, 1:11:09 PM6/20/23
to Automate
Hi, 

First of all, great app, i'm in love!

I'm trying to run executables (compiled by gcc in termux).
As i can't acess Termux directorys from the shell commanfd block i moved it to the External Storage. I did some testing and was able to run "echo hi" directly on the shell command block and scripts with the same commad, but a cant seem to be able to execute the binary... "permission denied".

I saw a previous post of yours suggesting to use the start service block, but i need the stdout of the execution.

How can i do this? 
Thanks!!

P. Andreas Schmidt, IVE

unread,
Jun 20, 2023, 5:22:19 PM6/20/23
to Automate
Hi there. I'm no expert but I can think of 2 things here. To execute something I thought you have to "make" it executable or mark it as such, give it the permission with chmod +X or so.
The other thing is did you know there's a tasker plugin (on fdroid) that lets you execute scripts and returns all the stdout and so?
Hope this helps

Henrik "The Developer" Lindqvist

unread,
Jun 20, 2023, 7:18:08 PM6/20/23
to Automate
Automate can't access executables "installed" by Termux, either use the Termux plug-in, or directly using the Service start block, e.g.:
  • Package: com.termux
  • Class: com.termux.app.RunCommandService
  • Action: com.termux.RUN_COMMAND
  • Extras= { "com.termux.RUN_COMMAND_PATH": "<path to script goes here>", "com.termux.RUN_COMMAND_ARGUMENTS" as StringArray: ["foo", "bar", varBaz] }
  • Ensure to grant the Termux privilege in settings
Ensure to grant the Termux privilege in Automate settings.

Reply all
Reply to author
Forward
0 new messages