Posted by Steven Jenkins, Product Manager, Android Studio
Testing multi-device interaction with an Android emulator is now easier than ever. Whether you’re creating multiplayer games, expanding your mobile application across form factors, or launching virtual devices that require a device connection, Android emulators now natively support these developer experiences.
Previously, connecting multiple Android virtual devices (AVDs) together caused a lot of friction. Just connecting two emulators required manually managing complex port forwarding rules.
You can now take advantage of a new networking stack for Android emulators that brings zero-configuration peer-to-peer connectivity to all your AVDs.
Interconnecting Emulator Instances
The new networking stack for Android emulators changes the way emulators communicate. Previously, each virtual device operated on its own local area network (LAN), effectively isolating it from other AVDs. The new Wi-Fi network stack changes this by creating a shared virtual network backplane that bridges all running instances on the same host machine.
Main Benefits:
- Zero-configuration: No more manual port forwarding or ADB command scripting. AVDs on the same host appear on the same virtual network.
- Peer-to-Peer Connectivity: Important protocols like Wi-Fi Direct and Network Service Discovery (NSD) work out of the box among emulators.
- Better Stability: Addresses long-standing stability issues, such as data loss and connection drops found in legacy stacks.
- Cross-platform stability: Works equally well on Windows, macOS and Linux.
use cases
Advanced emulator networking supports a wide range of multi-device development scenarios:
- Multi-Device Apps: Test file sharing, local multiplayer gaming, or control flow between a phone and another Android device.
- continuous integration: Build robust, automated multi-device testing pipelines without layered network scripts.
- Android XR and AI specs: Easily test companion app pairing and data streaming between phone and glasses within Android Studio.
- Automotive and Wear OS: Validated connectivity flow between the mobile device and the vehicle head unit or smartwatch.
The new emulator networking stack allows multiple AVDs to share a virtual network,
Enabling direct peer-to-peer communication with zero configuration.
get started
The new networking capability is enabled by default in the latest Android emulator release (36.5), available via Android Studio SDK Manager. Simply update your emulator and launch multiple devices!
If you need to disable this feature or want to learn more, please refer to our Documentation.
As always, we appreciate any feedback. If you find any bugs or issues please file an issue. Additionally you can also become a part of our vibrant Android developer community Linkedin, medium, youtubeOr x.
