Is it possible to run termux commands through Activity Starter?

Those services have been used in Termux app and caller app need not to declare any of those.

Maybe this will work:
com.sunny.IntentStarter.aix (12.7 KB)

Tried this:

Error 601 no corresponding activity

You should either use StartService or StartForegroundService method.

Same error, unfortunately.

Is it really possible to use an IntentService / ForegroundService without declaring any service in the Manifest?

Yes, as long as those services belong to other apps.
In fact you don't have to use those services and only have to start them with appropriate extras.

I am getting following error:

I/IntentStarter(27431): Adding extra, key = com.termux.RUN_COMMAND_PATH value = /data/data/com.termux/files/usr/bin/ls

I/IntentStarter(27431): Adding extra string, key = com.termux.RUN_COMMAND_PATH value = /data/data/com.termux/files/usr/bin/ls

I/IntentStarter(27431): Adding value as String

I/IntentStarter(27431): Adding extra, key = com.termux.RUN_COMMAND_WORKDIR value = /data/data/com.termux/files/home

I/IntentStarter(27431): Adding extra string, key = com.termux.RUN_COMMAND_WORKDIR value = /data/data/com.termux/files/home

I/IntentStarter(27431): Adding value as String

W/ActivityManager(  512): Unable to start service Intent { act=com.termux.RUN_COMMAND cmp=com.termux/.app.RunCommandService (has extras) } U=0: not found

Found a similar issue:

1 Like

Hello Everyone ! In this profile I'm sharing some of my works and experience About cybersecurity and Linux commands. [https://www.termuxcommands.com/]