I have written a socket listener program for Android. In my program, I create a ServerSocket in port 1234.
However, I don’t know how to test it from my pc to emulator.
I try change proxy to 10.0.2.2 port 1234 but it not work.
Please help me!
I have written a socket listener program for Android. In my program, I create
Share
I think you could use ssh reverse tunneling to solve your problem. I haven’t tried it to solve problem like yours, but here’s the steps to do it:
run this command on Terminal IDE:
ssh [your pc ssh user]@[your pc ip] -o “GatewayPorts yes” -R [SOME_PORT]:localhost:1234
If all goes smoothly, connection to localhost with port [SOME_PORT] (the same port for command above) will actually connect to your emulator/device port 1234.