Showing posts with label htc. Show all posts
Showing posts with label htc. Show all posts

Wednesday, 9 February 2011

Wifi battery drain on CM6.1.1 on my HTC Desire

I (only) recently upgraded from CyanogenMod 6.0.0-RC1 to 6.1.1, and started noticing much higher battery drain, just like others did as soon as it came out. Aside from a subjective feeling that the battery drains fast, the proportion of time spent running "Android OS" under "Battery use" and the proportion of "Time spent without sleeping" under "Spare Parts -> Battery history -> Running" seemed high:







There's been some discussion by other Desire owners on CyanogenMod forums and on XDA Developers over whether the "Wi-Fi sleep policy" is better set to "Never" or "When screen turns off"; it certainly seems intuitive that the latter would save more power. Being the scientific sort I experimented, running on "When screen turns off" overnight and on "Never" from when I woke up (always within range of my router):





"Never" is clearly much kinder to the battery on my phone, at least on CM 6.1.1 and within range of my router. Another subjective observation: I'm not sure whether it's just a change in power accounting, but with "Never" I now find "Wi-Fi" accounts for a much larger proportion of "Battery use" than it used to even though the rate of power drain seems to be back to normal.



I generated the graph from data captured and exported by Battery Graph, using GnuPlot (though perhaps just screenshotting the one Battery Graph made would be easier!):



set term png
set xlabel "Clock time"
set ylabel "Charge (%)"
set timefmt x "%s"
set xdata time
set xrange ["`gdate -d "2011-02-09 00:45" +%s`":"`gdate -d "2011-02-09 15:00" +%s`"]
set arrow \
from "`gdate -d "2011-02-09 08:01" +%s`", graph 0 \
to "`gdate -d "2011-02-09 08:01" +%s`", graph 1 \
nohead \
linetype 0
set label '"Wi-Fi sleep policy" set to "Never"' \
at "`gdate -d "2011-02-09 08:01" +%s`", graph 0.5 \
center \
rotate
set datafile separator ","
set output "battery.png"
plot "battery_graph_Feb09-002305_to_Feb09-150905.csv" \
using 2:3 \
notitle \
with lines \
smooth bezier

Monday, 7 February 2011

HTC Desire S-OFF / NAND unlock with VirtualBox on Mac OS X

I had a couple of brief moments of discomfort while doing AlphaRev's NAND unlock (a.k.a. S-OFF, aka @secuflag) via Mac OS X / VirtualBox. While I'm sure the vast majority of people who'll do this have already done it I'll explain them quickly just in case it helps anyone.

I followed these instructions. (I'd post this there but apparently I'm too new to be trusted.)

Firstly, if you find that your handset is listed under the USB devices list but greyed out, make sure adb isn't connected (run adb disconnect).

Secondly, expect to have to re-establish the phone's virtual USB connection several times during the process -- just click the USB icon at the bottom of VirtualBox and select the phone. I spent a good few minutes waiting for progress when the flasher was actually waiting for me.

Aside: I did this to allow repartitioning of the NAND (if you're a CyanogenMod 6 / HTC Desire user you'll know just how little space is left on the /data partition of the already-tiny internal NAND for downloaded apps), but I don't really understand the locking mechanism. Clearly custom firmware could already be flashed to /system, but apparently /system was only writable while FASTBOOT was running, i.e. not while Android was running. Fine, but why can't you just repartition the NAND under FASTBOOT? Why does it require a patch to the recovery?