1

I was wondering is there a way to run an android websever via usb? I can find lots of wifi version of this but I would like to use this locally only while the pc is connected to the wifi and have it undetectable. eg via usb.

Does anyone know of any apps/software that this would work on?

Thanks

Paul

3
  • That's rather not a question of the app, but of the connection. You might wish to check usb tethering, which is used to establish TCP/IP over USB. See e.g. How to set up reverse tethering over USB? / How do I enable USB tethering on a JellyBean device?
    – Izzy
    Jul 20, 2014 at 17:36
  • I still think my question is phrased correctly..... I am looking for an app which I think I have found now called PAW server. However I require it to work via USB not Wifi. My question is has anyone done this? and has anyone found an app that can do this?
    – YokoBlac
    Jul 21, 2014 at 9:19
  • Again, this is not a question of "an app", but of "a connection". Given you can connect to your device using TCP/IP via USB, it doesn't much matter what app is running a web server there. But if you insist on an app, please keep in mind that questions like Is there an app for X are off topic here (see our [hepl/on-topic] for details).
    – Izzy
    Jul 21, 2014 at 10:16

1 Answer 1

1

You can use Android Debug Bridge (ADB, contained in the Android SDK) to forward the tcp connection:

adb forward tcp:8080 tcp:8080

1
  • This works perfectly fine. I had an Android device on a different WiFi network than my Linux PC - and I wanted to be able to connect to a web server running on Android (a normal Android App with an internal Java HTTP server). I was able to do the adb forward - then the browser on my Linux system I would point to 127.0.0.1:8080 - of course other ports can be proxied too. Really it works similar to a ssh port forwarding. Apr 4, 2015 at 1:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .