Sample Header Ad - 728x90

Connect ADB through SSH

2 votes
1 answer
4185 views
**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)
                       204.12.46.76             108.63.15.64  (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.
Asked by ecokjeonb (71 rep)
Sep 18, 2023, 04:43 AM
Last activity: Sep 18, 2023, 05:07 PM