List AVDs from command-line

Pre-requisite;

  1. Make sure JAVA_HOME variable is set.
  2. Make sure ANDROID_HOME variable is set as well.
  3. Add path to your android emulator to the PATH environment variable eg. C:\Users\Asmaliza\AppData\Local\Android\Sdk\emulator

Now launch your command prompt and type below command to list all available avds on your local machine.

emulator -list-avds

If you do have any running avds, you will get something like below.

To start the avd from command line, type below command.

emulator -avd Pixel_3a_XL_API_28

If the avd can be successfully started, you will get the emulator displayed (below)

To stop the Android Emulator, just close the emulator window.