Connecting to host from Android via USB
Okay so here is the background of this problem. I commute a lot on the
train and build a lot of PHP web apps optimized for mobile devices. I
would like to develop code on a netbook (Running Ubuntu Server) with no
GUI. All development done using Vim directly on the netbook.
I would like to connect up my Nexus 4 to the netbook via USB and "connect"
to the netbooks web server in the chrome browser. I can only use USB for
this since I won't be having any reliable internet access.
I understand that using adb from the Android SDK, you can forward a port
from the netbook to the phone. However, I need to do it the other way
around.
For example:
Run a web server on the netbook on port 4000
Connect phone via USB
Somehow forward port 4000 on the phone to port 4000 on the netbook
Open chrome browser on phone and go to localhost:4000.
I am aware of the "reverse port forwarding" method that is described in
the Google docs at
https://developers.google.com/chrome-developer-tools/docs/remote-debugging.
However, this requires an installation of chrome on the netbook. I don't
want to have to install an entire GUI just for this.
No comments:
Post a Comment