Android Emulator – Using android cmd line tools only

Today we are going to learn how to setup anroid emulator using android cmd line tools only, without install/confugring whole android studio.

What is Android Emulator?

An Android emulator allows developers to simulate Android devices on their computers, providing a virtual testing environment without needing physical hardware. Using command-line tools, developers can create and manage emulators with greater flexibility and efficiency.

To set up an emulator via the command line, the first step is to install the Android SDK tools, which include essential utilities such as avdmanager and emulator. The avdmanager command is used to create an Android Virtual Device (AVD), which emulates a specific Android device. The AVD is configured with various parameters like device type, Android version, and screen resolution.

Android website: https://developer.android.com/studio



Some useful avd & adb commands, used in this blog.

adb – Adnroid debug bridge commands
Show adv or android devices: adb devices
Connect to emulator: adb connect host:port, eg: adb connect 192.168.1.12:5555

advmanager – adv manager commands

Show available devices – avdmanager list devices
Create avd  – avdmanager create avd -n MyAVD -k “system-images;android-34;google_apis;x86_64” –device “pixel_7_pro”
List created avd – avdmanager list avd
Start avd emulator – emulator -avd MyAVD -netdelay none -netspeed full
Delete avd – avdmanager delete avd -n MyAVD
Install tools & versions – sdkmanager “platform-tools” “build-tools;34.0.0” “platforms;android-34” “system-images;android-34;google_apis;x86_64”

I hope you enjoy the video, Please let me know your questions and queries in comment section.

 

Leave a Comment