ADB access to remote server from local usb
I have a VPS server where I’m compiling CyanogenMod and some android kernels. To compile CyanogenMod we need to pull some vendor specific “prebuilts” i.e. binaries. Connecting the server to the device connected to my laptop is actually quite trivial.
First we put adb in TCP/IP mode
adb tcpip 8001
Then, let’s forward the that same port to the laptop
adb forward tcp:8001 tcp:8001
Connect to the phone
adb connect localhost:8001
Then finally, we forward the local port to the server
ssh -R localhost:8001:localhost:8001 <server_host>
This command simply does a reverse tunnel. Back on the server we simply connect to the port on localhost again
adb connect localhost:8001
And viola! Pretty simple :D
Recent Blog Posts
- 13 Apr 2026 Your intuition of LLM token usage might be wrong
- 11 Feb 2026 Locust Load Testing and Markov Chains
- 20 Jan 2026 I love the old man minimap in VS Code
- 03 Jan 2026 On Resurrecting a 12 year old blog
- 09 Oct 2014 Updating a forked Git repo
- 06 Oct 2014 ADB access to remote server from local usb
- 30 Mar 2014 Bug Progress: Day 2
- 27 Mar 2014 Building the Emulator
- 11 Mar 2014 Simple Notes: Edit Notes
- 10 Mar 2014 Simple Notes: Hidden Notes Fix