davidawesome01
davidawesome01
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
https://github.com/ezramorris/PyVirtualSerialPorts is a good example it seams (for creating fake usb location) then just symlink from pty to specified path
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Looks like pyserial plus reimplemented usb CDC parser would be fine, then just open a pty in python for that
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Just did; I just dont think thats how I will implement it, they seam to not actualy lie, termux dose that. Termux api just send a fd that termux can then access in that subprocess (being inherited from the upper process that calls to the termux api after termux api uses
outputSocket.setFileDescriptorsForSend(fds);
outputSocket.setFileDescriptorsForSend(fds);
in
sendFd(PrintWriter out, int fd) {
sendFd(PrintWriter out, int fd) {
)
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Yeah looks like I may do this in python later then; it looks possiable on termuxapi with the returned fd from a api call; but most likely more versitial to do it this way
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
nodejs 😎
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
I understand; just asking how you would suggest I do this if I ever get there, also so I can deside how to implement it (language, and if its compiled or not)
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Should I fully implement it there, and just put a request in at the packaging system? I have never made a project like this before, nor really worked on termux, so honestly asking
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
You mean the /dev/? For almost all programs this is just the default place, but not required. I am kinda asking the same thing; should this be just a userspace package, I can make it easily in python based on a few projects?
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Thanks for the help btw
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Also, should we do this inside termuxapi, or should this just be a userprogram? beacuse it currently would work as a package requiring the usb forward function in termux api
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Last question because I am not really in on how termux dose some stuff; is there any overlay fs in /dev/ or are they just raw android /dev? If it has a overaly fs it should be easy, if not, I need to do it in a diffrent folder, prob specified by a argument
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
I just mean a pty genearted by termux and as in faking it being a usbtty; sorry if I was not clear https://man7.org/linux/man-pages/man7/pty.7.html I mean socat can make one, and that works for almost any program, so I would assume that works https://unix.stackexchange.com/questions/493572/create-pty-and-connect-it-to-a-serial-port-dev-ttyusb0
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
can we just add a fake fifo / pty object there, or do we really need LD_PRELOAD? I mean I can write a proxy for open and read.... but is there no day?
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Do you know if termux api exposes a overlay fs on the /dev folder?
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
and in most cases thats specified on the cmdline
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Most dont actualy scan for the port, they just use one in /dev/ttyUSB0 or similar
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
Will see if I have time; do we know if we can just include https://github.com/mik3y/usb-serial-for-android/tree/master as MIT code into termux or should I rewrite it? If I rewrite, can I use the MIT code (with credit) to the author in termux api? Its GPL v3 so it should be applicable
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
just not the extra features
88 replies
TTermux
Created by davidawesome01 on 4/16/2025 in #support
Usb tty usage on unrooted
and it will cover almost every device
88 replies