I use android studio (jetbrains) to develop application.
I try to run socket server, this is a part of code:
ServerSocket ss = new ServerSocket(9002);
Socket s = ss.accept();
There are no errors and looks like server running. I use emulator from android-studio, I run it with green button from studio user interface..
But when I scan opened ports in ubuntu terminal - there is no 9002 port. And it is not possible to connect to it outside the emulator...
Firewall is inactive..
How to do that ?