Installing Google Play on your Amazon Fire Tablet
07 Dec 2018 - Nic Ho Chee
I've been looking for a nice, cheap tablet which I could use in kiosk mode, and give out at Comic Cons to folks who might be interested in the Bedtime Comics biweekly comics newsletter. With GDPR now in place, users need to be able to opt into mailing lists and have much more granular control over how they can be contacted. Paper and pencil signup sheets don't really cut it any more, and an app running on a tablet will make sign-up cleaner, more readable, and legal should you use someone like Mailchimp's GDPR compliant webforms correctly. The Amazon Fire looked like the perfect device for this, both cheap, sturdy, and basically running Android. It turns out that it doesn't have support for the Google Play store out of the box, which I needed to install the required kiosk software... but you can get it running if you want it.
These steps outline how I managed to get the Google Play Store running on the Amazon Fire, using an Apple Mac...
- Install Android Studio. This is required to run the tool, adb, which allows various apks to be patched on the Amazon Fire.
- The APKs needed are available across the web on various sites, but I wouldn't trust an APK from a 3rd party site. Google allows the download of official Google Android images for a variety of phones. The required APKs can be sourced from these. The latest Amazon Fire 8 HD is compatible with Android 7.1.1/7.1.2, so 7.1.1 (NOF27D, Apr 2017) or newer works.
- Essentially, you extract the system image, mount the image and dig through it to find the various APKs required. This blog post outlines everything you need to know to achieve this. OSXFuse, ext4fuse and ImgTool were needed. Luckily there are links to code repos which allow all the tools to be compiled from source as required.
- Download and build imgtool. It has a makefile with a "make all" configuration. I found twelve warnings, but the tool works.
- Poke through your nexus image and find the system.img file... then extract in terminal with:
- You should have a subfolder called extracted which contains a large image.img file. It takes a while to create this, after which you can mount it with the command below (assuming you don't already have another Linux volume on your macbook/mac...):
- You can cd into the new readonly Linux volume you've created, and you need to find the following apks
- Connect your Amazon Fire via USB, and open a new terminal so that you can turn on logging for the device. I managed to catch myself trying to install PhoneSky.apk rather than Phonesky.apk... case-sensitivity FTW! In the new terminal start logcat (assuming you've installed Android Studio to its default location.)
- In your main terminal, add the trace variable and check your environment to make sure it is set.
- Check the list of packages to get a feel for what has been installed already.
- Install the following APKs using adb.
- I put Chrome on there too as a test to check that the installation path was working.
- Turn your device off and on again to get the new tiles for the Google Play Store and Chrome.
- Unmount the Linux volume added previously. My command line was...
This enabled me to install my Kiosk software of choice, and with various Child Mode settings on, it works well as a newsletter signup device.