If I accidentally press F8 key while Android emulator has the keyboard focus, it looses Internet connection as this is the “toggle cell network” keyboard shortcut. That’s fine, press F8 again and Internet is up again in the emulator, but its connection to adb is lost. The only way to recover is to shut-down the emulator and restart it. Same thing happens if I select “airplane mode” in an emulator, then exit the airplane mode.
It’s easy for me to press accidentally F8, as it’s a “step over” debugger key in IntelliJ Idea environment that I use. I know I can change keyboard shortcut in idea, so don’t send me this answer… Another reason to use F8 or airplane mode on/off is that sometimes Internet connection dies in an emulator, and toggling the airplane mode restores it – but adb connection is dead…
Will appreciate any help with this, or help with logging a bug to Google developers to fix this issue, if we can’t find a good work-around.
Greg
I think I found the answer. After pressing F8 again to re-enable Internet access in the emulator, it is enough to execute:
adb kill-server
on my PC, then use adb start-server or just any other adb command and it restores the connection to the emulator. Great!
It would be nice to change the F8 key in the emulator to something else to avoid conflict with IntelliJ Idea environment, or disable it completely.
Greg