Kindle Fire HD, Ubuntu and Google Apps

I just got a Kindle Fire HD for testing apps and content that we’re creating for the Kindle platform. I also have access to a Nexus 7 which is, as we should all know by now, totally awesome. With the Kindle I feel rather disconnected from the comfort of my ‘Google experience’, GMail, Play, YouTube, etc. Here’s some notes on getting started:

Transferring Files Between Kindle and Ubuntu

Wow, Amazon didn’t make this easy for Linux people. That’s pretty ironic since all Kindle devices are based on Linux and Amazon isn’t afraid to use Linux in many parts of its infrastructure and services. To be fair, this is more Google’s fault than Amazon’s since Google switched to the MTP USB protocol for Android 4.x – this screws up the plug and play file transfer with most OS’s. Amazon’s ‘help’ has this to say:

Linux users with either a Kindle Fire or Kindle Fire HD will need to install a Media Transfer Protocol (MTP) USB driver to complete USB transfers.

That’s it. Thanks for the detailed help, there. For Ubuntu and requires a, shock, horror, reboot. Some Googling found a guide to get file transfer working.

Debugging Apps

Initially, this looked like being a huge disappointment – I do everything on Ubuntu and only boot Windows if I really, really, really need too which, fortunately is about once every 6 months or so. I went to the Android SDK Manager from the Help menu in Eclipse and added the Amazon Kindle repository (http://kindle-sdk.s3.amazonaws.com/addon.xml) for installing the ADB USB debugger driver for my Ubuntu (12.04 Precise Pangolin). So far so good, save those changes, and go and browse the Extras folder for the Kindle Fire USB Driver. ‘Not compatible with Linux’. Bad Amazon, bad, bad, bad Amazon.

However, all is not lost. A post here suggests that we’re almost good to go already since I already did most of this for the MTP driver. The only extra things that I needed to do in order to get debugging going were:

  • echo 0x1949 >> ~/.android/adb_usb.ini
  • Disconnect the Kindle, go and switch on ADB in the Security section of the Kindle settings and reconnect the Kindle.

Now adb connects, Yay! We can debug and we can root. And no need for Windows.

Rooting

Rooting your Kindle HD is an essential prerequisite for getting Google’s apps installed. DISCLAIMER: if you ruin your Kindle doing this, I take no responsibility! It worked for me, it might not work for you. I used the recipe here on my Kindle delivered from France on 26 Oct 2012 – yours might be different. Different to the point that following this recipe might wreck your Kindle. OK?

Google-izing the Kindle HD

We’re almost out of Amazon’s clutches…
<rant>
Firstly, I fail at the first hurdle, installing a file manager app from the Kindle Store. Why? Because I'm an early-adopting, English-preferred-language Brit living in Spain. When I got my first Kindle I had to buy it from the US amazon.com site. Amazon UK would not deliver and didn't want anything to do with my Kindle content. Some kind of distribution rights deal rubbish. Anyway, for a few years, I've been happily using my eInk Kindle with books managed through a US amazon.com account. (A bit of a pain since all of my other Amazon business is done through Amazon UK.) Then, recently, Amazon launches in Spain. A Good Thing for me, you might think? Well, yeah, if I want to read books in Spanish, get all my apps in Spanish, shop in Spanish and abandon the English language altogether. Amazon is just as bad as Apple in this regard for support of non-local-language speaking people. Yes, I speak Spanish reasonably well, but I don't want to read books or watch films in Spanish. I'd even rather prefer not to shop in Spanish if English is available.
</rant>
I kind of followed of the instructions for Google-izing the Kindle HD here. Except I didn't use a file manager to install Vendor.apk:

adb shell

# su
# mount -o remount,rw /system
# chmod 777 /system/app
# exit
# exit

adb push Vending.apk /system/app
adb shell

# su
# cd /system/app/
# chown 0.0 Vending.apk
# chmod 644 Vending.apk
# reboot

I repeated the above, but with the AccountAndSyncSettings.apk as per here.

After rebooting, I found Android Market in the apps carousel of the mildly-frustrating, Amazon-sourced-content-obsessed Kindle HD UI. Input my Google credentials and, bingo, connected to Google and ready to download apps. GMail installed, no problems, and works fine. YouTube installed, but doesn't work at this time - I just get a blank content UI container with a swirling 'hour glass' in the middle. It looks like it's trying to talk to Google to do something, but never gets through (if you work out how to fix this before I do, please let me know). Anyway, other stuff like 'My Apps' in the Android Market app also works.

So, mostly, all good. If not a little trick