Archive for the ‘Android’ Category.

Sideloading Google Play apps onto a Kindle Fire

I recently turned 30. My wonderful wife and mother got together and purchased a Kindle Fire tablet for me to go along with the Samsung Captivate Android phone I currently own. While some apps are better on the tablet than the phone, there are some I like to have on both like TinyShark. Sadly, not all apps available in Google Play are available in the Amazon App Store and there’s no easy way to get access to the former from a Kindle without rooting it. So, I did some digging and managed to find an alternate way to sideload them, no rooting required.

Obligatory disclaimer: I’m not responsible for any damage that might occur by following these instructions. Use them at your own risk. Also, be aware that being able to install an app from Google Play onto a Kindle doesn’t mean that the app will work on the Kindle. (An example of this is the app for Google Play itself, which immediately dies when you try to run it.) This is due to any number of differences in hardware, Android implementations, etc.

Here’s what you’ll need:

  • A Kindle Fire
  • An Android device* with access to Google Play, like my Captivate
  • A computer with the Android SDK installed

* It’s possible that an emulator run using the SDK can be used in place of an actual device.

On the Android device, install whatever app you want to sideload onto your Kindle, then go to Settings > Applications > Development and check the USB debugging option. Now hook the Android device to the computer with a micro USB cable.

On the computer, open up a terminal and go to the platform-tools subdirectory within the SDK directory. Run this command (which I got from this post), which uses the adb utility:

adb shell pm list packages -f

Each line of the command’s output will be in this format:

package:[path]=[namespace]

Open up a web browser and go to the page on Google Play for the app you want to sideload. The URL of that page will look like https://play.google.com/store/apps/details?id=[namespace] where [namespace] will match the [namespace] portion of a line from the command’s output. Note the corresponding [path] portion of this line.

Now go back to the terminal and run this command, substituting the path you found for [path]:

adb pull [path]

This will copy the APK file from the Android device to the computer.

Unplug the micro USB cable from the Android device and plug it into the Kindle. You may need to disconnect and reconnect the computer’s end of the cable to allow it to mount the Kindle as a storage device, which should happen automatically.

On the Kindle, hit the gear icon on the top right, select More > Device, and make sure Allow Installation of Applications From Unknown Sources is turned on. Now hit the Home button at the bottom of the screen, then Apps near the top, then Store on the top right. Search for and install the ES File Explorer app.

From the computer, use a filesystem browser to access the mounted Kindle storage and copy the APK file from the computer to a directory on the Kindle. I used the Documents directory.

Back on the Kindle, open the newly-installed ES File Explorer. It should give you access to the directory on the Kindle where you copied the APK file and allow you to open and install it.

Open your sideloaded app on your Kindle and enjoy it!

Update #1, 3/28/12: This post was linked in the PCWorld article “Get More Out of Your Kindle Fire Tablet: Five Tips.” It’s got some good information and I recommend giving it a read.

Update #2, 9/10/12: Forbes contributing author Adrian Kingsley-Hughes linked this post in his own post “Something Everyone Should Know Before Pre-Ordering a Kindle Fire HD.”

Update #3, 10/3/12: ereaderguides on YouTube published a video guide on installing third-party apps on the Kindle Fire HD and linked to this post in the video description.

Update #4, 10/26/12: Spiegel Online, a German news source, linked to this post from their review of a Kindle Fire HD.

Update #5, 12/26/12: This post got nearly 1,200 hits on 12/25, presumably from those gifted a Kindle Fire for Christmas. Also, Ars Technica posted a nice write-up of getting Google’s stock set of apps onto a Kindle Fire HD.

Android Emulator Can’t Find AVD

I ran into a small gotcha recently when creating a new Android project in Eclipse. The first time I went to run it on an AVD, I received an error in the console output:

[2011-08-09 19:14:46 - Emulator] emulator: ERROR: unknown virtual device name: 'avd'
[2011-08-09 19:14:46 - Emulator] emulator: could not find virtual device named 'avd'

The first few results in Google didn’t turn up any useful information. The culprit turned out to be buried in the Eclipse UI.

  1. If the Package Explorer view isn’t already active, activate it by selecting Window > Show View > Package Explorer.
  2. In the Package Explorer view, right-click on your project and select Run As > Run Configurations.
  3. In the right half of the Run Configurations window, select the small Target tab.
  4. On the far right side of the window, use the scrollbar to scroll to the bottom of the Target tab’s contents.
  5. Find the text box labeled Additional Emulator Command Line Options. It probably has a value like this: -cpu-delay 0 -no-boot-anim -avd avd.
  6. Change the value of the text box to look like -cpu-delay 0 -no-boot-anim -avd AVD Name where AVD Name (which defaults to simply avd) is the name of the AVD you’ve created for this project. In other words, if you open the Android SDK and AVD Manager window (Window > Android SDK and AVD Manager), the value you should use in place of AVD Name within this text box is the same value that appears in the AVD Name column of that window for the desired AVD. So, if your AVD is named MyProjectAVD, the value of the text box should be -cpu-delay 0 -no-boot-anim -avd MyProjectAVD.

Lafayette Traffic for Android Now Available!

I’ve been exploring Android development for the first time since about two weeks ago. Rather than simply puttering around with examples (though some were useful as I was learning), I decided that I would attempt to create an Android port of an existing iPhone application created by my friend Ryan Farnell. His application provides traffic information for our mutual local geographical area of Lafayette, Louisiana and the surrounding cities. He was gracious enough to provide information on his application’s data sources, which both of our applications now use: city traffic camera feeds and traffic incident reports.

Suffice it to say, I’ve learned a decent amount about Android development in these past few weeks that probably merits a post of its own, which I hope to write soon. For now, I just wanted to announce that I’ve published my application in the Android Market. You can download it free of charge, though I am also taking donations if you’d like to contribute to its future development. I’ve also published its source code on GitHub, which you can find in its repository. Bugs and feature suggestions can be submitted there.