Moving default AVD configuration folder (.android)

I've found the answer.

  • Move .android folder to E:\Android
  • Create environment variable called ANDROID_SDK_HOME and set its value to E:\Android

Setting the environment variable on Windows XP or Windows 7:

  1. Right-click on My Computer and choose "Properties"
  2. Click the "Advanced" tab
  3. Click the button "Environment Variables".
  4. Add New variable

By default, the emulator stores configuration files under $HOME/.android/ and AVD data under $HOME/.android/avd/. You can override the defaults by setting the following environment variables.

The emulator searches the avd directory in the order of the values in $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/.android/avd/, and $HOME/.android/avd/.

This page provides the list of environmental variables supported by android studio: https://developer.android.com/studio/command-line/variables


The path set in ANDROID_SDK_HOME must exist. Otherwise the default path will be chosen. But it is not necessary to include .android. The AVD Manager creates a .android folder, if not found in ANDROID_SDK_HOME.


If you go for this answer be aware of this note: Starting with Android Studio 4.2, the ANDROID_SDK_HOME environment variable is deprecated and has been replaced with ANDROID_PREFS_ROOT.