Who downloads the downloader?

The problem

I recently had a technical issue where I needed to access an application using an Android tablet (don’t ask, just roll with it). My first line of attack was to simply try to use my Fire tablet to access the application. Apparently the fire OS has been determined to not be Android enough to qualify as Android anymore so that was a bust. I don’t really have ready access to any other Android devices, and I wasn’t going to buy one simply to address a small technical problem.

Luckily, I did some dev work on an android app a while ago, so I happen to know that the Android Studio application comes with everything you need to easily run virtual Android devices for debugging purposes. In this particular case, a virtual device is fine, I just need the application to register as talking to an android tablet. After opening my old install of studio (and waiting for it to run through updates), I was in business and set up a virtual device to test with. It only took me a few minutes to realize that the virtual device did not have the Play Store app installed.

Into the quagmire

It seemed like even a virtual device meant for testing should at least be able to connect to the play store for more complex debugging then simply running smoke tests, but Play Store simply was not there. After briefly having an existential crisis over the idea of ‘how do you download the thing that lets you download other things?’, I figured that it should be possible to download the Play Store though a browser on the very off chance that someone managed to delete it from their phone. After playing around with the Play Store webpage through a browser, which the emulator thankfully does have, (and managing to somehow download an application onto my actual phone), I wasn’t really getting anywhere.

I figure that, as with most things in life, I had done something stupid and screwed it up, so I tried searching to see if there was a simple step to get the Play Store on an emulator that I had missed. I quickly realized that, although this seems to be a common problem, the emulator is simply not designed to support using the Play Store. There were various solutions that people posed, like loading the data into the emulator file, but they were all too complex for what I though would be a simple task.

Luckily, one helpful poster on Stack Overflow noted that the most recent versions of Android studio were updated to include having the Play Store on the emulator. I hit up the site for studio and, sure enough, that was in one of there most recent news postings. I noted that there version number associated with this change was higher then the version of studio that I had installed so I went back and checked for any updates. I had the latest version and there were no updates. After reading the news store more closely (reading is fundamental, kids), I saw that the build was not yet a stable build and was part of the beta builds they publish. After monkeying with the setting in studio a bit, I discovered a section for ‘updates’ that specifically noted which types of builds you want to use. Stable did not have the build I needed, and even beta did not have it, so I turned to the every sketchy and crash-prone Dev build.

After going through the song and dance of manually grabbing the zip and extracting it (since the dev branch is meant to run separately from a regular studio build since it is crash prone), I was back in business and set up another virtual device. After several minutes of waiting for the emulation slowed device to boot, I looked around and found… that the Play Store still wasn’t there. After some more searches, I found out that only some of the devices profiles on the emulator come with the play store installed (noted by a helpful icon in a column labeled ‘Play Store’). I looked at the list of profiles and as luck would have it… not a single tablet profile has the Play Store. At the moment it seems to be limited to Android Wear and the Nexus 5 phone profiles.

In the end…

The upshot of this whole experience is that Android Studio will likely soon have a stable build that can create virtual devices with the Play Store, but it’s still under development right now and it seems to be fairly limited in the number of virtual devices it does this for at the moment. This makes my ‘simple’ technical problem a headache, but at least there will be an easy solution available long after I no longer need it.