[Nook Touch General] nmyshkin:
I thought this was important enough to move out of the Volume Control--USB Audio thread as it contains some information which runs counter to prevailing beliefs and suggests a way to test these beliefs.

This report is the result of my struggles to figure out the power drain issue with Phone.apk since I discovered that enabling it restores the volume "button" control over Media volume. Be prepared to be surprised. I was.

If you search online for issues with the generic "phone.apk" and battery consumption you will see the same drum beat over and over. Nearly everyone is convinced that the app is eating up their battery (even when they don't actually have a phone). They cite the battery usage stats which show the "cell standby" process (whatever that is) eating up huge percentages of the battery life. They also (mostly) cite a marked increase in battery life (and a disappearance of the "cell standby") when the app is deleted or disabled. Some also claim that simply changing to "airplane mode" kills the "cell standby" process.

It's difficult to argue with someone's personal experience, but there are a few voices amidst the clamor which say something more or less like this:

But, you know, it is a well-established fact that disabling Phone.apk improves battery life. I don't claim to know very much about the Android operating system but as I've delved into this issue one thing has occurred to me that seems completely illogical. I don't understand all of what happens when a device is rooted, but I doubt that a whole bunch of system apps that were somehow disabled before rooting are suddenly enabled during rooting. So before the NST is rooted, surely the underlying Android 2.1 system is chugging along and none of the apps present is actually disabled. Why then, does Phone.apk suddenly become a current hog

only

when the device is rooted?

So my quest took me down the rabbit hole in an attempt to disable all functions of Phone.apk except the desired ability to control the media volume. This led me to track down obscure settings menus (for the curious geek: AnyCut in the PlayStore--be careful, some settings will cause a reboot), alter the settings.db file (the only place that seems to have any say about "airplane mode"). Would you have imagined that Phone.apk has data roaming set as default "on"? Ever wonder why Phone.apk never appears when enabled? Turns out it has a dependency on Contacts.apk which is absent from the NST. Anyway it was all for naught. By the time I was finished my NST was leaking power like a sieve even without Phone.apk re-enabled.

Fortunately I had an old backup from December and didn't have to restore too much. Back to square one and more reading. It eventually occurred to me that the Nook Color had been the source of some of the audio work, so I visited that forum. Didn't find anything. Of course the Nook Color has native audio capabilities. But I did find a long thread in which proponents and opponents "discussed" Phone.apk and its possible effect on battery drain. That and member [MENTION=660189]HotShotAzn[/MENTION] (his research is here) led me to SystemPanel. The paid version allows you to monitor the system for as long as a week at a time and follow things like CPU usage, power consumption, what's running, etc. If you're interested in SystemPanel for yourself, there's an extensive overview of it here.

Lies, D*mned Lies, and Statistics

Before I lay out the data from my experiments, let me just disclaim the whole thing right now so that anyone with a different experience can still feel validated. I don't claim this study is definitive. To do it right, I should have restored my NST to stock, rooted and then compared power consumption with and without Phone.apk. I judged that as too tiresome although the backup capability of NookManager really would have made it rather easy.

My system

: I am running rooted stock 1.21 with the most recently amended kernal that includes gussied up audio but I note here that the audio implementation in that kernal is not quite complete, being a few details shy of enabling full mic capabilities. I filled those in myself. I use NoFrills CPU governor to regulate the CPU between 300 MHz and 1 GHz, on demand. I run Tasker in the background for a number of things, principally to autostart/stop WiFi for those apps that need it, and to control/lock rotation on some apps. There's a lot of little stuff that fritters away a little CPU time in the background, like the BBC News, TuneIn Radio, etc. I also have all the B&N stuff going except for NookCommunity and Social, both of which I consider nagware.

Day 1-2: No Phone.apk

I fully charged my NST before retiring and let it do its thing overnight. It was down to 99% the next morning. I read lightly during that day and the next, but did nothing else with the device. You can see the power drop-off in section 1 of the first image below. Pretty good.

These are the basic stats from those two days:

Remaining charge: 92%

Active:

ADW

Home

Library

Reader

SystemPanel

Service-only processes

CloudService

com.bn.nook.affileddownloadservice

DeviceManagerService

Market

News and Weather

Settings

Tasker

TestCenterService

USB Audio

USB Host

WaveformDownloaderService

Inactive (cached) apps

AdAway

Email

Maps

Pandora

Shop

thumbnailservice

TuneInRadio

Internal System Processes

Android keyboard

android.process.acore

android.process.media

com.bn.cloud.svc:svc

com.google.process.gapps

system

Top apps

System Processes

system

SystemPanel

Days 3-4: Volume control "kludge"

I fully charged the NST before retiring and also briefly ran the USB Audio toggle app so I could use ES Task Manager to wake up the volume control as described here. Then I left the NST to sleep.

The next two days I read lightly as before, nothing more. I was shocked at the power drop-off as seen in section 2 of the first image below.

These are the basic stats from those two days:

Remaining charge: 50%

Active:

ADW

Home

Library

Reader

SystemPanel

Service-only processes

CloudService

com.bn.nook.affileddownloadservice

DeviceManagerService

Market

News and Weather

Settings

Tasker

TestCenterService

USB Host

WaveformDownloaderService

Inactive (cached) apps

AdAway

Email

Maps

Pandora

Screenshot Easy

Internal System Processes

Android keyboard

android.process.media

com.bn.cloud.svc:svc

com.google.process.gapps

system

Top apps

system

TestCenterService

SystemPanel

You can see from the plot that the discharge rate and CPU usage are both elevated for that two-day period. The Top Apps have also changed. "system" has moved up and TestCenterService has made the top three (the list is much longer). I more deeply investigated both of these and, sure enough, the increased CPU activity comes mainly from "system" (which I believe is the underlying Linux, as opposed to "System") and to a smaller extent, TestCenterService (com.bn.serviceone). What exactly is going on when the volume control kludge has been executed is anyone's guess, but it's clear that the result and any side effects continue to propagate through the CPU until a reboot, even when USB Audio is not in use.

I couldn't believe this result so after wrapping up all my tests today I disabled Phone.apk again, rebooted and set up the volume control kludge using ES Task Manager. Immediately the undercurrent of increased CPU usage showed up in the real-time stats from SystemPanel. So whatever volume control strategy you choose, it probably should not be this one.

Days 5-6: Phone.apk enabled

After enabling Phone.apk I rebooted (cancels effect of kludge), fully charged, and left the NST to sleep overnight. The next morning, I was down to 98% battery. So far so good.

I read for the next two days, as before, although perhaps a little more heavily since I got into a good mystery :o You can see the power drop-off in section 3 of the first image below. It's very similar to the first two days without Phone.apk enabled, and certainly MUCH better than that of days 3 & 4.

These are the basic stats from those two days:

Remaining charge: 91%

Active:

ADW

Home

Library

Reader

SystemPanel

Service-only processes

com.bn.nook.affileddownloadservice

DeviceManagerService

Market

News and Weather

Set Cover

Settings

Tasker

TestCenterService

USB Audio

USB Host

WaveformDownloaderService

Inactive (cached) apps

AdAway

Email

ES Task Manager

Google Partner Setup

Maps

No Frills CPU Control

Pandora

TuneIn Radio

WiFi File Transfer

Internal System Processes

Android keyboard

android.process.acore

android.process.media

com.bn.cloud.svc:svc

com.google.process.gapps

Dialer

system

Top apps

system

System Processes

SystemPanel

There's some jockeying for place among the various apps and services, but the bottom line (or rather the top one in this case) is that the remaining charge after two days is essentially the same as without Phone.apk running.

Of course there is no mention of the mysterious "cell standby" in all of these stats. You'll notice that the Dialer shows up low on the list of Internal System Processes. For the curious I called up the details on that. They are in the second image below. Clearly, enabling Phone.apk has nothing to do with battery life on my NST. But it does give me full volume control without any silly kludge that can't be explained and actually consumes even more juice. And now that I'm done with my experiments I don't need the SystemPanel monitor on so that will save a little more juice :)

YMMV.