Fixing the Defy's battery size

Search This thread

Passa91

Senior Member
Dec 17, 2010
321
95
I've been looking at this problem for a while, and here's what I know.

The kernel has a hardcoded battery size it reports to Android. On the Defy, this is 1500mAh, and on the Defy+, it is 1700mAh. This does not change no matter what battery you place in your Defy. You can see this for yourself by running this command in terminal:

Code:
cat /sys/class/power_supply/battery/uevent

The reason this is bad is because many people are running aftermarket or larger batteries on their Defys. This includes people putting a 1700mAh Defy+ battery in a Defy.

It does not mean the extra capacity is not used. What it means is that Android will not correctly report how much percentage you have left. You will find your phone sits on 1% for quite a while before kicking the bucket.

Because this number is hard-coded into the kernel, I'm not sure how much we can do about it. But I hope there is some talent out in the community that can help with this issue. Would be great if we could get an option to set the mAh ourselves merged into Quarx's CM7 or something.

Any ideas?

EDIT: Just to add, I have not personally tested what mAh the Defy+ kernel reports. Given the Defy reports less than its stock battery (1540mAh), I am interested to see if the Defy+ reports exactly 1700mAh.
 

vanyas

Member
Dec 17, 2011
33
14
Vladivostok
Defy+ (cm72 111213)

Code:
# cat /sys/class/power_supply/battery/uevent
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CAPACITY=90
POWER_SUPPLY_VOLTAGE_NOW=4034000
POWER_SUPPLY_TEMP=370
POWER_SUPPLY_CHARGE_FULL_DESIGN=1650
POWER_SUPPLY_CHARGE_COUNTER=92
 
  • Like
Reactions: Passa91

Passa91

Senior Member
Dec 17, 2010
321
95
Wow, thanks for that. Interesting, so with Defy+ kernels, like with the Defy kernels, there is a 2.5-3% buffer between the physical battery capacity and what is reported to Android. I'm sure there is a good reason why Motorola have done this.

Now we just need to figure out how to set this number manually. The solution could be similar to how 1% battery steps were achieved without a custom kernel.
 

blackwing182

Senior Member
Nov 21, 2010
3,103
2,934
Naranjito P.R
OnePlus 8T
OnePlus 9
cm7 for defy 11/12/04
normal defy 1500mAh

# cat /sys/class/power_supply/battery/uevent
cat /sys/class/power_supply/battery/uevent
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CAPACITY=80
POWER_SUPPLY_VOLTAGE_NOW=4041000
POWER_SUPPLY_TEMP=310
POWER_SUPPLY_CHARGE_FULL_DESIGN=1500
POWER_SUPPLY_CHARGE_COUNTER=79
 
Last edited:
  • Like
Reactions: Passa91

hackergnome

Senior Member
Apr 21, 2011
2,613
875
Bengaluru
$ cat /sys/class/power_supply/battery/uevent
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CAPACITY=90
POWER_SUPPLY_VOLTAGE_NOW=3985000
POWER_SUPPLY_TEMP=340
POWER_SUPPLY_CHARGE_FULL_DESIGN=1500
POWER_SUPPLY_CHARGE_COUNTER=89


Original Defy Battery
cm7.2 Defy+ nightly

Sent from my MB526 using xda premium
 
  • Like
Reactions: Passa91

blackwing182

Senior Member
Nov 21, 2010
3,103
2,934
Naranjito P.R
OnePlus 8T
OnePlus 9
Wait, are you running an original Defy battery in a Defy+? Or just the Defy+ version of CM7 on an original Defy?

Either way, it's interesting you're getting 1500 reported with a Gingerbread kernel... (Defy+)

i think the battery have a chip or somthing that comunicates with the kernel and power unit, or a internal chip in the board pr-programed IDK
 

flunk03

Senior Member
Oct 12, 2011
155
37
bangalore
Defy running cm 7.1.0-11
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CAPACITY=90
POWER_SUPPLY_VOLTAGE_NOW=4012000
POWER_SUPPLY_TEMP=290
POWER_SUPPLY_CHARGE_FULL_DESIGN=1500
POWER_SUPPLY_CHARGE_COUNTER=89
 

wizwin

Senior Member
Battery/Cell Specification

Here is some more info on Defy's original battery (BF5X).

I purchased my phone from UK and its battery is originated and finished in China. I peeled the cover wrapped over the cell and these are the details I found inside:

The part number is ICP494261SRU (Li-Ion, 3.7V, 1500 mAh). So the cell is possibly manufactured by Maxell.

There is a small circuit board attached to the cell terminals (just below the contacts).

The details of the cell itself can be found in this link. The specification documentation is also attached to this post for reference.
 

Attachments

  • icp_battery.pdf
    239.8 KB · Views: 95

hackergnome

Senior Member
Apr 21, 2011
2,613
875
Bengaluru
Wait, are you running an original Defy battery in a Defy+? Or just the Defy+ version of CM7 on an original Defy?

Either way, it's interesting you're getting 1500 reported with a Gingerbread kernel... (Defy+)

Y will anyone put defy battery in Defy+
Defy with Defy's Battery running cm7.2 Defy+ build...

Sent from my MB526 using xda premium
 

vanyas

Member
Dec 17, 2011
33
14
Vladivostok
This photo of Defy+ battery part number
 

Attachments

  • SAM_2292.jpg
    SAM_2292.jpg
    104.8 KB · Views: 213

KissMate

Member
Jan 8, 2012
22
3
http://xdaforums.com/showthread.php?t=1320330

Could this patch have anything to do with solving the problem?

(Presumably at this point, we can assume it is a problem with the circuitry on aftermarket batteries themselves, needing an overwrite from the software).

I've installed CM9 (111223-Defy+) on my Defy+ over a stock Gingerbread ROM, and it hadn't charged my battery over 80%, so I replaced the battd, and now it does, and works properly, so battery compatibility is definitely coded in battd. (And it might have something to do with the kernel too.)
 

MichoCZ

New member
Jan 15, 2012
4
0
I flashed MS2Ginger 4.0 beta and kernel 2.6.32.9 (2.3.6) and i stop at 83% (4167mV). After i use new battd, wipe battery stats i CW mode, Defy+ stop always at 83%. Any next idea?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Defy+ (cm72 111213)

    Code:
    # cat /sys/class/power_supply/battery/uevent
    POWER_SUPPLY_NAME=battery
    POWER_SUPPLY_TYPE=Battery
    POWER_SUPPLY_STATUS=Discharging
    POWER_SUPPLY_HEALTH=Good
    POWER_SUPPLY_PRESENT=1
    POWER_SUPPLY_TECHNOLOGY=Li-ion
    POWER_SUPPLY_CAPACITY=90
    POWER_SUPPLY_VOLTAGE_NOW=4034000
    POWER_SUPPLY_TEMP=370
    POWER_SUPPLY_CHARGE_FULL_DESIGN=1650
    POWER_SUPPLY_CHARGE_COUNTER=92
    1
    cm7 for defy 11/12/04
    normal defy 1500mAh

    # cat /sys/class/power_supply/battery/uevent
    cat /sys/class/power_supply/battery/uevent
    POWER_SUPPLY_NAME=battery
    POWER_SUPPLY_TYPE=Battery
    POWER_SUPPLY_STATUS=Charging
    POWER_SUPPLY_HEALTH=Good
    POWER_SUPPLY_PRESENT=1
    POWER_SUPPLY_TECHNOLOGY=Li-ion
    POWER_SUPPLY_CAPACITY=80
    POWER_SUPPLY_VOLTAGE_NOW=4041000
    POWER_SUPPLY_TEMP=310
    POWER_SUPPLY_CHARGE_FULL_DESIGN=1500
    POWER_SUPPLY_CHARGE_COUNTER=79
    1
    $ cat /sys/class/power_supply/battery/uevent
    POWER_SUPPLY_NAME=battery
    POWER_SUPPLY_TYPE=Battery
    POWER_SUPPLY_STATUS=Discharging
    POWER_SUPPLY_HEALTH=Good
    POWER_SUPPLY_PRESENT=1
    POWER_SUPPLY_TECHNOLOGY=Li-ion
    POWER_SUPPLY_CAPACITY=90
    POWER_SUPPLY_VOLTAGE_NOW=3985000
    POWER_SUPPLY_TEMP=340
    POWER_SUPPLY_CHARGE_FULL_DESIGN=1500
    POWER_SUPPLY_CHARGE_COUNTER=89


    Original Defy Battery
    cm7.2 Defy+ nightly

    Sent from my MB526 using xda premium