Possibly.  But as I said, the G1 battery can't measure this.

On Mon, Mar 15, 2010 at 6:22 AM, Chintan <chinta...@gmail.com> 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 <hack...@android.com> 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 <chinta...@gmail.com> 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: 
> > > android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
> <android-kernel%2bunsubscr...@googlegroups.com<android-kernel%252bunsubscr...@googlegroups.com>
> >
> > > website:http://groups.google.com/group/android-kernel
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > 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: 
> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to