Long story short, for a local debugging setup, I need to be able to have my android phone look at localhost:80, and see my laptop’s :80 port.
This works fine with adb reverse
on unprivileged ports, and I can even do local rerouting using socat
. However, the android device seeing laptop:80 at localhost:8080 doesn’t work if it get’s redirected to localhost:80.
setup so far
I have my phone connected via USB to my laptop, and have run adb reverse tcp:8080 tcp:80
. This lets me talk to the apache server running on the laptop by opening http://localhost:8080 in a browser on my phone. However, when I try to open a given local wordpress site, it redirects from localhost:8080/path/to/wp/
to localhost/path/to/wp
. Given how much of a pain it is to get wordpress to change it’s preferred hostname/path thing, I expect it’s easier to get adb to do what I’d like.
Is it possible to get adb reverse
to reverse a privilidged port on a non-rooted phone?