Replies: 3 comments 20 replies
-
Hi, In the meantime if you want to do what I've described but without the SSH extensions (port forwarding, scp, etc.) you can do it now:
Regards. |
Beta Was this translation helpful? Give feedback.
-
Hi, I need more info from you. Who is setting the environment vars like SHELL, LD_PRELOAD, TERMUX_*, etc. when we open the Termux App? At time I have this data in my
And then the content of So I want to know if I can call to some script to set standard vars directly, or in contrast I need to copy the vars manually from the Termux App terminal to this file. |
Beta Was this translation helpful? Give feedback.
-
Hi @agnostic-apollo , After reading your comments at https://www.reddit.com/r/termux/comments/ynfpat/adb_shell_to_termux_directory/ However, I need you help about some questions:
Please take note that my objective is to provide another mainstream Remote Access (https://wiki.termux.com/wiki/Remote_Access) using the combination of stock ADB plus the PSUSAN protocol. |
Beta Was this translation helpful? Give feedback.
-
READ MORE: The connection problem is (partially) solved. This connection works! #2565 (reply in thread)
Hi,
I want to share with you my research about this objective:
Connect to the Termux environment from a PuTTY client, with these restrictions:
First of all why all of these restrictions?
run-as
command.Then, how you can do all of this? Here the example command:
If you don't know anything about this line, then this topic is not for you (sorry!). In any other case, let me to explain more about:
run-as
command.psusan
tool. You can install it withpkg install putty-tools
after adding the "x11" repository withpkg install x11-repo
(don't worry, even it's inside the X11 repo, you don't need to install any graphical library).plink.exe
andadb.exe
it will work as well.plink
tool. But the final goal is to use the PuTTY client, and it works identical as the command line version (tested!).And how it works?
psusan
tool inside the Termux environment. This works clean over the ADB protocol launching the tool with therun-as
mode. So it's as request. You don't need to run anything special in the device. Just access to the console. And this new tool from PuTTY it's just encapsulating the upper-layer SSH protocol without encryption over the ADB chain opened. On top of this communication you could launch terminal sessions, redirect ports and use scp commands.However, whats the problem?
-sshrawlog
) then you will see all what you type, including passwords. So it's more or less like the ancient TELNET protocol. Be aware!Event Log: Invalid packet length received
and the communication is lost.plink -ssh-connection adb -proxycmd "adb shell -e none 'run-as' 'com.termux' '/data/data/com.termux/files/usr/bin/bash' '-c' 'export SHELL=/data/data/com.termux/files/usr/bin/bash; /data/data/com.termux/files/usr/bin/psusan'"
, because I feel the default shell launched by the psusan tool is the $SHELL one. And it works, but the problem continues.The log of the communication indicates that at some point the low level RAW data interchanged over the ADB tunnel seems to be stalled. And I can't go further. So I ask if you want to help me to advance in this objective.
So please, post what you want/test/feel about this.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions