How can I connect ADB on remote server through SSH to a local, non-rooted Android devices without installing anything on the middleman with root?
This is what I want to achieve:
┌─────────┐ SSH through internet │ Physical│ USB cable ┌────────┐ (outside LAN) ┌────────┐ │ Android ├───────────►│ Laptop ├──────────────►│ Cloud │ │ device │ └────────┘ │ server | └─────────┘ └────────┘ 192.168.0.5 192.168.0.7 (internal IP address) 184.108.40.206 220.127.116.11 (public IP address)
The one in the middle must not install any software with root/
sudo. The laptop and server are both running Ubuntu 22.04.
From Android device to laptop, I can use the physical USB cable. From laptop to cloud server, I can use local SSH port forwarding (ADB uses port 5037). However, I do not know how to go from "physical USB cable" to "port 5037".
I include the relevant (fake) internal and external IP addresses for demonstration only.