Android launch emulator from command line
1. Figure out where the emulator command is installed at. Run this command to see if it’s already on the path
which emulator
If this command gives empty results, then it is not yet on the path. On a MAC, it’s usually installed at
~/Library/Android/sdk/tools/emulator
or
~/Library/Android/sdk/emulator
2. Assuming it’s installed at ~/Library/Android/sdk/emulator
, run the following command to add it to the command path.
echo "export PATH=$PATH:~/Library/Android/sdk/emulator" >> ~/.bash_profile source ~/.bash_profile
3. Show a list of available emulators
emulator -list-avds
4. It should show a list of emulators such as this
Nexus_10_API_26 Nexus_5X_API_29 Pixel_4_API_29 Tablet_Nexus_7_API_26
5. To launch the emulator named Pixel_4_API_29 from command line using the @ sign.
emulator @Pixel_4_API_29
or using the option flag -avd
emulator -avd Pixel_4_API_29
Search within Codexpedia
Custom Search
Search the entire web
Custom Search
Related Posts