How do I simulate a WiFi network using the Emulator?
Asked
Active
Viewed 4,983 times
3 Answers
1
The emulator does not emulate WiFi specifically. It emulates a generic network connection. You can use telnet commands to configure its characteristics (e.g., speed, latency).

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
You have more rep than me. Can you please edit the question and fix the title? The "Imulator" makes me cringe :) – Felix Aug 03 '10 at 20:43
0
Here is the solution I came up with for simulating total network connection loss on the emulator:
Write the following script and name it "nonetwork.sh"
netcfg eth0 down
sleep 10
netcfg eth0 up
netcfg eth0 dhcp
Upload the following script to the emulator via this command:
adb push nonetwork.sh /data/local/nonetwork.sh
Change the permissions
adb shell chmod 700 /data/local/nonetwork.sh
Run it
adb shell /data/local/nonetwork.sh
While the network is down on the device you'll lose access to adb as well but once the connection is re-established it will work again. Hope this helps.

Bellinghammer
- 185
- 3
- 9