Useful usage of Termux:Tasker(tudo wrapper)

sampleuserhere

Active member
@Dev777 You need to escape ' first and pass the script like below steps.

Let's say the script is stored under a local variable called script in MD, then we can pass -s '%script' as the argument with tudo location as the executable path.

If the script contains ' then the single quote should be replaced (escaped) with '\''.

Use Text Manipulation > Replace All action to replace '. The new text should be '\\'' (\ needs to be escaped).
 

Dev777

Active member
8Normally, when using Termux:Tasker, you need to prepare a script and specify a file to use it, but by setting up tudo, you can write code directly in Arguments.


tudo setup
1.pkg install vim
2.pkg install curl
3.curl -L 'https://github.com/agnostic-apollo/tudo/releases/latest/download/tudo' -o "/data/data/com.termux/files/usr/bin/tudo"

One more thing. On step number 3. I get this error. Happened on two of my phones running MIUI 14 and Another Oxygen os 11. What's the best way to fix it?

CANNOT LINK EXECUTABLE "curl": library "libssl.so.1.1" not found: needed by /data/data/com.termux/files/usr/lib/libssh2.so in namespace (default)


Googling says I use this code. Is this the best way to fix this?


pkg up -y && pkg install openssl
 

Attachments

  • IMG-20231102-WA0002.jpg
    IMG-20231102-WA0002.jpg
    120.2 KB · Views: 5

Dimlos

Well-known member
Downloading with Curl sometimes fails.
Tudo will work even if you download it with a browser and move it with a filer.
 

dudul6395

Member
bonjour à tous et bonne année En préambule, excusez mon langage grossier, je suis français et je parle couramment anglais quand je suis torturé... voici mon problème j'essaye d'utiliser le plugin termux tasker via macrodroid quel que soit le chemin utilisé pour mon scripts j'obtiens "fichier exécutable normal non trouvé au chemin" J'ai essayé de modifier les autorisations de termux/tasker/ j'obtiens drwx------ 10 u0_a251 u0_a251 3488 ce qui me semble correct mais toujours le même message "fichier exécutable normal introuvable sur le chemin".... j'ai donc lu que vous pouvez exécuter des scripts en entrant le code comme argument de plugin mais je ne peux pas accéder, je ne peux pas ouvrir '/storage/emulated/0/Download/tudo' pour la lecture : autorisation refusée ... je ne suis pas root et "su" ne fonctionne pas si vous connaissez une solution merci d'avancehello everyone and happy new year As a preamble, excuse my foul language, I am French and I speak English fluently when I am tortured... here is my problem I am trying to use the termux tasker plugin via macrodroid whatever the path used for my scripts I get "normal executable file not found at path" I tried to modify the permissions of termux/tasker/ I get drwx------ 10 u0_a251 u0_a251 3488 which seems correct to me but still the same message "normal executable file not found on path"....so i read that you can run scripts by entering the code as plugin argument but i can't access, i can't open '/storage/ emulated/0/Download/tudo' for reading: permission denied... I am not root and "su" does not work if you know a solution thanks in advanceIMG_20240101_234937.jpgCapture d'écran_2024-01-01-23-46-27-504_com.termux.tasker.jpgCapture d'écran_2024-01-01-23-44-44-420_com.termux.tasker.jpg
 
Last edited:

Dimlos

Well-known member
I am sorry, but could you please write in English next time?
First, please make sure you have an environment where you can run normal scripts in termux.
I think you will find the information in the following thread useful.

 
Last edited:

Dimlos

Well-known member
Termux:Tasker cannot be executed without a script in a defined directory.
Usually it is not necessary to set a working directry path.
It is very likely that your setup is wrong.
 

dudul6395

Member
sorry I translated with Google but my browser did the reverse translation without me paying attention

I retranslated to make future reading easier.
I also know that there is a site in French but the participants are very few in number

so no my configuration is good I have nothing and it works by changing the script creation procedure

I created the script.sh with nano in the termux/tasher thread then chmod +x
and it's ok

on the other hand, create script.sh in emulated/0/Download and move with mkdir and authorize with chmod....
does not work

the regular executable no found message is persistent

well the important thing is that it works and frankly I am amazed by the reliability of the script 1st script which only has the function of restarting Apache server
10 attempts 10 success

I still kept the path ~/.termux/tasker which has the advantage of delivering a list of scripts present in the directory in the upper box of the plugin

it will develop.....in the coming days

android 12 blocks a lot of action and even with another smartphone I tried 777 on emulated/0/Download by termux and by adb....no way

in any case thank you for your suggestions see you soon Vincent
 

dudul6395

Member
thank you Endecraft

I reconstructed the symbolic links

I think the error comes from the path I set in the plugin

emulated/0/Download remains rw

you have to put termux.com/file.../storage which allows

so if I understood correctly we create script.sh in emulated/0/Download
mv script.sh/termux.com/file.../storage
chmod +x script.sh

where should I use termux-setup-storage for each new script?

I do not think so...

in addition on Android 11 you must revoke termux file access and grant authorization again...

my solution of creating the script directly with nano in the tasker folder may be less restrictive in the end

I tested with the creation of the tudo folder to register the script as an argument in the plugin, I didn't succeed...

this use for small scripts seems to me the best I will insist on in my research
 
Last edited:

Dimlos

Well-known member
Upon closer review of your screenshot, it appears that the command is cut off in the middle.
Maybe I wrote it wrong.
I have corrected the setup instructions and would like you to try again.

I will add a screenshot of the instructions on how to run the tudo script for your reference.
 

Attachments

  • Macro.jpg
    Macro.jpg
    351.4 KB · Views: 7
  • Script.jpg
    Script.jpg
    312.7 KB · Views: 8
  • Variables.jpg
    Variables.jpg
    478.9 KB · Views: 7

dudul6395

Member
Upon closer review of your screenshot, it appears that the command is cut off in the middle.
Maybe I wrote it wrong.
I have corrected the setup instructions and would like you to try again.

I will add a screenshot of the instructions on how to run the tudo script for your reference.
so I don't know if the question was for me but here is a very pictorial answer capture tudo file authorization, Android termux authorization, modified file ~/.termux/termux.properties, macrodroid log,... I hope this will be useful I am Android 11 root on this xiaomi mt 10 pro smartphone test results: negative in all tests the variables remain empty I tested with echo and echo no change.... if I check the execute box in the terminal termux opens but the script does not execute finally no, I agree I did not create a script.sh since the argument replaces... good evening Vincent
 

Attachments

  • Screenshot_2024-01-03-01-32-11-354_com.miui.securitycenter.jpg
    Screenshot_2024-01-03-01-32-11-354_com.miui.securitycenter.jpg
    261.5 KB · Views: 4
  • Screenshot_2024-01-03-01-31-38-668_com.google.android.permissioncontroller.jpg
    Screenshot_2024-01-03-01-31-38-668_com.google.android.permissioncontroller.jpg
    183.9 KB · Views: 4
  • Screenshot_2024-01-03-01-31-13-375_com.termux.jpg
    Screenshot_2024-01-03-01-31-13-375_com.termux.jpg
    823.7 KB · Views: 5
  • Screenshot_2024-01-03-01-29-09-711_com.termux.tasker.jpg
    Screenshot_2024-01-03-01-29-09-711_com.termux.tasker.jpg
    307 KB · Views: 8
  • Screenshot_2024-01-03-01-28-23-446_com.arlosoft.macrodroid.jpg
    Screenshot_2024-01-03-01-28-23-446_com.arlosoft.macrodroid.jpg
    443.8 KB · Views: 6
  • Screenshot_2024-01-03-01-26-22-048_com.termux.jpg
    Screenshot_2024-01-03-01-26-22-048_com.termux.jpg
    861.2 KB · Views: 5

Dimlos

Well-known member
point of error.jpg
The basic way to write a script in tudo is -s 'script'.
Yours is wrong, so look at it carefully.
 
Top