Build Wordpress, Telegram, K9 Mails and ownCloud on Android 8.1.0

2 minute read

I am doing some research on the workloads of SQLite, the de facto database for Android, on mobile devices. And at the beginning, I wanted to write a wrapper for and trace all relevant transactions. The amount of code refactoring is too huge for me to finish on my own. Then I tried the official SQLite android package on their website. Same problem here since all these open-source applications use SQLite in their OWN WEIRD WAYS. It takes an eternity for me to figure out how to port the package. The only way out, as I could see at that time, is to modify the Android kernel code, build it from source and flash it to my testbed, a used Nexus 6p succeeded by Xiaomi Mix, which is a great phone by the way. And that is how my last post came out.

Recently I just know the AOSP version on my Nexus 6p could see the debug log messages, while I don’t think it would work on the factory image. Now I could just build those open-source applications on Android studio and see all these loggings! After all these strugglings there seems to be finally a way out. During my experimental builds on those applications I found out the setup guides for those applications are not very straightforward and decided to mark some of the tips down here.

  1. Wordpress
    1. Wordpress is a perfect application in terms of matching my research purposes. Clean builds, massive usages on SQLite and easy to see through. The only problem is when I try to build it with the newest version of Gradle, which is not a good idea. Except that, you would be all set.
  2. Telegram
    1. Telegram suckssssssssssssssssssss. Since it would connect to its own server with your own build, which makes it impossible to see the SQLite trace.
    2. Download the source: git clone --recursive-submodules
    3. Get your own
      1. Telegram app api id and hash here.
      2. Google config json here with package name "org.telegram.messengner" and choosing "Cloud Messaging"
      3. Hockey app id and hash here with package name "org.telegram.messengner".
      4. Put all of the above in TMessagesProj/src/main/java/org/telegram/messenger/
    4. Comment
      1. applicationIdSuffix “.beta”
      2. The whole signingConfigs section
      3. signingConfig signingConfigs.debug
        signingConfig signingConfigs.release
        signingConfig signingConfigs.release
      4. in the module-level build.gradle file. Then you will be all set.
  3. K9 Mail
    1. Just remember to clone recursively on all sub-modules. K9 mail is not a good target since it use SQLite in a very light way
  4. ownCloud
    1. Same as K9-mail, Easy to make and not so many useful traces. The only thing funny is that this open-source app is actually not-free on Google play store. Touche to be such a crappy app and charge users money for using it.