Run commands in Termux automatically through a third party app #2393
-
Hello, I developed an application in Java with commands to run in termux, currently the user must copy and paste the commands into Termux one by one manually. I was recently thinking of some way to automate this process so that the user wouldn't have all that work, my idea was the following: After performing an action in the app, the user would be redirected to Termux and the first command would be pasted and executed automatically, after installing all modules of this command, it would paste the next command and run it automatically too, until all commands are finished. I would like to know if this is even possible and how best to do it. Thank you very much in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please note that applications can't use this intent without requesting |
Beta Was this translation helpful? Give feedback.
RUN_COMMAND
intent is what you are looking for. You can read about this feature at this page: https://github.com/termux/termux-app/wiki/RUN_COMMAND-IntentPlease note that applications can't use this intent without requesting
com.termux.permission.RUN_COMMAND
permission andallow-external-apps = true
being set in~/.termux/termux.properties
.