Summary: I’ve started experimenting with Kivy, following along with this Kivy crash course. And this morning, I finally managed to get my very first Kivy app from my 64-bit Ubuntu 14.04 installation to my (newly-won, at a tech meetup) Kindle Fire, an Android device *dances happy dance*. There were quite a few installation hoops to jump through, so I’m writing them up here.
The biggest roadblock was finding updated instructions for installing
buildozer, which is the recommended way to package your Kivy python
files to an Android package (with the
.apk extension), onto Ubuntu 14.04.
The online instructions call for installing a deprecated Ubuntu package called
The solution was to follow the following instructions from Ben Rousch’s
Kivy installation scripts.
pip install buildozer.
Compiling to .apk
This step is quite easy. First run
buildozer init and modify whatever
variables you want to in the resultant
buildozer.spec file, such
as the title, package name, and version number (choose one of the two
versioning methods). If you want to see a boatload of output while the Android
package is being compiled, select
Log level = 2.
buildozer android debug. This step may take a few minutes in
the beginning as some Android SDKs will be downloaded for you.
To run these steps, you will need to rename your main Kivy script
main.py. This is the first thing launched when your app is opened.
Getting the .apk onto the Android device
The next step is to get Ubuntu to recognise your Android device when it’s plugged in! You may be lucky and have it work out of the box, but I wasn’t that fortunate. Luckily, there’s a quick fix, which is to install the MTPfs package.
Now, when you connect the Android device via the USB cable, the Android
filesystem should appear on Ubuntu. Just copy the
.apk file created
in the previous step, which will be in the
to somewhere on the device.
Lastly, open up the Easy Installer app on your Android device (I installed
it from the Kindle App Store, for free). It will locate all
on your device.
Select the one(s) you want to install and click Install. You may need
to modify a setting:
Settings > Applications > Apps from Unknown Sources should be
That’s it! Your Kivy app is installed just like any other app. You can hold
down the icon and select
Remove from device to remove it when you’re done playing with it.