android monitor tool (3.0 battery kernel interface)

通过读取下面的内核文件,即可知道当前电池的状态

一般有个内核线程10S更新下状态 (当有USB插入时,会产生中断,及时更新状态)

/sys/class/power_supply/battery/'status

/sys/class/power_supply/battery/'health

/sys/class/power_supply/battery/'capacity

/sys/class/power_supply/battery/'technology

/sys/class/power_supply/battery/'batt_vol

/sys/class/power_supply/battery/'batt_temp


 

你可能感兴趣的:(android,kernel,电池,battery)