Battery Management generic solution

by Zhao, Bingqi » Thu, 26 Feb 2009 11:18:21 GMT


Sponsored Links
 Hi all,

I have studied the battery management implementation of Android, and found that 
in the file "com_android_server_BatteryService.cpp", the ACPI paths are hard 
coded, for example, the AC_ONLINE_PATH is defined as 
"/sys/class/power_supply/ac/online", BATTERY_CAPACITY_PATH is defined as 
"/sys/class/power_supply/battery/capacity". But for every device, the ACPI 
interface is different from each other.
For example, for Compal, AC_ONLINE_PATH is 
"/sys/class/power_supply/ACAD/online", and there is not a path of 
BATTERY_CAPACITY_PATH, but there are two paths for it:
/sys/class/power_supply/BAT1/charge_full
/sys/class/power_supply/BAT1/charge_now

I am creating a generic, configurable solution with defaults configured to be 
compatible with the original solution .

Thanks
Tim
Intel Software Services Group (SSG)

--~--~---------~--~----~------------~-------~--~----~



Battery Management generic solution

by tim » Wed, 11 Mar 2009 12:04:05 GMT


 Hi all,

I have studied the battery management implementation of Android, and
found that in the file "com_android_server_BatteryService.cpp", the
ACPI paths are hard coded, for example, the AC_ONLINE_PATH is defined
as "/sys/class/power_supply/ac/online", BATTERY_CAPACITY_PATH is
defined as "/sys/class/power_supply/battery/capacity". But for every
device, the ACPI interface is different from each other.
 For example, for Compal, AC_ONLINE_PATH is "/sys/class/power_supply/
ACAD/online", and there is not a path of BATTERY_CAPACITY_PATH, but
there are two paths for it:
 /sys/class/power_supply/BAT1/charge_full
 /sys/class/power_supply/BAT1/charge_now

I am creating a generic, configurable solution with defaults
configured to be compatible with the original solution .

Thanks
Tim
Intel Software Services Group (SSG)
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Battery Management generic solution

by tim » Wed, 11 Mar 2009 12:10:49 GMT


 Hi all,

I have studied the battery management implementation of Android, and
found that in the file "com_android_server_BatteryService.cpp", the
ACPI paths are hard coded, for example, the AC_ONLINE_PATH is defined
as "/sys/class/power_supply/ac/online", BATTERY_CAPACITY_PATH is
defined as "/sys/class/power_supply/battery/capacity". But for every
device, the ACPI interface is different from each other.
 For example, for Compal, AC_ONLINE_PATH is "/sys/class/power_supply/
ACAD/online", and there is not a path of BATTERY_CAPACITY_PATH, but
there are two paths for it:
 /sys/class/power_supply/BAT1/charge_full
 /sys/class/power_supply/BAT1/charge_now

I am creating a generic, configurable solution with defaults
configured to be compatible with the original solution .

Thanks
Tim
Intel Software Services Group (SSG)
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Battery Management generic solution

by Dianne Hackborn » Thu, 12 Mar 2009 01:08:26 GMT


 Hi, this would probably best be done as a HAL module.  We would be happy to
accept a patch along those lines.






-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Battery Management generic solution

by tim » Thu, 12 Mar 2009 01:24:58 GMT


 Hi all,

I have studied the battery management implementation of Android, and
found that in the file "com_android_server_BatteryService.cpp", the
ACPI paths are hard coded, for example, the AC_ONLINE_PATH is defined
as "/sys/class/power_supply/ac/online", BATTERY_CAPACITY_PATH is
defined as "/sys/class/power_supply/battery/capacity". But for every
device, the ACPI interface is different from each other.
 For example, for Compal, AC_ONLINE_PATH is "/sys/class/power_supply/
ACAD/online", and there is not a path of BATTERY_CAPACITY_PATH, but
there are two paths for it:
 /sys/class/power_supply/BAT1/charge_full
 /sys/class/power_supply/BAT1/charge_now

I am creating a generic, configurable solution with defaults
configured to be compatible with the original solution .

Thanks
Tim
Intel Software Services Group (SSG)

--~--~---------~--~----~------------~-------~--~----~



Battery Management generic solution

by Zhao, Bingqi » Fri, 13 Mar 2009 14:00:44 GMT


 Thanks for your suggestion, a HAL component for this sounds like a great idea 
and we will explore in that direction, think about this solution and try to 
implement it.

Regards
Tim

________________________________
From: android-framework@googlegroups.com 
[mailto:android-framew...@googlegroups.com] On Behalf Of Dianne Hackborn
Sent: 200929:08
To: android-framework@googlegroups.com
Subject: Re: Battery Management generic solution

Hi, this would probably best be done as a HAL module.  We would be happy to 
accept a patch along those lines.

On Wed, Mar 11, 2009 at 5:03 AM, tim 



Hi all,

I have studied the battery management implementation of Android, and
found that in the file "com_android_server_BatteryService.cpp", the
ACPI paths are hard coded, for example, the AC_ONLINE_PATH is defined
as "/sys/class/power_supply/ac/online", BATTERY_CAPACITY_PATH is
defined as "/sys/class/power_supply/battery/capacity". But for every
device, the ACPI interface is different from each other.
 For example, for Compal, AC_ONLINE_PATH is "/sys/class/power_supply/
ACAD/online", and there is not a path of BATTERY_CAPACITY_PATH, but
there are two paths for it:
 /sys/class/power_supply/BAT1/charge_full
 /sys/class/power_supply/BAT1/charge_now

I am creating a generic, configurable solution with defaults
configured to be compatible with the original solution .

Thanks
Tim
Intel Software Services Group (SSG)




--
Dianne Hackborn
Android framework engineer
hack...@android.com<mailto:hack...@android.com>

Note: please don't send private questions to me, as I don't have time to 
provide private support.  All such questions should be posted on public forums, 
where I and others can see and answer them.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Using Android and Log4J

Hi Folks,

I'm using M5 version of the SDK (rc15 x86), Fedora 7.
Basically, I'm trying to have Log4J (1.2.15) working in Android environment.
I've redirected STDOUT/STDERR and I'm getting tons of these messages
when running logcat:

W/dalvikvm(  739): read stdout: (17,512) failed (0): Unknown error: 0
W/dalvikvm(  739): read stdout: (17,512) failed (0): Unknown error: 0

I've pushed the following file into Android's /tmp/

-------------- START LOG4J conf -----------------------------

# STDOUT appender
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%d %p [%t] %C{1} - %m\n
# use the STDOUT appender. set the level to INFO.
log4j.Logger.com.company-name.android.fs.Log4JDemo=INFO, STDOUT

-------------- END LOG4J conf -----------------------------

I have a small file system browser installed in Android and I can see
that the file is in place.

The "info" Log4J statements don't seem to show up in the log (using adb logcat).
Android's logging framework messages do dhow up w/o any issues.

Can someone point out what I've possibly missed out there? Any help is
appreciated.

Thanks in advance,
-- 
- Kobi

--~--~---------~--~----~------------~-------~--~----~

2. When will Android Phone be released?

Hi,
Does anyone know when Android phone will be released? An estimate
would be great!!
Thanks,
Squid
--~--~---------~--~----~------------~-------~--~----~

3. problrm in calling activity/plz do solve his problem i am running out of time...

4. Unable to start activity

5. gtalkservice.IGTalkSession.logout() causes GTalk Service to crash

6. "Hello, Android!" doesn't get built.

7. About Terms & conditions to submit an application