Menu

Android emulator – Windows Internet issues

12th October 2018 - Development, mobile

Often, when I am developing something on Android and come back to a windows computer I haven’t used for a while, the emulator won’t connect to the internet.

It will detect the “Android Wifi”, but not the internet. Grrr

I generally do the following;

Manually disable all non-network adapters and loopbacks I may have running on the machine

Go to Network adapters and right-click disable all non-essential adapters

Open up an administrator powershell window using cmder run netstat

netstat -r -n

This will show a list of all the adapters and their routing tables. From this list I pick the actual Wifi adapter and make sure its at position 1 in the interface tables.

e.g.

Interface List
3...10 03 b5 65 30 4e ......Microsoft Wi-Fi Direct Virtual Adapter
10...12 03 b5 65 30 4d ......Microsoft Wi-Fi Direct Virtual Adapter #2
9...10 03 b5 65 30 4d ......Intel(R) Dual Band Wireless-AC 7265
1...........................Software Loopback Interface 1
===========================================================================

So, I enter the following to bump the Intel adapter to the first position of the interface table

Set-NetIPInterface –InterfaceIndex "9" –InterfaceMetric "1"

Resulting in the table looking like..

Interface List
9...10 03 b5 65 30 4d ......Intel(R) Dual Band Wireless-AC 7265
3...10 03 b5 65 30 4e ......Microsoft Wi-Fi Direct Virtual Adapter
10...12 03 b5 65 30 4d ......Microsoft Wi-Fi Direct Virtual Adapter #2
1...........................Software Loopback Interface 1
===========================================================================

Reset the DNS to globally available servers

Open up the network settings for your computers Wifi adapter and use the following DNS settings

8.8.8.8 (google dns)

208.67.222.222 (OpenDNS)

Flush the DNS

At the powershell window run

ipconfig /flushdns

Restart the Android Emulator

Everything should now connect..