Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom hardware profile with Google Play Store

I am trying to create a custom virtual device in Android Studio to emulate my Pixel 3 phone and I am having difficulty getting it to work, so I wanted to see if the steps I am using are correct or there is something better I should be doing.

I followed the answer from here and cloned the Pixel 2 profile, then manually edited it to specify the Pixel 3 dimensions, resolution, etc. I am using Android Studio 3.3.1 with the latest updates.

I am hitting two problems with that: 1) When I try to import that profile, it loses the "Play Store" setting and the newly started image doesn't have Google Play Services checked (see screenshot) 2) When I start that image it gets stuck at the "Preparing for setup phase" of what I think is the Android SDK (see screenshot)

My questions are - is what I am doing supported (or supposed to work at all) and if not, is there a better way to get a custom-sized device image with Google Play services on it?

Thanks in advance for the help!

like image 709
kaloianm Avatar asked Feb 24 '19 15:02

kaloianm


People also ask

How do I get rid of AVD?

From the Virtual tab of the Device Manager, you can perform the following operations on an existing AVD: To edit an AVD, click Edit this AVD and make your changes. To delete an AVD, click Menu and select Delete.


1 Answers

open file in: USER_HOME/.android/avd/[YOUR_AVD].avd/config.ini

and edit / add this:

PlayStore.enabled=true
image.sysdir.1=system-images\android-29\google_apis_playstore\x86\
tag.display=Google Play
tag.id=google_apis_playstore
hw.device.manufacturer=Google
hw.device.name=Nexus 5

Maybe not all required, but PlayStore.enabled and image.sysdir.1 is required. image.sysdir.1 depends on your installed Android AVD version...

like image 60
mtrakal Avatar answered Oct 16 '22 13:10

mtrakal