[Desire General] andycted:
At last !!!

At Last !!! I've found a way to measure real time battery usage in milliAmperes !

I remembered there was some /proc/... file to look for, but wasn't sure if I saw that correctly. Anyway after a longish search on the web I found that it's not in /proc, but directly in /sys, the complete path is

/sys/class/power_supply/battery

where you can get real time information about, of course, the battery. Now in particular you will get something like mA consumption with cat current_now, which shows it in x1000 unit (microAmpere ??).

Following the finding, I kept searching the web and obviously ended up back on xda in this thread for the nexus one:

http://xdaforums.com/showthread.php?t=723217

Anyway, the only snug is that, similarly to WinMo, you don't get absolutely real time reading, but rather after some 30 seconds, which can also be useful to test with screen off. Why ? because they actually made a widget for it !

The other snug is that it doesn't show brief changes, but it's actually very usable and I've already done some long-postponed tests.

Here are the first few tests (all mobile/data tests performed on 3G):

Airplane mode on:

- Dark blue desktop, minimum brightness: 122 mA

- Dark blue desktop, maximum brightness: 160 mA

- Dark blue desktop, auto brightness indoor: 130 mA

- Dark blue desktop, minimum brightness, red render: 112-113 mA

- Dark blue desktop, minimum brightness, green render: 111 mA (what ?? probably due to the blue wallpaper ?)

- Dark blue desktop, minimum brightness, amber render: 115 mA

- Dark blue desktop, maximum brightness, red render: 128 mA (low !!)

- All white screen, minimum brightness: 138 mA

- All white screen, maximum brightness: 416 mA (high !!)

--------

Idle:

Airplane mode on, screen off: 2 mA

Airplane mode on, screen on: 120 mA

Airplane mode off, screen on, 3G mobile on, 3G data off: 122 mA

Airplane mode off, screen on, 3G mobile on, 3G data on, some very light traffic: 124-127 mA

Airplane mode off, screen on, 3G mobile on, WiFi on (spotty), some very light traffic: 135-141 mA

Airplane mode on, screen on, 3G mobile off, WiFi on (as above), some very light traffic: 128-134 mA

Airplane mode off, screen on, 3G mobile on, 3G data off, bluetooth on: 124-125 mA (a bit more right after turning it on)

Same as above while receiving a 17 MB file from the laptop, 30 cm away: 153-212 mA (higher when my hands are near it)

--------

Local Media files:

Watching the mp4 movie above, auto brightness, mobile on, data off: 190-198 mA

Playing mp3s, Airplane mode on, minimum brightness, screen on: 160 mA, about 10 more at song change

Playing mp3s, Airplane mode on, screen off: 74 mA,

Will take a week of holidays, in order to test stuff ! hehe

[EDIT]: Parameters of the tests

I'm on OpenDesire 3.0.5 which has particularly low autobrightness compared to HTC Sense.

All tests with phone stationary in very good mobile reception (-75 dBm), but spotty wifi. Note that in fact, wifi on tests have more fluctations than 3G.

I've also noticed that when turning wifi ON (and to some degree 3G too) there is an interval of about 30 seconds where the value goes through the roof (180-230), which may or may not be down to some push services reconnecting.