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.
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:
1 2 3 4 5 6 7 8 |
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:
1 2 |
./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:
1 |
./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.:
1 |
keytool -genkey -v -keystore cnxsoft.keystore -alias cnxsoft -keyalg RSA -keysize 2048 -validity 10000 |
And sign your app:
1 |
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.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
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!