More Raphael Android Port Progress

Not much in terms of actual breakthroughs today, except for one gem.

chamonix (Sven) on XDA was able to get cellular geolocation working in Android today. This occurs via a request to the radio firmware by a piece of Android software known as the RIL (radio interface library). It was another simple fix, but finding the cause of such a problem is like looking for a needle in a haystack. It ultimately came down to being a bug in the Android reference RIL (written by Android developers as a base for manufacturers to use when porting to a new device). The reference RIL was using decimal values where it should have used hex values in the radio request for geolocation. Oops. chamonix found the simple two-liner fix and it works flawlessly now.

Of minor note, I’ve begun testing the htc-msm-2.6.27 kernel branch with NO_HZ on. This is a low-level change (referred to as a tickless system in peoplespeak). It allows the kernel to fire interrupts as needed, not during a set schedule (say, 100 times per second, which our non-tickless kernel does). As a result, the system can spend more time doing nothing, enabling more power efficiency through the idle sleep mode while the phone is on but inactive. It’s not a huge power saver (yet), but Android’s default kernel config suggests that NO_HZ be activated where possible.

The NO_HZ option was deactivated in previous builds due to a serious clock skew problem while the phone was idle. Since we now have idle (and deep) sleep working, hopefully this will no longer be an issue, since the phone may be in idle sleep (saving and restoring timer values) instead of just sitting there with no timer firing.

If NO_HZ works out, the next step in power savings is to disable vsync on the display. Currently, the display fires an interrupt for each frame. It runs at 60Hz, so that’s (up to, in theory) 60 wakeups per second with the display on. In reality it won’t be that many, since the display will change (for animations or redrawing the clock or whatever), but still significant while the phone is on. It won’t be easy, though, since nobody really knows how to make it happen yet.

As usual, babijoee has posted updated images with the latest changes on the port project thread.

Leave a Reply