Notes

Installing Google Play Store on AVD emulator devices

Edit on GitHub

Android
2 minutes

Why? Not all AVD profiles come with Play Store installed. I needed a phone with a notch, and decided on Google Pixel XL, but turns out it didn’t have Play Store installed

I found the answer on StackOverflow, and it’s pretty straight forward. Compare the config.ini file with another AVD device that does has Play Store installed and then update the one for Google Pixel XL after figuring out the change

1~/.android/avd/DEVICE_ID/config.ini

This is from the config that had Play Store installed (Pixel 3a)

1PlayStore.enabled = true
2image.sysdir.1 = system-images/android-29/google_apis_playstore/x86/
3tag.display = Google Play
4tag.id = google_apis_playstore

And this is how it was in Pixel 3 XL

1PlayStore.enabled = false
2image.sysdir.1 = system-images/android-30/google_apis/x86/
3tag.display = Google APIs
4tag.id = google_apis

Screenshot: AVD Device config.ini differeneces

All i had to do was update the config, re-download the system image and then restart the device

1PlayStore.enabled = true
2image.sysdir.1 = system-images/android-30/google_apis_playstore/x86/
3tag.display = Google Play
4tag.id = google_apis_playstore

Android Studio > Tools > AVD Manager. Click Download for your device so that it installs the system image with Google Play

Screenshot: Installing system image in AVD Manager Screenshot: Installing system image in AVD Manager Screenshot: Installing system image in AVD Manager

IF you don’t re-download the system image, you’ll likely get the following when trying to run the emulator

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

Keep in mind that even though your device will now have Play Store, the Play Store icon will not appear next to your device in Device Manager If you change PlayStore.enabled in config.ini to true, it’ll start showing the Play Store icon next to the device in AVD Manager.

Screenshot: AVD Manager before Play Store install on Google Pixel 3 XL Screenshot: AVD Manager after Play Store install on Google Pixel 3 XL

Screenshot: Google Pixel 3 XL with Play Store