How to downgrade Android Emulator
Asked Answered
L

3

32

With Android Studio's Android Emulator I'm seeing a problem displaying a complex WebGL-enabled graphics web page in a Java WebView widget (PixiJS demos appear blank in WebView on Android emulator). But I can only reproduce the problem with Android Emulator 27.1.12-4623001. It runs fine for my colleagues running Android Emulator 26.1.4-4266726.

How can I downgrade my Android Emulator from 27.1.12-4623001 to 26.1.4-4266726? I use Android Studio 3.0.1 (so does one of my colleagues though but her Android Studio still has Android Emulator 26.1.4-4266726. I'm also on Mac with High Sierra.

I looked on the Android Emulator Release Notes page but I don't see instructions on how to downgrade old versions. I did try downgrading Android Studio itself but even when I installed Android Studio 2.2.3, the emulator was still 27.1.12-4623001. I even deleted Android Studio 3.0.1 by following How to completely uninstall Android Studio?.

What version of the Android Emulator do I have?

Three methods:

  1. Launch the emulator, tap "..." on the right-hand side panel, click Help > About.
  2. Go to Android Studio > Preferences, search for "Android SDK", click "SDK Tools", and then scroll to Android Emulator.
  3. On Mac, go to Terminal and run ~/Library/Android/sdk/emulator/emulator -version
Latent answered 5/3, 2018 at 22:56 Comment(3)
Don't you think its a better idea to make it work with the current tools/emulators? Because if the problem is in the emulator, it may also be on devices.Sphinx
That's possible, of course, but seeing as how the emulator is supposed to emulate a particular Android API version, since the Android API version hasn't changed, it appears to be a problem isolated to the emulator.Latent
Do realize that since Android 5.0 the System WebView can be updated in the Play store so depending on specific emulator builds is limited at best. Also the emulator build may be dependent on SDK version (not the Intellij Android Studio version)Huan
L
30

Google support said I could download old Android Emulator versions as follows:

http://dl.google.com/android/repository/emulator-darwin-4266726.zip (for Mac) http://dl.google.com/android/repository/emulator-windows-4266726.zip http://dl.google.com/android/repository/emulator-linux-4266726.zip

Basically, just put the # (the one in major.minor.patch-#) along with darwin/windows/linux if you'd like to download any previous build.

To install on my Mac computer, I did as follows:

  1. Download http://dl.google.com/android/repository/emulator-darwin-4266726.zip via Chrome into ~/Downloads

  2. Backup the main emulator directory: mv ~/Library/Android/sdk/emulator ~/Downloads/emulator-backup

  3. Replace the main emulator directory: mv ~/Downloads/emulator ~/Library/Android/sdk/

  4. Copy the package.xml file from your previous emulator folder to the new folder, as per the comment by user mhsmith.

  5. Restart Android Studio

After that, the Android Emulator version was downgraded to 26.1.4-4266726.

Latent answered 14/3, 2018 at 17:38 Comment(20)
Where can you find the existing combinations of major.minor.path?Esurient
@Esurient one source is the release notes page for the Android Emulator: developer.android.com/studio/releases/emulatorLatent
But for instance... how do you know that 26.1.4 was equivalent to 4266726? That's the mapping that I'm having a hard time to grasp.Esurient
I'm not sure if Google publishes a translation between Android emulator version number and Android emulator build number. If you want a particular Android emulator version number, I would just pick an old Android emulator build number and, following instructions 1-4 above to install it, run the Android emulator, go to extended controls for the Android emulator, click Help, click About, and look at the Emulator version, for example 26.1.4-4266726. That tells you the build number 4266726 corresponds to 26.1.4. That's the only way I can think of.Latent
I never thought of that. Sounds doable. I will give that a try. Thanks.Esurient
@Esurient you and also get the mapping with $ANDROID_HOME/emulator/emulator -versionConstitutionally
Michael, ic from the link u got it working. BTW: how did u contact google support? I'm trying to navigate the maze of dependencies between emulators, SDK's and system images for an integration test on travisConstitutionally
AFAIK, the emulator command has a dependency in the system images present. For example, here is a test on travis of the same emulator command (version 27.3.10) that works sometimes, and doesn't other times, depending on which system image is installed: travis-ci.org/mmcc007/test_emulatorsConstitutionally
@Constitutionally here is where I contacted Google support issuetracker.google.com/issues/74175332. I am not sure if you'll be able to see the ticket when you login. But, in general, I think you can file tickets with Google at issuetracker.google.comLatent
@MichaelOsofsky how can I get this emulator release for windows 28.0.25 (March 29, 2019). I just cant figure out how you got those numbers.Fraternity
@Fraternity did you see my comment #49121354Latent
@MichaelOsofsky I have read it several times but this statement " I would just pick an old Android emulator build number" confuses me. I just have the emulator I want to get rid off. So where I can get build number of the one I want 28.0.25.Fraternity
@Fraternity You can download 28.0.25 here: dl.google.com/android/repository/emulator-windows-5395263.zip or here dl.google.com/android/repository/emulator-linux-5395263.zipPashto
@Fraternity I agree, my suggestion no longer makes sense. When I wrote it, maybe it was possible to see directory listing of dl.google.com/android/repository but it's not now. I think the only way might be to contact Google support. They responded to my inquiry within a week if I remember correctly. Another approach could be to search for the string "dl.google.com/android/repository/emulator" because someone else may know the build number. Or you could use a web scraper to test for every possible build number and download it.Latent
If you go to issuetracker.google.com and search for the desired version (e.g. "28.0.25", you'll probably find issue reports which contain the build number.Sniggle
I had to preserve the existing package.xml as mentioned here. Otherwise, Android Studio refused to believe that the emulator was installed.Sniggle
By the way downgrading to emulator v26 is the only way to run Android arm64v8 abi images on windows. Emulator v29 just crashes silently.Ivar
30.5.3 stopped working on Mac OS Sierra. Link to 30.4.4: dl.google.com/android/repository/…Pauli
Precision on windows: - Download the old version from the link above - Backup the ..AppData\Local\Android\Sdk\emulator folder - Remove this folder - Unzip the folder downloaded, replace the breaking one - Add the old package.xml file. Without this it won't be recognized, and you will have "emulator is not installed"Footstool
all the links are dead see latest answer for new linkTeleview
K
12

For someone that still needing, this page contains all the versions and instructions:

https://developer.android.com/studio/emulator_archive

Ketchan answered 15/8, 2022 at 20:17 Comment(2)
Finding these old emulators when a new update breaks is a real hassle without this link. Thanks!Zielinski
I had this problem this week, the update was broken i lost a few days trying ARG.. I'm glad is helpful.Ketchan
M
5
  1. Download an older version of emulator from emulator-windows-5395263.zip and replace it with the existing emulator in ..AppData\Local\Android\Sdk\emulator.
  2. Restart the Android studio and in terminal run the following command emulator -avd avd_name -gpu mode, and this will initialize emulator. Mode can be host, guest.. etc For more clarification visit the following link
Maggi answered 1/10, 2020 at 11:26 Comment(2)
Where we get emulator windows versions ?Anjanetteanjela
all the links are dead see latest answerTeleview

© 2022 - 2024 — McMap. All rights reserved.