followed their instructions about how to make port forwarding and then successfully my android device connected to make asp.net localhost project and stopped on my breaking point. I do not know, maybe this topic is already solved, but when I have tried recently do this on Windows machine, I have faced with lot of difficulties. $HOME/Android/Sdk/emulator/emulator -avd Pixel_3a_API_30_x86 > /dev/null 2>&1 Hence, a bash script to launch an Android emulator, followed by a reverse proxy, would look like this: #!/usr/bin/env bash Whereas PWA installation is not allowed from IP address 10.0.2.2.Ĭaveat: adb reverse tcp:8000 tcp:8000 needs to be reissued after each Android emulator evocation. Or 127.0.0.1:8000 will be installable and connect to its service-worker.js. 8000) of the localhost server running on your host computer and vice versa: $ adb reverse tcp:8000 tcp:8000Ī progressive web application (PWA) being served on localhost:8000
Only then, configure a reverse proxy on the bridge of the Android emulator that will forward localhost HTTP requests to the appropriate port (e.g. Start your Android emulator as usual, e.g.: $ ~/Android/Sdk/emulator/emulator -avd Pixel_3a_API_30_x86 First of all, install the Android debug bridge: $ sudo apt install adb android-sdk-platform-tools-common