How to List Available Android Virtual Devices (AVDs)

How to List Available Android Virtual Devices (AVDs)

30 November 2024 Stephan Petzl Leave a comment Tech-Help

When developing Android applications, testing on various devices is crucial to ensure compatibility and performance. Android Virtual Devices (AVDs) allow developers to simulate different environments on their systems. However, identifying the available AVDs can sometimes be challenging. This guide will provide you with a step-by-step approach to listing all available AVDs using command-line tools.

Using the Emulator Command

The most straightforward method to list all available AVDs is by utilizing the emulator command-line tool. This tool is part of the Android SDK and is located within the SDK’s tools directory. Follow these steps:

  • Navigate to the tools directory within your Android SDK folder. This is typically located at ${ANDROID_SDK}/tools.
  • Run the following command:
    emulator -list-avds
  • This command will output a list of all AVDs configured on your system, such as:
    Nexus_5X_API_23
    Nexus_6_API_25

Alternative Methods

If the above method does not work or if you prefer using a different approach, you can also try using the avdmanager command, which is another tool included in the Android SDK:

  • Navigate to the tools/bin directory within your Android SDK.
  • Execute the following command:
    avdmanager list avd

This command will provide a detailed list of AVDs, including their paths and configurations.

Troubleshooting

If you encounter issues while attempting to list AVDs, ensure that your Android SDK is correctly installed and that the emulator or avdmanager commands are available in your system’s PATH. For more detailed troubleshooting steps, you can refer to our Virtual Test Devices Documentation.

Enhancing Your Testing Workflow with Repeato

For developers seeking a more efficient testing process, consider using Repeato, a no-code test automation tool for iOS and Android. Repeato allows you to create, run, and maintain automated tests quickly and efficiently. It integrates seamlessly with ADB commands, enabling you to execute complex testing scenarios with ease. Learn more about how Repeato can streamline your testing workflow by visiting our Android Testing Tool page.

By leveraging these tools and methods, you can ensure a more robust and comprehensive testing strategy for your Android applications.

Like this article? there’s more where that came from!