It might be a current estimate, but since it was reported to be nonzero only with external power it sounds more like charge current than drain. Would be interesting if it turns out different with the wall charger vs. usb.
Android being open source Chintan should be able to track down the source of the number by perusing the sources. Its probably possible to make an instrumented dummy battery for research purposes, though it would requure figuring out the interface. Dianne Hackborn wrote: > Possibly. But as I said, the G1 battery can't measure this. > > On Mon, Mar 15, 2010 at 6:22 AM, Chintan <[email protected]> wrote: > > > Ok, I have one doubt though. > > What does the parameter batt_current under sysfs (/sys/class/ > > power_supply/battery/batt_current ) represent? > > > > Isn't that instantaneous current drawn from battery? > > > > On Mar 14, 11:49 pm, Dianne Hackborn <[email protected]> wrote: > > > The G1 battery doesn't have a current meter (I assume you are wanting to > > > measure the current current draw), so there is no data for that. The > > > firmware does some magical tricks to try to estimate how much the battery > > > has drained based on the hardware that is being used. > > > > > > > > > > > > On Sat, Mar 13, 2010 at 12:21 PM, Chintan <[email protected]> wrote: > > > > I am trying to collect power usage statistics for the Android G1 > > > > Phone. I am interested in knowing the values of Voltage and Current, > > > > and then able to collect statistics as reported here > > > > > > >http://dl.google.com/io/2009/pres/W_0300_CodingforLife-BatteryLifeTha. > > .. > > > > > > > I am able to get the value of Battery voltage through registering for > > > > an intent receiver to receive the Broadcast for > > > > ACTION_BATTERY_CHANGED. But the problem is that Android does not > > > > expose the value of current through this SDK interface. > > > > > > > One way I tried is via sysfs interface, where I can view the battery > > > > current value from adb shell, using the following command > > > > > > > $cat /sys/class/power_supply/battery/batt_current > > > > 449 > > > > > > > But that too works only if the phone is connected via USB interface. > > > > If I disconnect the phone, I see the value of batt_current as '0'. I > > > > am not sure why the value of current reported is zero. It should be > > > > more than zero, right? > > > > > > > Any suggestion / pointers for getting battery current value? Also > > > > please correct me if I am wrong. > > > > > > > -- > > > > unsubscribe: > > > > [email protected]<android-kernel%[email protected]> > > <android-kernel%[email protected]<android-kernel%[email protected]> > > > > > > > website:http://groups.google.com/group/android-kernel > > > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > [email protected] > > > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > and > > > answer them. > > > > -- > > unsubscribe: > > [email protected]<android-kernel%[email protected]> > > website: http://groups.google.com/group/android-kernel > > > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
