Is there anyway i can modify the battery information?

I’ve swapped the phone batter to a little bit larger capacity one, with 5 more times full discharge and full charge i didnt see any change in the kernel information, manually echo any number into charge_full_design yields a invalid input all the time, do i have to flash back to android to re-calibrate the battery in this case?

Isn’t the battery charge level display simply a ‘voltmeter’ that displays between 3,7 V (empty) and 4,3 V (full)? Or is there more behind it?

I guess not so easy , when you swap the battery with different capacity you can still seeing the voltage going from 4.3v to 3.7v, but when battery gone out of juice you can still boot it up and magically the capacity were bumped up to like 20-30%, besides when charged full the first 1% can uses like 2-3 hours and suddenly starts to drop, this severely impacted by power management chip . On android people running accubatt or somethijg similar to delete a system bin file or whatever configuration file to force the batter to do the calibration, but i cant find any similar in thing in sailfish.

Yes that would be really necessary but unfortunately - as I know - SFOS doesn’t provide this.
Or is there any routine or command one can run as devel-su to recalibrate the battery, devs?

Yeah, looks like so, ive being google aroind and find onr iirc on helping one porter to do the sfos porting task which have mentioned the battery xml file in a libexec boot rc fild, theres a prop named ro.android.battery_full variable or something is being defined during the booting process, but when i have that file opened i found that number is empty, and i tried to remount and changed that value, nothing happening, /system also dont contains that specific xml file, totally have no idea where should i supposed to poke at.

1 Like

Have set ‘Finish charging at 80%’ in Settings/Battery and hope that this will prevent the battery from bloating. Have ordered 4 new batteries for 4 old X10’s and hope they’ll live longer than the old ones without bloating.

Dont’t know if same capacity battery change could facing the same problem as well. For xperia series I guess there are two kernel settings here : /sys/class/power_supply/battery/full_charge and cat /sys/class/power_supply/battery/full_charge_design, different model and different kernel have different naming or even doesn’t exists, they are normally read only, and some can be modified base on my xda’s searching. But when using android they seems like all follow a rule is there’s a system configuration file which defines if the battery needs to recalibrate or not. Otherwise even if a new battery is being replaced, and they still have the wrong information, likely 2600/4000 before swapped battery, it will still show the wrong percentage, on android it could be the last 1% lasts for 2 hours, but for sailfish it will automatically shut the system down, and with 10-20 boot loop it will check the battery capacity and came up with the rest of the power, and keep til it ends again, and this process could loop likely 3-4 times until when you press the power button and seeing “the phone needs to charge” icon when booting up, pretty annoying.

This looks like an X Y problem.

First of all, which phone?
Secondly, how can you tell the battery is 5 times as large? (Looks quite incredible to me. This usually happens when purchasing cheap Chinese batteries with wishful capacities printed on them.)

I understood it as accu capacity (mAh) 5 x more than the original one. Original accu has 4000 mAh, so 20 Ah?

@eminarcissus Did you connect an accumulator out of a PowerBank directly to the phone’s accu terminals on the mainboard?

ahhh not 5 times capacity. i mean 5 times full discharge the battery and 5 times full charge that battery.
Machine is community version Xperia 1II.

My bad on description.
original battery is 4000, new one is 5000. after replace the battery i fully discharged the battery(make charge splash appears when press on power button)

Ah, now I understand.

But whatever, I strongly recommend to use the charging limit option in Settings/System/System/Battery. I’ve set mine to ‘Finish charging at 80%’ to protect the battery for a long life.

Yeah, those helpful for protecting the battery

Problem solved.
P.S.: Don’t trying doing the same thing unless you know what you are doing here. Battery information are stored in dtbo overlay part, all parameters needs to be confirmed from the seller of the battery, this information DOES NOT applies to the battery you might bought in the market, link are just for reference, DON’T FLASH THIS UNLESS YOU KNOW WHAT BATTERY PARAMETERS YOU ARE WORKING WITH.

scripts working with this under sailfish are much more easier(replace sudo with devel-su if you use orignal devel-su)

sudo dd if=/dev/block/platform/soc/by-name/dtbo_a of=dtbo.img
./bin/mkdtimg dump dtbo.img -b dtbo.dtbo 
./bin/fdtget  dtbo.dtbo.0 / model
./bin/fdtoverlay -i dtbo.dtbo.0 -o new_dtbo.dtbo overlay_pdx203.dtbo 
./bin/mkdtimg create new_dtbo.img --page_size=4096 new_dtbo.dtbo 
#sudo dd if=new_dtbo.img of=/dev/block/platform/soc/by-name/dtbo_a 

Reference info.

2 Likes