Power Management

Kernel Development

Energy Measurements

Android Emulator

Posted in Uncategorized

Grinnell Visit

Last week I visited Grinnell College talking about the work that my research groups has been doing on mobile sensing applications. I had a wonderful time. The Computer Science Department is top-notch. Lots of interesting discussions about ongoing work at Grinnell in systems and programming languages. Below is the abstract of my talk and my slides:

Mobile sensing applications are an emerging class of mobile applications that take advantage of the increasing sensing, computational, storage, and networking capabilities of mobile devices. Chipara’s research focuses on the systems, networking, and software engineering aspects of developing mobile health (mHealth) systems that continuously monitor and infer the health status of patients. His work combines the design of communication protocols, middleware, and programming tools with large-scale real-world deployments of working systems.

In this talk, Chipara will describe AudioSense – a novel mobile sensing application that allows audiologists to assess the performance of the hearing aids in the real-world. A key limitation of traditional laboratory and survey methods employed by audiologists is that they fail to predict when a hearing aid user will be dissatisfied with its performance in the real-world. In contrast with these techniques, AudioSense jointly characterizes both the user’s auditory context and the performance of the hearing aid in that context. The second part of the talk will cover some of the tools his team has created to simplify the development of mobile sensing applications. The focus is one of coordinating when different hardware resources (e.g., WiFi, 3G) are turned on and off to save energy without hindering user experience. A lightweight annotation language and middleware service will be presented that can be used to build energy-efficient mobile sensing applications for Android.

You can find the slides from my talk here.

Posted in News, Uncategorized

su on android

See: https://levdev.wordpress.com/2012/11/12/android-busybox-and-the-gnu-project/

Useful things:

  • you can run adb as root using adb shell
  • you can remount system in writing mount by running adb remount
Posted in Uncategorized

Perf on Android

We are working on project that requires us to collect performance events on Android. This involves a few steps:

  • Recompile the kernel with the right flags. You should do this incrementally, some options may make you kernel crash at boot time. You should consider including the following flags
  • Compile the perf tool. It is nicely part of the Android source and you can just compile it easily with the rest of the distribution.
  • To get started with perf, you can take a look at the following one-liner examples: http://www.brendangregg.com/perf.html

Interesting power management information is spread in multiple place. Below, I will summarize some of it (as I learn it):

  • CPU:
    • The time spent in different states can be directly obtained from cpufreq-stats. Similar statistics can be obtained from when the system is idle, from cupidle.
Tagged with:
Posted in Android

Android Hacking

I have spent the last couple of weeks building various custom images for Android. There are a few useful tutorials:

While the above tutorials give you a pretty good idea of what to do, they are terrible at providing guidelines on what to do when something goes wrong. Here are a few common issues:

  • Wrong source version: make sure that you checkout the right version of the software. If you are going to rebuilt the kernel make sure to use the checkout using the sha1 hash. The hash of the kernel currently running on your device is included in the kernel name. For example, my kernel version was 3.4.0-gfe3bd61[more stuff]. You can checkout the kernel sources used to build the kernel version using the fe3bd61 hash.
  • Build environment: I am a happy mac user. At the time of writing this post, the current Xcode toolchain (v 6.4), cannot be used to compile the android sources. I have used Ubuntu under Parallels to do much of the development. This solution worked mostly okay. However, if you are not careful you might run out of memory and Ubuntu will kill your compilation process. You can tweak either the amount of RAM dedicated for your VM or configure the lower the number of threads used to compile the source (i.e., make -j N).
  • Kernel Sins: I spent an entire day trying to figure out why my devices was rebooting after running the boot loader (the device was stuck in an infinite reboot loop). Since adb demon was not loaded yet, it was impossible to get the log to see what was happening. Luckily, Android saves the previous kmesg logs in /proc/last_kmesg that can be retrieved by booting a working kerning image (e.g., the factory images of Android). Inspecting the kmesg, I was able to determine that I was running the incorrect version on my toolchain. Note to self, use the version specified in the documentation (RFM!).


Tagged with: ,
Posted in Android, Uncategorized

Papers this semester

The Spring semester was quite busy. We managed to send out three papers:

  • A paper was submitted to EMSOFT 2015
  • In-situ Measurement and Prediction of Hearing Aid Outcomes Using Mobile Phones — submitted to WirelessHealth 2015
  • Managing the Energy-Delay Tradeoff in Mobile Applications with Tempus — submitted to Middleware 2015

We will be learning about their fate over the summer.

Posted in Uncategorized

Low Power Hardware

Looks like Atmel is coming up with a new low power ARM.


Posted in Uncategorized