DEV Community

Tulio Calil
Tulio Calil

Posted on

6

How to Open Android emulator without Android Studio

Let's see how to open Android Virtual Device (AVD) directly from the terminal without opening Android Studio!

First, we need to get our Android SDK location, here is a link to help you find it. For me (MacOS) is: /Users/<user>/Library/Android/sdk.

Now Open the .rc file in your favorite editor:

# if you use ZSH
nano ~/.zshrc
# if you use BASH
nano ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Add this line at the final of the file (your Android SDK path with a /emulator:$PATH at the end):

  export PATH="/Users/<your-user-name>/Library/Android/sdk/emulator:$PATH"
Enter fullscreen mode Exit fullscreen mode

Save the file and go back to the terminal and reload the new configuration:

source ~/.zshrc
#or
source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Now you can get it running from any location:

emulator -avd EmulatorName
Enter fullscreen mode Exit fullscreen mode

To see all available emulators just run: emulator -list-avds.

Like this? Check my blog!
Follow me on Twitter

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

Top comments (0)

Sentry mobile image

Mobile Vitals: A first step to Faster Apps

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read the guide

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay