Replies: 1 comment
-
After next few hours of struggling with the matter I ended up with workaround:
this essentially open Termux console window, waits 5 seconds and |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I try to make and run phone automation shell scripts.
Tech info: Samsung Note 10 with Android 12, rooted with Magisk.
After rooting my phone my scenario is as follow:
Step 1:
I wrote simple Magisk module
Run_external_script
in whichaction.sh
invokesh "/sdcard/Documents/installation_automation_magisk.sh"
← this work fine;Step 2:
In script
installation_automation_magisk.sh
I install few Magisk.zip
modules and few.apk
s (e.g. termux.apk, termux-api.apk, termux-gui.apk) ← this work fine and all is installed correctly.Step 3:
At the end of
installation_automation_magisk.sh
(run by minimal shell from Magisk module) I want to call more "rich"/sdcard/Documents/installation_automation2_bash.sh
bash script in Termux (to install.deb
packages, display GUI, etc.). But it seems that calling command by intent doesn't work - it just open Termux console window as it would be launch from app drawer.With one whole day writing with GPT I don't found any solution.
To troubleshoot a problem I try to call even simpler intent:
I tried all variants: call directly
...RUN_COMMAND_PATH "/data/data/com.termux/files/usr/bin/echo"
, only one command like...RUN_COMMAND_ARGUMENTS "-c 'echo "Hello Termux"'
, run in backgroundtrue
, opening Termux app prior and then after 10 secs sleep run intent, etc. etc. etc. - all GPT's ideas.Of course calling intent with
bash
command and scriptinstallation_automation2_bash.sh
as argument didn't work too. Above commands show that any, evenecho
orsleep
commands are not executed by calling intent.Always result is like I would just open Termux app and there are just welcome texts in console, and any command from intent arguments aren't running.
This code snippet from RUN_COMMAND docs didn't get any output too, just opens Termux window.
What I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions