-
Notifications
You must be signed in to change notification settings - Fork 5
/
Termux_Tasker_Plugin_Tudo_Templates.tsk.xml
executable file
·1073 lines (1005 loc) · 47.1 KB
/
Termux_Tasker_Plugin_Tudo_Templates.tsk.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<TaskerData sr="" dvi="1" tv="5.11.7.beta">
<Task sr="task1002">
<cdate>1604448827988</cdate>
<edate>1607961051326</edate>
<id>1002</id>
<nme>Termux Tasker Plugin Tudo Templates</nme>
<pri>100</pri>
<Share sr="Share">
<d>A task that provides templates for running `tudo` script commands with the Termux:Tasker plugin in `termux` user context in termux. This task requires Termux:Tasker version `>= 0.5`. Tasker must be granted `com.termux.permission.RUN_COMMAND` permission. The `tudo` script must be installed at `$PREFIX/bin/tudo`. The `allow-external-apps` property must also be set to `true` in `~/.termux/termux.properties` file since the `$PREFIX/bin/tudo` absolute path is outside the `~/.termux/tasker/` directory, otherwise the plugin actions will fail. For android `>= 10`, Termux must also be granted `Draw Over Apps` permissions so that foreground commands automatically start executing without the user having to manually click the `Termux` notification in the status bar dropdown notifications list for the commands to start.
Check [Termux:Tasker Github](https://github.com/termux/termux-tasker) for more details on plugin configuration and variables and how to handle them.
Check [tudo](https://github.com/agnostic-apollo/tudo) for more details for the `tudo` script.
Template 1 runs the `$PREFIX/bin/tudo getprop "ro.build.version.sdk"` command in the background as a template for the `path` `command_type` to get the android sdk version of the device. The args sent do not contain any quotes or special characters and can simply be sent, optionally surrounded with double quotes.
Template 2 runs the `$PREFIX/bin/tudo -s '%core_script' '%argument_1' '%argument_2'` command in the background as a template for the `script` `command_type` with `bash` as the `tudo shell`, which would be chosen automatically by default without having to pass the `--shell` option. The `termux_tasker_basic_bash_test` `bash` script text is passed as the `core_script` argument with 2 complex dynamic args that may contain quotes or special characters, basically a literal string. The `-s` command option is passed to set `command_type` to `script`. The result is received back in the `%stdout` variable. The `tudo` executable is passed to the plugin using the `%executable` variable. The `%core_script`, `%argument_1` and `%argument_2` variables are used to store the dynamic values to be sent as `$1`, `$2` and `$3` respectively to `tudo` and are sent surrounded with single quotes instead of double quotes. They are first all set in the `%arguments` variable surrounded with single quotes and separated by a whitespace which is passed to the plugin. The `%core_script`, `%argument_1` and `%argument_2` variables may contain any type of characters, even a single quote, but single quotes must be escaped before the plugin action is run. To escape the single quotes, `Variable Search Replace` action is run to replace all single quotes `'` with one single quote, followed by one backslash, followed by two single quotes `'\''`. So `%argument_1` surrounded with single quotes that would have been passed like `'some arg with single quote ' in it'` will be passed as `'some arg with single quote '\'' in it'`. This is basically 3 parts `'some arg with single quote '`, `\'` and `' in it'` but when processed, it will be considered as one single argument with the value `some arg with single quote ' in it` that is passed to the executable as `$2`. The `Variable Search Replace` action must be used separately for each argument variable before adding it to the `%arguments` variable. Do not set multiple arguments in the same variable and use `Variable Search Replace` action on it since that will result in incorrect quoting. This template shows how you can dynamically create plugin commands at runtime using variables and send them to the plugin for execution, including passing the script text itself without having to create a physical file in `~/.termux/tasker/` directory.
Template 3 is almost the same as Template 2, but it runs the `$PREFIX/bin/tudo -s --shell=python '%core_script' '%argument_1' '%argument_2'` command in the background as a template for the `script` `command_type` with `python` as the `tudo shell`. The `termux_tasker_basic_python_test` `python` script text is passed as the `core_script` argument with 2 complex dynamic args that may contain quotes or special characters, basically a literal string. The result is received back in the `%stdout` variable.
Template 4 runs `$PREFIX/bin/tudo --shell-pre-commands="echo 'starting tudo shell';" --title='tudo' su` in the foreground as a template for the `su` `command_type` to start an interactive `bash` shell with priority to termux binaries and libraries. The `--shell-pre-commands` option is passed to run some commands before starting the interactive `bash` shell and its argument is passed surrounded with double quotes to prevent whitespace splitting. The `--title` option is passed to set the title of the terminal. Since commands will be run in a foreground terminal session, the `%stdout`, `%stderr` and `%result` variables will not be returned and only `%err` and `%errmsg` may be returned if the action fails.
The `$PREFIX/` is a shortcut for the termux prefix directory `/data/data/com.termux/files/usr/`. The `~/` is a shortcut for the termux home directory `/data/data/com.termux/files/home/`. These shortcuts can be used in the `Executable` and the `Working Directory` plugin fields and in any path arguments to the `tudo` command. The scripts or binaries in the `~/.termux/tasker/` directory do not require them to prefixed with the full path, just set the name in the `Executable` field.
The `%command_failed` variable will be set if the plugin action failed, this is detected by whether `%err` or `%errmsg` is set by the plugin action or if `%result` does not equal `0` for background commands. If you run multiple plugin actions in the same task or are using `Local Variable Passthrough`, then you must clear the `%command_failed` variable and optionally the `%errmsg`, `%stdout`, `%stderr` and `%result` variables with the `Variable Clear` action before running each plugin action, in case they were already set, like by a previously failed plugin action after which the task was not stopped.
To debug arguments being passed or any errors, you can check `logcat` after increasing log level to `Debug`. Check `Debugging` section of `README.md` for more details.
##
**Parameters:** `-`
**Returns:** `-`
**Control:**
```
version_name: 0.1.0
```</d>
<p>false</p>
<t></t>
</Share>
<Action sr="act0" ve="7">
<code>300</code>
<label>A task that provides templates for running `tudo` script commands with the Termux:Tasker plugin in `termux` user context in termux. This task requires Termux:Tasker version `>= 0.5`. Tasker must be granted `com.termux.permission.RUN_COMMAND` permission. The `tudo` script must be installed at `$PREFIX/bin/tudo`. The `allow-external-apps` property must also be set to `true` in `~/.termux/termux.properties` file since the `$PREFIX/bin/tudo` absolute path is outside the `~/.termux/tasker/` directory, otherwise the plugin actions will fail. For android `>= 10`, Termux must also be granted `Draw Over Apps` permissions so that foreground commands automatically start executing without the user having to manually click the `Termux` notification in the status bar dropdown notifications list for the commands to start.
Check [Termux:Tasker Github](https://github.com/termux/termux-tasker) for more details on plugin configuration and variables and how to handle them.
Check [tudo](https://github.com/agnostic-apollo/tudo) for more details for the `tudo` script.
Template 1 runs the `$PREFIX/bin/tudo getprop "ro.build.version.sdk"` command in the background as a template for the `path` `command_type` to get the android sdk version of the device. The args sent do not contain any quotes or special characters and can simply be sent, optionally surrounded with double quotes.
Template 2 runs the `$PREFIX/bin/tudo -s '%core_script' '%argument_1' '%argument_2'` command in the background as a template for the `script` `command_type` with `bash` as the `tudo shell`, which would be chosen automatically by default without having to pass the `--shell` option. The `termux_tasker_basic_bash_test` `bash` script text is passed as the `core_script` argument with 2 complex dynamic args that may contain quotes or special characters, basically a literal string. The `-s` command option is passed to set `command_type` to `script`. The result is received back in the `%stdout` variable. The `tudo` executable is passed to the plugin using the `%executable` variable. The `%core_script`, `%argument_1` and `%argument_2` variables are used to store the dynamic values to be sent as `$1`, `$2` and `$3` respectively to `tudo` and are sent surrounded with single quotes instead of double quotes. They are first all set in the `%arguments` variable surrounded with single quotes and separated by a whitespace which is passed to the plugin. The `%core_script`, `%argument_1` and `%argument_2` variables may contain any type of characters, even a single quote, but single quotes must be escaped before the plugin action is run. To escape the single quotes, `Variable Search Replace` action is run to replace all single quotes `'` with one single quote, followed by one backslash, followed by two single quotes `'\''`. So `%argument_1` surrounded with single quotes that would have been passed like `'some arg with single quote ' in it'` will be passed as `'some arg with single quote '\'' in it'`. This is basically 3 parts `'some arg with single quote '`, `\'` and `' in it'` but when processed, it will be considered as one single argument with the value `some arg with single quote ' in it` that is passed to the executable as `$2`. The `Variable Search Replace` action must be used separately for each argument variable before adding it to the `%arguments` variable. Do not set multiple arguments in the same variable and use `Variable Search Replace` action on it since that will result in incorrect quoting. This template shows how you can dynamically create plugin commands at runtime using variables and send them to the plugin for execution, including passing the script text itself without having to create a physical file in `~/.termux/tasker/` directory.
Template 3 is almost the same as Template 2, but it runs the `$PREFIX/bin/tudo -s --shell=python '%core_script' '%argument_1' '%argument_2'` command in the background as a template for the `script` `command_type` with `python` as the `tudo shell`. The `termux_tasker_basic_python_test` `python` script text is passed as the `core_script` argument with 2 complex dynamic args that may contain quotes or special characters, basically a literal string. The result is received back in the `%stdout` variable.
Template 4 runs `$PREFIX/bin/tudo --shell-pre-commands="echo 'starting tudo shell';" --title='tudo' su` in the foreground as a template for the `su` `command_type` to start an interactive `bash` shell with priority to termux binaries and libraries. The `--shell-pre-commands` option is passed to run some commands before starting the interactive `bash` shell and its argument is passed surrounded with double quotes to prevent whitespace splitting. The `--title` option is passed to set the title of the terminal. Since commands will be run in a foreground terminal session, the `%stdout`, `%stderr` and `%result` variables will not be returned and only `%err` and `%errmsg` may be returned if the action fails.
The `$PREFIX/` is a shortcut for the termux prefix directory `/data/data/com.termux/files/usr/`. The `~/` is a shortcut for the termux home directory `/data/data/com.termux/files/home/`. These shortcuts can be used in the `Executable` and the `Working Directory` plugin fields and in any path arguments to the `tudo` command. The scripts or binaries in the `~/.termux/tasker/` directory do not require them to prefixed with the full path, just set the name in the `Executable` field.
The `%command_failed` variable will be set if the plugin action failed, this is detected by whether `%err` or `%errmsg` is set by the plugin action or if `%result` does not equal `0` for background commands. If you run multiple plugin actions in the same task or are using `Local Variable Passthrough`, then you must clear the `%command_failed` variable and optionally the `%errmsg`, `%stdout`, `%stderr` and `%result` variables with the `Variable Clear` action before running each plugin action, in case they were already set, like by a previously failed plugin action after which the task was not stopped.
To debug arguments being passed or any errors, you can check `logcat` after increasing log level to `Debug`. Check `Debugging` section of `README.md` for more details.
##
**Parameters:** `-`
**Returns:** `-`
**Control:**
```
version_name: 0.1.0
```</label>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%task_name</Str>
<Str sr="arg1" ve="3">Termux Tasker Plugin Tudo Templates</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act10" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 1 Command
Failed</Str>
<Str sr="arg2" ve="3">%command_failed</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act11" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act12" ve="7">
<code>43</code>
</Action>
<Action sr="act13" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 1 Command Result</Str>
<Str sr="arg2" ve="3">stdout =
```
%stdout
```
stderr =
```
%stderr
```</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act14" ve="7">
<code>38</code>
</Action>
<Action sr="act15" ve="7">
<code>300</code>
<label>Template 1 End</label>
</Action>
<Action sr="act16" ve="7">
<code>300</code>
<label>Template 2 Start</label>
</Action>
<Action sr="act17" ve="7">
<code>135</code>
<label>Goto "Template 3 Start"
Enable this action to skip running this template</label>
<on>false</on>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">Template 3 Start</Str>
</Action>
<Action sr="act18" ve="7">
<code>300</code>
<label>Run `$PREFIX/bin/tudo -s '%core_script' '%argument_1' '%argument_2'` Command In Background</label>
</Action>
<Action sr="act19" ve="7">
<code>547</code>
<label>set `$PREFIX/bin/tudo` to %executable</label>
<Str sr="arg0" ve="3">%executable</Str>
<Str sr="arg1" ve="3">$PREFIX/bin/tudo</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act2" ve="7">
<code>300</code>
<label>Template 1 Start</label>
</Action>
<Action sr="act20" ve="7">
<code>547</code>
<label>set `termux_tasker_basic_bash_test` script text to %core_script</label>
<Str sr="arg0" ve="3">%core_script</Str>
<Str sr="arg1" ve="3">#if parameter count is not 2
if [ $# -ne 2 ]; then
echo "Invalid parameter count '$#' to 'termux_tasker_basic_bash_test'" 1>&2
echo "$*" 1>&2
exit 1
fi
echo "\$1=\`$1\`"
echo "\$2=\`$2\`"
exit 0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act21" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%argument_1</Str>
<Str sr="arg1" ve="3">json</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act22" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%argument_2</Str>
<Str sr="arg1" ve="3">{
"name":"I'm Termux",
"license":"GPLv3",
"addons": {
"1":"Termux:API",
"2":"Termux:Boot",
"3":"Termux:Float",
"4":"Termux:Styling",
"5":"Termux:Tasker",
"6":"Termux:Widget"
}
}</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act23" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%core_script</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%core_script</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act24" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%argument_1</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%argument_1</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act25" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%argument_2</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%argument_2</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act26" ve="7">
<code>547</code>
<label>set `-s '%core_script' '%argument_1' '%argument_2'` to %arguments</label>
<Str sr="arg0" ve="3">%arguments</Str>
<Str sr="arg1" ve="3">-s '%core_script' '%argument_1' '%argument_2'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act27" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%command_failed/%errmsg/%stdout/%stderr/%result</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act28" ve="7">
<code>1256900802</code>
<label>Run Termux:Tasker Plugin Command</label>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.termux.execute.arguments>%arguments</com.termux.execute.arguments>
<com.termux.execute.arguments-type>java.lang.String</com.termux.execute.arguments-type>
<com.termux.tasker.extra.EXECUTABLE>%executable</com.termux.tasker.extra.EXECUTABLE>
<com.termux.tasker.extra.EXECUTABLE-type>java.lang.String</com.termux.tasker.extra.EXECUTABLE-type>
<com.termux.tasker.extra.TERMINAL>false</com.termux.tasker.extra.TERMINAL>
<com.termux.tasker.extra.TERMINAL-type>java.lang.Boolean</com.termux.tasker.extra.TERMINAL-type>
<com.termux.tasker.extra.VERSION_CODE>4</com.termux.tasker.extra.VERSION_CODE>
<com.termux.tasker.extra.VERSION_CODE-type>java.lang.Integer</com.termux.tasker.extra.VERSION_CODE-type>
<com.termux.tasker.extra.WORKDIR></com.termux.tasker.extra.WORKDIR>
<com.termux.tasker.extra.WORKDIR-type>java.lang.String</com.termux.tasker.extra.WORKDIR-type>
<com.twofortyfouram.locale.intent.extra.BLURB>%executable %arguments</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%stdout
Standard Output
The &lt;B&gt;stdout&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%stderr
Standard Error
The &lt;B&gt;stderr&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%result
Exit Code
The &lt;B&gt;exit code&lt;/B&gt; of the command. 0 often means success and anything else is usually a failure of some sort.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.termux.tasker.extra.EXECUTABLE com.termux.execute.arguments com.termux.tasker.extra.WORKDIR</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.termux.tasker</Str>
<Str sr="arg2" ve="3">com.termux.tasker.EditConfigurationActivity</Str>
<Int sr="arg3" val="10"/>
</Action>
<Action sr="act29" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">err = `%err`
errmsg =
```
%errmsg
```
exit_code = `%result`
stdout =
```
%stdout
```
stderr =
```
%stderr
```</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<ConditionList sr="if">
<bool0>Or</bool0>
<bool1>Or</bool1>
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%errmsg</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
<Condition sr="c2" ve="3">
<lhs>%result</lhs>
<op>1</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>135</code>
<label>Goto "Template 2 Start"
Enable this action to skip running this template</label>
<on>false</on>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">Template 2 Start</Str>
</Action>
<Action sr="act30" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%command_failed</lhs>
<op>12</op>
<rhs>\%err
\%errmsg</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act31" ve="7">
<code>598</code>
<label>remove %err and %errmsg if not set</label>
<se>false</se>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">^err = `\%err`[\n]+errmsg =[\n]```[\n]\%errmsg[\n]```[\n]+</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%command_failed</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act32" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 2 Command
Failed</Str>
<Str sr="arg2" ve="3">%command_failed</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act33" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act34" ve="7">
<code>43</code>
</Action>
<Action sr="act35" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 2 Command Result</Str>
<Str sr="arg2" ve="3">stdout =
```
%stdout
```
stderr =
```
%stderr
```</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act36" ve="7">
<code>38</code>
</Action>
<Action sr="act37" ve="7">
<code>300</code>
<label>Template 2 End</label>
</Action>
<Action sr="act38" ve="7">
<code>300</code>
<label>Template 3 Start</label>
</Action>
<Action sr="act39" ve="7">
<code>135</code>
<label>Goto "Template 4 Start"
Enable this action to skip running this template</label>
<on>false</on>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">Template 4 Start</Str>
</Action>
<Action sr="act4" ve="7">
<code>300</code>
<label>Run `$PREFIX/bin/tudo getprop "ro.build.version.sdk"` Command In Background</label>
</Action>
<Action sr="act40" ve="7">
<code>300</code>
<label>Run `$PREFIX/bin/tudo -s --shell=python '%core_script' '%argument_1' '%argument_2'` Command In Background</label>
</Action>
<Action sr="act41" ve="7">
<code>547</code>
<label>set `$PREFIX/bin/tudo` to %executable</label>
<Str sr="arg0" ve="3">%executable</Str>
<Str sr="arg1" ve="3">$PREFIX/bin/tudo</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act42" ve="7">
<code>547</code>
<label>set `termux_tasker_basic_python_test` script text to %core_script</label>
<Str sr="arg0" ve="3">%core_script</Str>
<Str sr="arg1" ve="3">import sys
argv_size = len(sys.argv) - 1
# if parameter count is not 2
if argv_size != 2:
print("Invalid parameter count '%s' to 'termux_tasker_basic_python_test'" % argv_size, file=sys.stderr)
print("%s" % " ".join(sys.argv[1:]), file=sys.stderr)
sys.exit(1)
print("$1=`%s`" % sys.argv[1])
print("$2=`%s`" % sys.argv[2])
sys.exit(0)</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act43" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%argument_1</Str>
<Str sr="arg1" ve="3">json</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act44" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%argument_2</Str>
<Str sr="arg1" ve="3">{
"name":"I'm Termux",
"license":"GPLv3",
"addons": {
"1":"Termux:API",
"2":"Termux:Boot",
"3":"Termux:Float",
"4":"Termux:Styling",
"5":"Termux:Tasker",
"6":"Termux:Widget"
}
}</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act45" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%core_script</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%core_script</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act46" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%argument_1</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%argument_1</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act47" ve="7">
<code>598</code>
<label>replace all single quotes (') with ('\'')</label>
<Str sr="arg0" ve="3">%argument_2</Str>
<Str sr="arg1" ve="3">'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">'\\''</Str>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%argument_2</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act48" ve="7">
<code>547</code>
<label>set `-s --shell=python '%core_script' '%argument_1' '%argument_2'` to %arguments</label>
<Str sr="arg0" ve="3">%arguments</Str>
<Str sr="arg1" ve="3">-s --shell=python '%core_script' '%argument_1' '%argument_2'</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act49" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%command_failed/%errmsg/%stdout/%stderr/%result</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%command_failed/%errmsg/%stdout/%stderr/%result</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act50" ve="7">
<code>1256900802</code>
<label>Run Termux:Tasker Plugin Command</label>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.termux.execute.arguments>%arguments</com.termux.execute.arguments>
<com.termux.execute.arguments-type>java.lang.String</com.termux.execute.arguments-type>
<com.termux.tasker.extra.EXECUTABLE>%executable</com.termux.tasker.extra.EXECUTABLE>
<com.termux.tasker.extra.EXECUTABLE-type>java.lang.String</com.termux.tasker.extra.EXECUTABLE-type>
<com.termux.tasker.extra.TERMINAL>false</com.termux.tasker.extra.TERMINAL>
<com.termux.tasker.extra.TERMINAL-type>java.lang.Boolean</com.termux.tasker.extra.TERMINAL-type>
<com.termux.tasker.extra.VERSION_CODE>4</com.termux.tasker.extra.VERSION_CODE>
<com.termux.tasker.extra.VERSION_CODE-type>java.lang.Integer</com.termux.tasker.extra.VERSION_CODE-type>
<com.termux.tasker.extra.WORKDIR></com.termux.tasker.extra.WORKDIR>
<com.termux.tasker.extra.WORKDIR-type>java.lang.String</com.termux.tasker.extra.WORKDIR-type>
<com.twofortyfouram.locale.intent.extra.BLURB>%executable %arguments</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%stdout
Standard Output
The &lt;B&gt;stdout&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%stderr
Standard Error
The &lt;B&gt;stderr&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%result
Exit Code
The &lt;B&gt;exit code&lt;/B&gt; of the command. 0 often means success and anything else is usually a failure of some sort.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.termux.tasker.extra.EXECUTABLE com.termux.execute.arguments com.termux.tasker.extra.WORKDIR</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.termux.tasker</Str>
<Str sr="arg2" ve="3">com.termux.tasker.EditConfigurationActivity</Str>
<Int sr="arg3" val="10"/>
</Action>
<Action sr="act51" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">err = `%err`
errmsg =
```
%errmsg
```
exit_code = `%result`
stdout =
```
%stdout
```
stderr =
```
%stderr
```</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<ConditionList sr="if">
<bool0>Or</bool0>
<bool1>Or</bool1>
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%errmsg</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
<Condition sr="c2" ve="3">
<lhs>%result</lhs>
<op>1</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act52" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%command_failed</lhs>
<op>12</op>
<rhs>\%err
\%errmsg</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act53" ve="7">
<code>598</code>
<label>remove %err and %errmsg if not set</label>
<se>false</se>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">^err = `\%err`[\n]+errmsg =[\n]```[\n]\%errmsg[\n]```[\n]+</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%command_failed</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act54" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 3 Command
Failed</Str>
<Str sr="arg2" ve="3">%command_failed</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act55" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act56" ve="7">
<code>43</code>
</Action>
<Action sr="act57" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 3 Command Result</Str>
<Str sr="arg2" ve="3">stdout =
```
%stdout
```
stderr =
```
%stderr
```</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act58" ve="7">
<code>38</code>
</Action>
<Action sr="act59" ve="7">
<code>300</code>
<label>Template 3 End</label>
</Action>
<Action sr="act6" ve="7">
<code>1256900802</code>
<label>Run Termux:Tasker Plugin Command</label>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.termux.execute.arguments>getprop "ro.build.version.sdk"</com.termux.execute.arguments>
<com.termux.execute.arguments-type>java.lang.String</com.termux.execute.arguments-type>
<com.termux.tasker.extra.EXECUTABLE>$PREFIX/bin/tudo</com.termux.tasker.extra.EXECUTABLE>
<com.termux.tasker.extra.EXECUTABLE-type>java.lang.String</com.termux.tasker.extra.EXECUTABLE-type>
<com.termux.tasker.extra.TERMINAL>false</com.termux.tasker.extra.TERMINAL>
<com.termux.tasker.extra.TERMINAL-type>java.lang.Boolean</com.termux.tasker.extra.TERMINAL-type>
<com.termux.tasker.extra.VERSION_CODE>4</com.termux.tasker.extra.VERSION_CODE>
<com.termux.tasker.extra.VERSION_CODE-type>java.lang.Integer</com.termux.tasker.extra.VERSION_CODE-type>
<com.termux.tasker.extra.WORKDIR></com.termux.tasker.extra.WORKDIR>
<com.termux.tasker.extra.WORKDIR-type>java.lang.String</com.termux.tasker.extra.WORKDIR-type>
<com.twofortyfouram.locale.intent.extra.BLURB>$PREFIX/bin/tudo getprop "ro.build.version.sdk"</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%stdout
Standard Output
The &lt;B&gt;stdout&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%stderr
Standard Error
The &lt;B&gt;stderr&lt;/B&gt; of the command.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%result
Exit Code
The &lt;B&gt;exit code&lt;/B&gt; of the command. 0 often means success and anything else is usually a failure of some sort.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.termux.tasker.extra.EXECUTABLE com.termux.execute.arguments com.termux.tasker.extra.WORKDIR</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.termux.tasker</Str>
<Str sr="arg2" ve="3">com.termux.tasker.EditConfigurationActivity</Str>
<Int sr="arg3" val="10"/>
</Action>
<Action sr="act60" ve="7">
<code>300</code>
<label>Template 4 Start</label>
</Action>
<Action sr="act61" ve="7">
<code>135</code>
<label>Goto "Return"
Enable this action to skip running this template</label>
<on>false</on>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">Return</Str>
</Action>
<Action sr="act62" ve="7">
<code>300</code>
<label>Run `$PREFIX/bin/tudo --shell-pre-commands="echo 'starting tudo shell';" --title='tudo' su` Command In Foreground</label>
</Action>
<Action sr="act63" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%command_failed/%errmsg/%stdout/%stderr/%result</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act64" ve="7">
<code>1256900802</code>
<label>Run Termux:Tasker Plugin Command</label>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.termux.execute.arguments>--shell-pre-commands="echo 'starting tudo shell';" --title='tudo' su</com.termux.execute.arguments>
<com.termux.execute.arguments-type>java.lang.String</com.termux.execute.arguments-type>
<com.termux.tasker.extra.EXECUTABLE>$PREFIX/bin/tudo</com.termux.tasker.extra.EXECUTABLE>
<com.termux.tasker.extra.EXECUTABLE-type>java.lang.String</com.termux.tasker.extra.EXECUTABLE-type>
<com.termux.tasker.extra.TERMINAL>true</com.termux.tasker.extra.TERMINAL>
<com.termux.tasker.extra.TERMINAL-type>java.lang.Boolean</com.termux.tasker.extra.TERMINAL-type>
<com.termux.tasker.extra.VERSION_CODE>4</com.termux.tasker.extra.VERSION_CODE>
<com.termux.tasker.extra.VERSION_CODE-type>java.lang.Integer</com.termux.tasker.extra.VERSION_CODE-type>
<com.termux.tasker.extra.WORKDIR></com.termux.tasker.extra.WORKDIR>
<com.termux.tasker.extra.WORKDIR-type>java.lang.String</com.termux.tasker.extra.WORKDIR-type>
<com.twofortyfouram.locale.intent.extra.BLURB>$PREFIX/bin/tudo --shell-pre-commands="echo 'starting tudo s</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.termux.tasker.extra.EXECUTABLE com.termux.execute.arguments com.termux.tasker.extra.WORKDIR</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.termux.tasker</Str>
<Str sr="arg2" ve="3">com.termux.tasker.EditConfigurationActivity</Str>
<Int sr="arg3" val="10"/>
</Action>
<Action sr="act65" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">err = `%err`
errmsg =
```
%errmsg
```</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<ConditionList sr="if">
<bool0>Or</bool0>
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%errmsg</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act66" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%command_failed</lhs>
<op>12</op>
<rhs>\%err
\%errmsg</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act67" ve="7">
<code>377</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%td_button
Button
The label of the button that was clicked</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">Template 4 Command
Failed</Str>
<Str sr="arg2" ve="3">%command_failed</Str>
<Str sr="arg3" ve="3">OK</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="30"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act68" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act69" ve="7">
<code>38</code>
</Action>
<Action sr="act7" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%command_failed</Str>
<Str sr="arg1" ve="3">err = `%err`
errmsg =
```
%errmsg
```
exit_code = `%result`
stdout =