emulator
Run Android emulator instances
TLDR
Start an Android emulator device
Display the webcams on your development computer that are available for emulation
Start an emulator overriding the facing back camera setting (use -camera-front for front camera)
Start an emulator, with a maximum network speed
Start an emulator with network latency
Start an emulator, making all TCP connections through a specified HTTP/HTTPS proxy (port number is required)
Start an emulator with a given SD card partition image file
Display help
SYNOPSIS
emulator [options] @
emulator [options] -avd
PARAMETERS
-avd
Specifies the name of the Android Virtual Device (AVD) to launch. This is the primary way to select which virtual device to run. For example, -avd Pixel_3a_API_30.
-port
Sets the console port for the emulator instance. Useful when running multiple emulator instances simultaneously. Defaults to 5554 for the first instance.
-gpu
Configures the graphics emulation mode. Common values include auto (default), host (uses host GPU directly), or swiftshader (software rendering via SwiftShader).
-wipe-data
Erases user data and cache for the specified AVD, performing a factory reset. The AVD will start as if it were a brand new device.
-no-snapshot-load
Prevents the emulator from loading the last saved snapshot state on startup, ensuring a clean boot from the AVD's initial state.
-no-snapshot-save
Disables saving the current state as a snapshot when the emulator is closed. The emulator will always boot from its initial state or the last explicitly saved snapshot.
-writable-system
Makes the system partition writable, which is useful for advanced debugging, modifying system files, or making persistent changes to the system image during development.
-verbose
Enables verbose output, printing detailed log messages to the console during the emulator's startup and operation, helpful for troubleshooting.
-help
Displays a comprehensive list of all available command-line options and their descriptions, then exits.
DESCRIPTION
The emulator command launches the Android Emulator, a powerful tool provided by Google as a core component of the Android SDK. It allows developers and users to run Android Virtual Devices (AVDs) directly on their desktop, simulating various Android phones, tablets, Wear OS devices, and more. This is an indispensable tool for Android app development, enabling comprehensive testing and debugging across diverse Android versions, screen sizes, hardware configurations, and API levels without needing physical devices.
The emulator supports virtualized hardware components such as GPS location, camera, network connectivity, sensors, and battery levels, providing a realistic environment for testing applications. It leverages underlying virtualization technologies to deliver a faithful Android experience, accelerating development cycles and ensuring app compatibility.
CAVEATS
The emulator command is specific to the Android development environment. It requires the Android SDK to be installed and properly configured, including an Android Virtual Device (AVD) created via Android Studio or the avdmanager. It is a resource-intensive application, demanding significant RAM and CPU, particularly for modern Android versions and complex apps. Users should ensure their system has adequate resources and hardware acceleration (like Intel HAXM or KVM) configured for optimal performance. It is designed exclusively for Android emulation and is not a general-purpose operating system emulator like QEMU or VirtualBox.
ANDROID VIRTUAL DEVICES (AVDS)
Before you can launch the emulator, you must create an AVD. An AVD is a configuration that defines the characteristics of the Android device you want to simulate, including its hardware profile (e.g., screen size, RAM), system image (the specific Android version and API level), and storage settings. AVDs are managed via Android Studio's AVD Manager or the command-line tool avdmanager.
HARDWARE ACCELERATION FOR PERFORMANCE
For optimal performance, the Android Emulator heavily relies on hardware acceleration. On Intel CPUs, this is typically provided by Intel HAXM (Hardware Accelerated Execution Manager) on Windows and macOS. On Linux, KVM (Kernel-based Virtual Machine) is used. Ensuring these virtualization technologies are correctly installed and enabled in your system's BIOS/UEFI settings and operating system is crucial for a smooth and responsive emulation experience, otherwise, the emulator can be very slow.
HISTORY
The emulator command has been a fundamental component of the Android SDK since its nascent stages, evolving significantly alongside the Android operating system itself. Initially built upon a heavily modified version of QEMU, it has undergone continuous improvements focused on performance, graphics rendering accuracy (e.g., through hardware acceleration via HAXM on Intel CPUs or KVM on Linux), and deeper integration with Android Studio and other development tools. Its development trajectory mirrors the increasing complexity and demands of modern Android app development, striving to provide a fast, accurate, and feature-rich testing environment for the diverse Android ecosystem.
SEE ALSO
adb(1), avdmanager(1), sdkmanager(1), qemu(1)