Development of mobile applications for the operating system Android is impossible without a stable testing tool, such as a virtual device or an emulator. Over time, operating system versions change and new APIs and security requirements emerge, making it critical to keep your software up to date. Users often encounter a situation where standard update methods via a graphical interface do not work, or there is a need to update a specific system image, and not the entire package of tools.

The process of upgrading the emulator affects several components at once: the emulation engine itself Android Emulator, system images System Images and command line tools SDK Tools. Failure to understand the differences between these components often leads to developers updating unnecessary things or, conversely, missing critical security patches. In this article, we will analyze in detail all the ways to update components, from simply pressing a button to manually editing configuration files.

It is worth noting that the interface Android Studio is subject to frequent changes, and the location of some menu items may differ slightly depending on the IDE version. However, the logic of the package manager has remained unchanged over the past years. We will look at universal methods that work both in older versions and in the latest releases of the development environment, including the nuances of working with the command line for advanced users.

โš ๏ธ Attention: Before starting a mass update of components, make sure that you have enough free space on the system disk. System images and tools can occupy several gigabytes, and interrupted downloads due to lack of space can damage the bootloader cache.

Using SDK Manager to update components

The main tool for version control of platforms and tools in the development environment is SDK Manager. This is where all the downloadable packages are located, including updates for the emulator. To get to this menu, you need to select Tools โ†’ SDK Manager in the top menu or click on the icon with the image of the package and the down arrow on the toolbar. The interface is divided into two main tabs, each of which is responsible for its own type of content.

The first tab, usually called SDK Platforms, contains lists of Android versions for which you can download system images. If your goal is to test the application on a new version of the OS, you need to check the appropriate version and click the button Apply. However, the emulator engine itself is located in the second tab, which is called SDK Tools. This is where the component called Android Emulatoris hidden, which is directly responsible for launching virtual devices.

In the list of tools you will see the currently installed version and update status. If a new version is available, a checkbox will appear next to the component name. After checking the box and clicking the confirmation button, the process of downloading and installing new files will begin. The process may take several minutes depending on the speed of your Internet connection and the performance of the disk on which the installation is performed.

  • ๐Ÿš€ Always check the SDK Toolstab, as emulator engine updates often come separately from platform updates.
  • ๐Ÿ“ฆ Use the "Show Package Details" filter in the lower corner of the window to see everything available versions, including beta releases and pre-release builds.
  • ๐Ÿ’พ Make sure that the SDK installation path does not contain Cyrillic characters or spaces, this may cause errors when updating.
๐Ÿ“Š How do you prefer to update tools?
Via SDK Manager GUI
Via the command line sdkmanager
Automatically when you start Studio
I rarely update, I work on older versions

Manual update via the command line sdkmanager

For those developers who prefer automation or face GUI errors, there is a powerful command line tool - sdkmanager. This utility allows you to manage packages directly, bypassing the heavy graphical interface Android Studio. You can find the executable file in the directory cmdline-tools inside your SDK folder. In modern versions, the path usually looks like cmdline-tools/latest/bin.

To start updating the emulator, you need to open a terminal (Command Prompt on Windows or Terminal on macOS/Linux) and go to the directory with the utility. The command to update a specific package looks concise and clear. For example, to update only the emulator, you just need to enter the appropriate request with the update flag. The system will ask for confirmation of the action, to which you must answer in the affirmative.

sdkmanager --update"emulator"

This method is especially useful on continuous integration (CI/CD) servers that do not have a graphical interface. It also allows you to script the update process, starting it automatically before building the project. If you need to update all available packages, including platforms and build tools, you can use the flag --update without specifying a specific package name, but this will take much longer.

Where can I find sdkmanager in older versions?

In versions of Android Studio before 4.0, the utility was located in the tools/bin folder. Starting with newer versions, it has been moved to cmdline-tools/latest/bin to improve the directory structure and separate stable and beta tools.

Updating system images (System Images)

Often the question โ€œhow to update the emulatorโ€ means that users need to get a new version of Android inside the virtual device. They are responsible for this System Images. Even if you have the emulator engine installed, without a fresh system image you will not be able to test the functions of the new API. System images are also downloaded and updated via SDK Manager in the tab SDK Platforms.

When choosing the Android version to download, pay attention to the "API Level" column and image type. It is recommended to select images marked Google APIs or Google Playif your application requires Google services. Standard AOSP (Android Open Source Project) images are suitable for basic testing, but do not contain an application store and proprietary services, which can limit the functionality of the test.

After downloading a new system image, you must add it to an existing virtual device or create a new one. In the device manager (AVD Manager), you can clone an existing config, replacing the target image in it with the one you just downloaded. This allows you to save all hardware settings, such as the amount of RAM and screen resolution, but run the device on a new version of the OS.

Image type Availability of Google Play Recommended use
Default (AOSP) No Testing basic functions, pure Android
Google APIs No (services only) Testing maps, locations, Firebase without a store
Google Play Yes Full testing of commercial applications

Setting up and updating a specific AVD device

Sometimes it is not necessary to update global tools, but to modify the parameters of a specific virtual device AVD (Android Virtual Device). In the device manager, accessible through the phone icon in the toolbar, you can change the configuration of an already created emulator. Clicking on the pencil in the device line opens an editing window where you can change the system image or increase the amount of allocated memory.

It is important to understand that changing the system image in the AVD settings does not happen automatically. You need to manually select the new version from the dropdown list if it was previously downloaded through the SDK Manager. If the required version is not in the list, it means that the image has not yet been downloaded to your computer, and you need to return to the previous steps of the instructions.

Also in this menu there is a function Cold Boot Nowthat forcefully restarts the emulator, ignoring the saved state (snapshot). This is useful if, after updating components, the emulator behaves unstable or does not apply the new settings. Resetting the state often resolves problems with graphics artifacts or freezes after updating the emulation kernel.

โš ๏ธ Warning: Increasing the amount of RAM for the emulator in the AVD settings may cause memory pressure on the host machine if you have many other applications open. It is recommended not to allocate more than 50% of the total RAM of the computer.

โ˜‘๏ธ Check before updating AVD

Done: 0 / 5

Solving common errors when updating

The update process does not always go smoothly, and developers may encounter various errors. One of the most common problems is a signature verification error message or the repository is unavailable. In such cases, clearing the package manager cache often helps. To do this, you need to go to settings SDK Manager, go to the tab HTTP Proxy or simply try changing the download source, if such an option is available on your corporate network.

Another common problem is related to file permissions on the disk, especially on Linux or macOS operating systems. If the utility sdkmanager cannot write files, try running the terminal as superuser or checking the access rights to the SDK folder. In Windows, such errors can occur due to anti-virus software that blocks modification of executable files in real time.

If the emulator stops starting after the update and displays a black screen, try deleting the configuration file config.ini for a specific device and creating it again. Sometimes old settings conflict with new versions of the emulation engine. It's also worth checking to see if virtualization is enabled in your computer's BIOS, as some updates require hardware support for virtualization (VT-x or AMD-V).

๐Ÿ’ก

If the update gets stuck at a certain percentage, try disabling your antivirus during boot or using a mobile hotspot instead of a corporate network that can filter traffic.

Automation and channels updates

In the settings Android Studio you can select the channel for receiving updates: Stable, Beta, Canary or Dev. By default, a stable channel is used, which guarantees maximum reliability, but updates arrive less frequently. If you want to receive the latest emulator features before others, you can switch to the channel Canary in the menu Help โ†’ Check for Update (or the corresponding item in the update settings).

Using pre-release versions carries risks of instability, so for critical projects it is better to stay on the Stable branch. However, to test new Android features that have not yet been released, using the latest versions of the emulator from the Canary channel is a must. This allows you to adapt the application in advance to upcoming changes in the platform.

For team development, it is useful to set up a script that will check tool versions for all team members. If the developer's version of the emulator is outdated, the build may crash or tests will not run correctly. Synchronization of SDK versions and emulation tools is the key to predictable operation of the entire project.

๐Ÿ’ก

The choice of update channel (Stable vs Canary) depends on your tasks: for production use the stable version, for researching new features - Canary.

Frequently asked questions (FAQ)

Is it possible to update the emulator without updating the entire Android Studio?

Yes, this is possible and is standard practice. The emulator, build tools and platforms are controlled independently via SDK Manager. You can stay on the old version of the IDE, but use the latest emulator for testing.

Why did the emulator become slower after the update?

New versions of the emulator may require more resources or change graphics rendering algorithms. Try changing the graphics rendering method from Hardware to Software or vice versa in the AVD settings, and also make sure that you have the latest video card drivers installed.

How to roll back the emulator version if the new one works with errors?

In SDK Manager in the SDK Tools tab, check the "Show Package Details" box. Expand the list Android Emulator and select the specific previous version to install. The system will offer to replace the current version with the selected one.

Do you need to delete old system images after updating?

Not necessary, but it is advisable to save space. If you are no longer testing the application on older versions of Android (for example, Android 8 or 9), their images can be deleted via SDK Managerby unchecking the corresponding platform.

Where is the updated emulator data stored?

User device data (AVD) is stored in a separate directory, the path to which depends on OS (usually ~/.android/avd). Updating the emulator engine does not affect this data, so your applications and settings inside the emulator are preserved.