I just recently upgraded my dark arts of Android hacking skills which I’ll like to share. I’m sure many of you have come across verification problems when converting Android apps to the BlackBerry 10, especially those apps using Google Maps, and the apps just crashed when it opens. Well, fear not for I have figured out a solution. Do note this WILL make the app unstable and crash, and this is only for testing purposes to show a proof of concept of the app running on the BlackBerry 10 device.
- Set up your Android + BlackBerry development environment. If you don’t know how to, you should not be doing this.
- Download the apk from the Google Play store.
- You will need Chrome Browser and an Android device for this.
- Go to https://lekensteyn.nl/apk-downloader/ and follow the instructions.
- Go to Google Play store in Chrome and download the apk file.
- Use apk2barVerifier and you find out several problems with the AndroidManifest.xml
- E.g. [com.abc.mobile.apk]:(AndroidManifest.xml) uses-library: com.google.android.maps:impact=4
- Oh No! What do you do now? Even if you install the generated bar file, it will crash on load.
- Download apktool and unzip – https://code.google.com/p/android-apktool/
- Decode your apk file
- ./apktool decode com.abc.mobile.apk myappdirectory
- Now you have the ENTIRE apk decoded at your fingertips! GO WILD and MODIFY! You can now modify your AndroidManifest.xml!
- (Re)Build your apk file
- ./apktool b myappdirectory com.abc.mobile-new.apk
- Sign your NEW apk file
- Follow these instructions if you haven’t created your signing key – http://developer.android.com/tools/publishing/app-signing.html
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.abc.mobile-new.apk JustinLi
- Now you have a new APK file freshly off the oven. Yummy!!
- Just do the usual apk2bar procedures, and you should now be able to run the app ignoring the com.google.android.maps library!
This is VERY useful for 3rd party libraries, and other level 4-5 warnings. Again, I emphasise, this SHOULD only be shown as a prototype for apps just to make them run, and expectations should be made clear. This process is highly illegal as you are technically modifying someone’s intellectual property, assets and calling it your own (signing).
You have been warned. Go forth and hack on!