Stop Android Logcat from Truncating Log Line

When analyzing the logcat data from Android devices, I found that sometimes the log line get truncated, especially when it's quite long. This causes trouble because the logged information are in JSON format, which gets broken after (even one character) truncated. In this post, I'll explain how did the truncation happen, and how to fix it.

more ...

Build Kernel In Tree with AOSP for Nexus 5 Hammerhead

Google has a fair document for building kernel for Android. Yet it didn't cover how to integrate the kernel with AOSP source tree so that kernel gets built along with whole platform, which I'll explain in this post. Here I'll mainly focus on android-4.4.4_r1 (Kitkat) for Nexus 5 (hammerhead). The instructions should be easy to adapt to other models or AOSP releases.

more ...


Get Package Usage Statistics in Android

In developing PhoneLab Conductor, I need to get various statistics about a installed package to determine if a app is actively used by participant. For example, for interactive apps, I'd like to know how many times the user launches the app, and how long user actively interact with the app. For background apps (e.g., data collection), I'd like to know how long the background service has been running.

more ...






Use Ant Exec task for Linux Shell Commands

Suppose we use cscope and/or ctags for indexing source code of our Java project and we want to update the meta data files (e.g. cscope.out, tags) each time after we compile. We can use the --post-comile target to accomplish this. Create a custom_rules.xml in your project root directory with the following content. This file will be included to your main build.xml file.

more ...