Home > Android, Ubuntu > Flappy Bird Sucks, Let’s Play Flappy Tux Instead! Or How to Modify APK Files

Flappy Bird Sucks, Let’s Play Flappy Tux Instead! Or How to Modify APK Files

February 23rd, 2014 Leave a comment Go to comments

Flappy Bird is a ridiculous fad, and I promised myself not to write about this silly game. I managed to resist when somebody showed off their Arduino powered real-life Flappy Bird, but then XDA developers mentioned one of their member posted instructions to customize Flappy Bird game. I thought it might be fun to personalize the game with pictures of friends or family members, and at the same time, learn how to hack apk files. Instead of real persons, I’ve replaced the original bird, by Tux, the official Linux mascot, flapping wings not included. Flappy_Tux

The instructions in XDA dev forums are mainly for Windows, but I’ve adapted them to Linux, and “created” “Flappy Tux” from Ubuntu 13.10. I’ll assume you’ve already installed OpenJDK and the Android SDK and have a working Android app development environment. I think we just need adb and aapt from android-sdk-linux/platform-tools/bin to be in the path.

You’ll also need to download apktool:

mkdir flappybird
cd flappybird
wget http://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2
tar xvf apktool1.5.2.tar.bz2.1
wget http://android-apktool.googlecode.com/files/apktool-install-linux-r05-ibot.tar.bz2
tar xvf apktool-install-linux-r05-ibot.tar.bz2
cp apktool1.5.2/apktool.jar .
cp apktool-install-linux-r05-ibot/apktool .

as well as the original Flappy Bird apk.

You are now ready to install the framework file and create a workspace from the apk:

./apktool if Original\ FlappyBird.apk
./apktool d Original\ FlappyBird.apk workspace

Time for a little work in gimp, or other graphics editing software, to modify the game graphics and strings:

  • workspace/assets/gfx/atlas.png – The game sprite, where you’ll need to change about 10 flappy birds image with your own creation, and modify the title
  • workspace/res/drawable/splash.png – The splash screen
  • workspace/res/drawable-xxx/ic_launcher.png – App Icon for different resolutions / pixel densities.
  • workspace/res/values/strings.xml – File contains the strings used for the game. and you can change the name of the game, e.g.  “Flappy Bird” to “Flash Tux”. This will show under the app icon

After you’re happy with the modifications, you can recompile the app:

./apktool b workspace flappytux.apk

At first, this failed for me, as aapt was not in the path. I copied it to /usr/bin

You’ll also need to sign the apk, or Android will refuse to install it. First generate a keystore, e.g.:

keytool -genkey -v -keystore cnxsoft.keystore -alias cnxsoft -keyalg RSA -keysize 2048 -validity 10000

And sign your app:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore cnxsoft.keystore flappytux.apk cnxsoft

Copy flappytux.apk to your device, install it and have fun.

You can also just download flappytux.apk if you just want to try it out.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Categories: Android, Ubuntu Tags: Android, apk, how-to, tutorial, ubuntu
  1. March 3rd, 2014 at 20:49 | #1

    Hi,
    I made a “real” Flappy Tux with the artworks from SuperTux and with flapping wings :) It’s running on Windows, Mac and Linux and can be found on my homepage.

    http://www.tuxinator.bplaced.de/

    Enjoy!

  1. No trackbacks yet.