How do I disable the Internet connection in Android Emulator?
From Eclipse
To disable the Internet connection, go to Eclipse and do
menu Window -> Show view -> Other -> Android -> Devices
Now select your running emulator and again go to:
menu Window -> Show View -> Other -> Android -> Emulator Control
Now in that... set Data to Unregister from Home.
From Device and Emulator
On the device or in the emulator, go to:
Setting -> Wireless & networks -> Airplane Mode -> OK
Try the below command
WIFI:
$ adb shell svc wifi enable
$ adb shell svc wifi disable
MOBILE DATA:
$ adb shell svc data enable
$ adb shell svc data disable
You can disable the Internet connection by pressing F8 in any Android emulator. It is a toggle button, so if it doesn't have Internet connection then it will start the Internet connection and if it already has an Internet connection then it will dis-connect it.