termux: running termux via adb without *any* direct interaction with the device? I know how to open the termux app, run (for example) sv up sshd, and then interact with the Android device via ssh, rsync, etc. This is just an example, and the same is also true for any other termux initiated procedures.

However, to do this, it's necessary to perform that manual open and manual sv up sshd command in termux on the device itself.

I want to be able to perform that initial termux interaction from my desktop computer via adb without any direct interaction with the device itself, aside from plugging in the USB cable.

I have looked for solutions, but it seems like no one has come up with any way to interact with termux except by first actually manually opening that app on the device, which I do not want to do.

However, could I have overlooked something? I'm hoping that I indeed missed something, and that somehow I can start termux-initiated procedures via adb.

Does anyone know how that might be done?

Thank you in advance.
Per the comment by Ifran Latif, above, the following works ...

(1) launch termux

(2) do the following:

echo 'sv up sshd
sshd started' &gt;.profile


(3) run this whenever I want to start sshd via adb:

adb shell am start -n com.termux/.HomeActivity