


d, the emulator targets the first device in its list. The -d flag lets you specify which of severalĬonnected devices to use as the target of a command. d flag with some common adb commands, such as For this reason, you might have to use the Note: The adb utility views the virtual device asĪn actual physical device. Partition and other storage, see the following section. To clear thisĭata, start the emulator with the -wipe-data option or wipe theĭata in the AVD Manager. In a user data disk partition ( userdata-qemu.img). The virtual device preserves the app and its state data across restarts To uninstall an app, do so as you would on an Android device. Section, using any startup options necessary. Start the emulator from the command line, as described in the previous.Build and package your app into an APK, as described in Build and run your.To use adb to install, run, and test your app, UI, you can install your app on a virtual device by using the adb utility.

In addition to installing an app through Android Studio or the emulator To stop the Android Emulator, close the emulator window. Virtual device or through your user settings in the operating You can set the environment variable in the terminal window before launching a User-specific directory where all configuration and AVD content is stored. You can override the default home directory by setting the ANDROID_SDK_HOMEĮnvironment variable that specifies the root of the Use this option to display a list of AVD names from your Android home directory. You can specify startup options when you start the emulator, but not after it has started.įor a list of AVD names, enter the following command: Users/janedoe/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_23 -netdelay none -netspeed full Here's the basic command-line syntax for starting a virtual device from aĮmulator -avd avd_name įor example, if you launch the emulator from within Android Studio running on a Mac, the defaultĬommand line will be similar to the following: Use the emulator command to start the emulator, as an alternative to This page describes command-line features that you can use with theįor information about using the Android Emulator UI, see The Android Emulator lets you develop and testĪndroid apps without using a physical device. The Android SDK includes an Android device emulator-a virtual device
