yashsingh1/xdaforums huggingface dataset:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
So, for those who experience the 100% battery bug. This isn't the only kernel with that problem. And not the only developer scratching his head with this demoralizing problem. : (

But I found a quick solution to the problem, courtesy by CTCaer.

Thank you, CTCaer, for this brute but useful solution! : )

If you have terminal installed on the phone and don't want to connect the phone to a PC just to make this work, then do the same thing, only in terminal instead:

Open terminal

Enter su

enter cd /sys/class/power_supply/bq27520

enter echo 0 > fg_lock

enter echo "start" > fg_cmd

wait 10 seconds

enter echo "end" > fg_cmd

wait 10 seconds

enter echo 1 > fg_lock

Reboot phone
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
Thank you so much for sharing this!

[MENTION=373657]kast[/MENTION], where are you and how are you doing? I'm asking the same thing of karandpr, could this maybe be integrated into the kernel itself so it happens automatically at kernel level rather than manual intervention?

This is the source
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Good idea, but no. It takes time to recalibrate (some 20 seconds or so), so to use it at every boot, for instance, would make the phone use an eternity just to start. It could, how ever, be added to the CWM-menu, I guess? So you have a choice to "recalibrate battery" there. Only needs to be done once after having had the battery taken out of the phone and inserted again.

BTW: I've compiled my own version of Kappas kernel and I must say it's lightning fast! I'm amazed by the work done by kast. If you do read this, kast, thank you so much for all your hard work! : )
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
unfortunately it didn't work for me, so although i don't think there's a cure for my phone's problem, it might work for other people. I'm on doppler by the way, used to be on kappa previously but still had the problem
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
There is another solution. You first make sure that you are running a kernel that plays nice (that works properly) with the battery. If you have more than one battery, insert them all and try them out one by one in this other kernel.

Then open up the ROM you want to use with the kappa kernel (unzip it), go to system/bin, delete the file bq275xx_fwloader. That's what is the root to our problems. According to CTCaer it's a mix between a hardware and a software problem. But removing the bq275xx_fwloader so the battery isn't loaded with the wrong firmware solves this problem. Zip your ROM back up, install the kappa kernel, "factory reset", install your ROM and you SHOULD be good to go!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
how does one determine if the kernel plays or will play nice? I'm on Doppler which is based on Lupus. Will it "play nice"? What would happen if I were to delete the file on a working i.e. currently installed ROM? :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
It doesn't have the 100% battery bug.

The file would be deleted from the currently running rom. That's all. The phone won't do anything weird, the world won't implode. The file (the firmware-loader for the battery) will be deleted. That is all.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi [MENTION=390446]Verbato[/MENTION] ,

is it compiled from latest source changes ? If so please can you share with us the kernel :) because i'm dying to use a more stable kappa kernel from the last update ! (ps: i'm a mango user )

Thank you very much .

Job.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
No, I meant to ask, if the kernel doesn't have the battery bug (and Doppler doesn't) but the bug is in the hardware and if I delete the firmware loader, will that resolve my 100% issue?

Anyways, I've just deleted it, phone booting, will provide feedback as I discover the effects ;)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
It's a calibrator like ctty is for touchscreens .

you can remove the line pointing towards the battery calibrator.

/etc/hw_config.sh

[MENTION=390446]Verbato[/MENTION]

Do the WiFi modules compile against the latest Kappa ?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Yup. I had to load them in the right order though, otherwise I couldn't get the wifi to work. Also, it keeps making some wireless modules I do not want, wl1251.ko, wl1251_sdio.ko, wl1251_spi.ko. Do not load. They will just make wireless not work. But other than that... A flawless and wonderfull kernel. Like I said, if you read this kappa, thank you so very very much kappa, for all your hard work on this! It really is noticeable how much work has been done with this kernel!

EDIT: I have some 180MB free ram with a ICS ROM running the latest "old" walkman (2.0.A.0.26) and what can I say? It's smooth!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Which branch ?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
You mean the kernel? I gues it is 1.6. I just ran git clone git://github.com/KaSt/Kappa. In some files it says it's version 1.6. But it could be 1.7 beta, just not updated. I have no idea how much of his latest work kappa has put up on github.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
:p . ALL of it.

You are using Kappa 1.6 which is awesome any way :highfive:

Do one thing

For 1.7 stuff

git checkout Kappa1.7

OR

git checkout Kappa1.7Lite

for kast's latest stuff .
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Ah, I see what you mean when you refer to the wireless! ; )

error: Your local changes to the following files would be overwritten by checkout:

compat-wireless-wl12xx/Module.symvers

compat-wireless-wl12xx/include/linux/compat_autoconf.h

Please, commit your changes or stash them before you can switch branches.

Aborting

Thank you, by the way! : )
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
[MENTION=390446]Verbato[/MENTION], I did the following:

Deleted bq275xx_fwloader and batterystats.bin from cwm using aromafm

Booted ROM, charged to 100% and calibrated using the battery calibration app.

It (fingers crossed) seems to have worked as the counter just fell to 99%!

Dammit, I've never been so happy to see my battery at 99% :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Good! Glad I could be of some help. : )

It should be enough with deleting just /system/bin/bq275xx_fwloader though.

Or actually, when I think about it, better still to just rename it.

mv /system/bin/bq275xx_fwloader /system/bin/bq275xx_fwloader.bak

I have now experimented and tried this solution. It does not work. I read it in another thread, the same one where I found the simple commands solution. Deleting the batteries fwloader does not work for us. The commands does though, I made them in to a recovery-script you can download from here.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
Thank you for your help! I'm absolutely ecstatic my phone can now (hopefully) continue to function normally after such a long time :good:

I have sent a PM to kast regarding our discussion. Let's see if/what/when/how he replies...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] moolokow:
Sir can you provide your compiled kernel? :) i been loyal to kappa since my first rooting my live with walkman and i am curious on what you've stated that kernel based on kappa you just compile is working flawlessly :) i hope that kast will back with a new and a positive new for us :D

EDIT: maybe i should follow the steps you provided earlier with 1.6 version :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] XanaRaquel:
Out of curiosity, what battery calibration app did you used? I also have a Xperia Mini and sometimes, after a full charge, the battery gets "stuck" on 100%. I'm using a custom ROM and Kappa v1.6 but this also happened when I was on the stock ROM and kernel. The trick I've been using to fix this is to power off the device, wait a few minutes and turn it back on.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Simple script to fix 100% battery

So, I just made a simple script to fix this 100% battery problem. I've tried it and no, unfortunately it's not a simple "run-and-forget". It needs to be run twice, some times even three times before it works. So here's how:

1. Enter recovery.

2. Install kappa-battery-calibrator.zip

3. It will reboot once it has calibrated battery. (Or sort of has)

4. Let it boot in to android. (Yes, it still says 100%)

5. Enter recovery.

6. Install kappa-battery-calibrator.zip

7. Wait for reboot and for android to start up.

8. Now all should be well.

If not then do the whole procedure once more and you're done. Like I said, some times twice is enough, some times three times is neccessery. I have noe idea why. But at least it works.

...until you take out the battery. Then you have to go through this process again.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
This one

If you read a few posts above, the fix that worked for me might work for you as well. I had the same problem as you, battery bug everywhere, all custom kernels and ROMs, wouldn't go away. It used to go away by power off, pull battery, re-insert, then power back on.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] RaphaelHam:
We need an update -_-
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
okay some observations about the battery fix after some days of use.

It definitely does work.

what worked for me was the steps outlined here which basically involved deleting that nasty bq275xx_fwloader file.

Just to test out the effectiveness of the fix, I let the battery drain out and the phone power off. I then powered it back on after connecting the charger.

I did face a minor issue in that now the battery charge indicator wouldn't move up (whereas previously it was stuck at 100% :p)

After a reboot and reconnecting the charger, that problem went away as well.

Since then I have charged the phone up to 100% and let it stay connected to the charger beyond 100% and the 100% battery problem is no more

I honestly don't know if it was just a problem related to that nasty file and not at all related to the kernels (since the issue disappeared after deleting the nasty - i hate that file now). Somebody will have to test out the various other kernels (I'm on Lupus based Doppler); I can't because of lack of time.

As a caution, if using the outlined method, try not to let the battery drain out entirely and charge it before the phone dies or you'll face the same issue I did

Otherwise all good. Thanks [MENTION=4559618]CTCaer[/MENTION], [MENTION=390446]Verbato[/MENTION], [MENTION=3690061]karandpr[/MENTION], [MENTION=373657]kast[/MENTION] and all other devs who put in their precious time, effort, dedication and hard work!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi there!

First of all, sorry for not being around lately, really sorry, but yes, I'm alive ;)

I'd like to express my gratitude to all the people that are keeping this kernel alive, either by using it, or patching it, while I'm away.

Seeing that so many people are still interested and participate in its development is really gratifying and really wished to thank you all.

Another thing I wanted to say out loud is that you can patch, fork, bend, squeeze this kernel as much as you want. It's not my work, it's based on a lot of people work that I gathered and cooked according to my own recipe. Most of the ingredients of this recipe is the hard work of some geniuses around here. I've only one request, if you don't mind, if you were to fork Kappa, please rename it to something else and start a new thread.

Whether you mention or not the original sources is up to you.

Now, to go back to the development status, whether there is still development or not and the rest...

The current status is, as you surely noticed, halted.

Halted doesn't mean stopped. I had to pause it because of various reasons, mainly because the last fixes I'd like to implement are not easy ones and I'd require time unfortunately I don't have at hand at the moment.

I have the impression that in the last betas the battery bug was fixed. Yet I see Verbato's work on fixing it. Is Verbato's work meant to be applied on 1.6 or the latest 1.7Beta, or are we talking about two different battery bugs?

Anyway... What got me to pause this development was that after extended use of the latest 1.7 Beta on my mango I unfortunately noticed, that, from time to time, the phone would reboot for apparently no reason. Didn't happen often, no, but it did happen from time to time when put in intesive use. This is not acceptable. Another thing I noticed is that battery life could be "random". I could get 3 days of battery with 1-2 calls a day and moderate internet use (mostly Telegram) and then suddenly, one day, for 100% to 0% in little more than 12h (ok, happened only once, but yet it happened).

This to me means that before labelling 1.7 out of Beta, further tests need to be performed. To do these tests I need... Time ;)

Time to be the full day at my desk, enough coffee, time to debug kernel logs, etc, etc. Unfortunately both work and private life don't allow me to spend even 5 minutes into this. Yet I never said it'll never happen. The simple thing I'm back here posting this means I'd really want to finish this project and provide to you and to me a final 1.7 of Kappa.

I'd like to compile a list of known bugs in the latest 1.7 Beta. In case you would like to help, please use the "Bug Report" function of this thread. As soon as I can (maybe July) I will have a look at them one by one. Hopefully by end of July 1.7 could be out.

Thanks to you all,

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
Good to have you back amongst us kast. Looking forward to your continued magic in the future (at your convenience)! :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Well, hi there to you too! : )

Well, I just git cloned the stuff you had at github. Made a kernel my self. Had the 100% battery bug and googled for any and all problems with our battery chip. Turned out there are some who struggle with the reverse problem, a "0%" bug (which is much worse, the phone turns on, the kernel will boot up, but the OS, as soon as it is started, shuts down - even with a fully charged battery, because it thinks the battery is empty). In the same thread I found that one person, CTCaer, had been in touch with Texas Instruments, who knew about the problems with their chipset. CTCaer found some commands one could pass to the kernel to make it reset the calibration for the battery. But the reply from Texas Instruments were just, "it works with the standard kernel and OS made by Sony, so it's not our fault". So CTCaer is the one who found and made the (or well, a) solution for the battery-bug.

Turned out, btw, that it was kernel 1.6 I had downloaded from github. But just as well, since that made me find a solution for it. I have recieved message after message saying I should ask you to post my message in the first post, others have suggested making a thread of it's own on this and ask for the mods to make it sticky. So there are several persons, appereantly, who struggle with the 100% bug.

I couldn't even get 1.7b to build properly. The wireless doesn't want to play along at all! And thanks for letting us use this kernel as we please. I will. ; )

I've even taken on karandpr's challenge, and am building a 180-ROM. I just had to! ; )

Mostly a proof of concept, but turned out to be fun once I got there. ; )

So then I can make a kernel with 1.7b with the correct partition-setup. But... Would be nice if you told us how to get the wireless working? Pretty pwease? :o
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
What ROM is this? i.e. based on? I'm always interested in slim ROMs :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
Saqib Nazm's Feather ROM. I've managed to make a decent xperia-rom with walkman, while still keeping it slim. What ever else than what is already installed can easily be installed through play store. Also, everything updated to latest version. Email, play store, es file explorer, etc. latest version.

I've decompiled everything I can decompile and deleted almost everything that isn't meant for MDPI.

But mostly, this is, like I said, just a proof of concept. Will make a larger one, 160, as well, with video, album and all that stuff.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Nice to see you alive. :highfive:

\

In my humble opinion 1.7 and 1.7Lite Branch are chaotic (for the lack of better words...) . In fact a lot of stuff appears to be changed unnecessarily :/.

As soon as I get time, I will work on 1.6 branch with limited set of patches from 1.7 + Extended partition :p

:eek:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi ,

glad to see you agan !! we do still have hope :D

thank you very much.

job.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
That's a brilliant idea! I'm not one for benchmarks but I *feel* Kappa offers both better performance and battery life than the other ICS kernels (no offence to any of the other devs or kernels :angel:).

Best to start from Kappa v1.4 or v1.6 and then see where you end up ;) :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hey kast ,

We are still waiting for updates please don't ignore us :) .

thank you very much .

job.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Arun Av:
So, should I say I am proud or sad to have the "2nd type" of battery bug here in my mini? :( The battery goes mad if it ever turns on (which is 1 out of 100 chances).. then from 70% to 60%, then again to 65%... it plays at its own.. and then comes the REAL problem.. if the phone reads the battery as 0% while online, it shuts down, and then goes the play of reboot- homescreen- 0% - reboot saga. I tried kappa, doppler, mesa and all are ineffective on this thing. Have to try with the command line fix by verbato, but I'm not sure if I did flash the same script while using helium that caused this issue. I am doomed, my device is doomed. Why is electronics such a B!!!#?!?! :( :(
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Verbato:
How old is this battery?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Arun Av:
hello there! I'm sorry I didn't see your reply at first on helium thread so posted here as well... The device and battery both are 3 years old approx. But nope, I know what you would advice me but the battery is ok I guess, because even 1 month ago it worked good, though it had the easy-type-100% bug then (means mesa kernel worked good). But with this second issue, I am seriously having a bad headache :(

Should I keep posting on kast's thread, I guess it's kind of offtopic so I will try experimenting with kernels and that script of yours, [MENTION=390446]Verbato[/MENTION] .. and then will see if it helps (please pray from your heart that it does)..

and btw, any idea if.. if and only if... the fix would work with kitkat roms/kernels? Am I being too offtopic? :( For now I guess I should Flash kappa 1.6 > install a custom stock ics rom > apply the script-fix (twice, thrice... ya I know) and see. Ok?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Get a new battery,borrow a new battery and try the fix.. Every electronic item works good last month ...Not necessarily not will work this month..3 years is too much time for a smartphone battery which gets charged and discharged every day !
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] cybercop007:
the link for downloading kappa 1.7 beta is not working or file removed for smultron/mini can any one provide me with the link for the kernel...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi there!

Anybody cares trying a new test version for Smultron-Mini / Mango-MiniPro?

Mini

Mango

Compared to 1.6...

Please see for a list of relevant changes included in this test builds

You have to consider that this version is a full rebuild of 1.6 towards 1.7

And yes, of course, it's got the 100% battery fix (included... The I2C one)

98afabe linux kernel 2.6.32.63

87b3fa6 Linux kernel 2.6.32.62

ed19531 Logger: Reclaim memory

2c7fc06 Updated sdio routines for WL12xx driver from 2.6.34 kernel

dd4fa29 Squashed update to 2.6.32.61

dea5b83 CPU Boot Boost reduce to 1305600

e531b19 Back to GZIP for Ramdisk

92d4adf SIO as default IOSCHED

8ebe0a9 Patched Video Drivers [Thanks: M66B]

89af4f3 Increased fb size for triple buffering

cd3f6bf Added triple buffering

af4b645 Optimized RCU Tiny

3a655a4 ARM: Add optimised swahb32() byteswap helper for v6 and above

571f233 block/deadline: tweaked for better performance on android

04516aa I2C Fixes for 100% Battery bug

09471e0 ROW IO Scheduler backport from 3.9

fe062fa ROW Updated from 3.4

847b1ca Default ROW and SmartassH3 for all configs

478c9fc uksm: Tunings for smartphone usage and relocate run default value

7b9a5f7 uksm: Removed unimplemented remote bug reporting system

a1900b7 uksm: Hack to fix inline compile error and disabled at boot

1423543 uksm: Ported Ultra-KSM 0.1.0 Experimental port for stock ICS semc-msm7x30 kernel.

bcf859b Havege (hrandom) bultin

197f2b7 UPDATE: vidc 720p drivers [Code Aurora]

35a105b Enable ipsec support for all configs

8371abe Underclock at 24/61 MHz + Fixes to swapfile

b51522a SmartassH3 boost pulse support + fixed sysfs

cd01319 Ignore firmware

8ae6005 staging: Update Snappy and add arm specifics

42cbd1e Device Config Changes

2fc934a Removed CPU Govs: brazilianwax, lionheart, minmax, savagedzen, userspace

22ff693 Updated GPU video drivers

65ffa54 Enable KEYRESET via sysfs interface (default is disabled, use echo "1" > /sys/power/keyreset/enable_reset to enable it)

9058c2e mogami: keyboard reset with HOME + POWER

Once again, thank you very much for your precious help

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] cethine:
Im using 1.7B12 on coconut, there is no problem, if u release new version for coconut, i will try it.

Thanks for work.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] cybercop007:
i have flashed it in my mini (kaSmultron561.img) will be using it with zellycream. you are doing hard work buddy.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi kast,

I just want to say before testing that I AM EXTREMLY HAPPY THAT YOU'RE BACK AFTER A VERY LONG TIME !!

and all thanks goes for you for supporting us more than 2 years !!

EDIT : kernel boots fine :D and now I'm testing .. I will report back in the night ( after 5 hours ) ..

job.