Table of contents

No internet on Android emulator

Android Sep 14, 2021 Viewed 38 Comments 0


On macOS 10.15.5, I start the Android emulator from the command line.

% emulator -avd Pixel_XL_API_30

I found that the emulator cannot access the network, but my computer can. And it can be accessed by IP address. Use adb shell to enter the emulator system and run the ping command to test the internat.

% adb shell
generic_x86_arm:/ $ ping
generic_x86_arm:/ $ ping


With the simulator command, add the -dns-server option, which the emulated system will use this DNS server(s).

% emulator -avd Pixel_XL_API_30 -dns-server,
Updated Sep 14, 2021