[GUIDE][ARC/NEO][29nov][.587] Information & Workaround to 0% battery issue

Search This thread

Bazoocaze

Senior Member
Aug 13, 2011
371
857
Porto Alegre
If you are using this workaround and are happy with it, please show it and press the thanks button. :D
Thank you,
Bazoocaze


Latest updates


29/nov/2012: Fuel Gauge Fix on Google Play

I published the Fuel Gauge Fix application v1.6.3 on the Google Play:

Free version:
https://play.google.com/store/apps/details?id=br.bazoocaze.fuelgaugefix.free

Donate version:
https://play.google.com/store/apps/details?id=br.bazoocaze.fuelgaugefix.donate

There is no differences between versions - install the version you want. Uninstall the standalone version before installing the play store version. The application data will not be transported between the standalone version and play store version, so take note of your customizations before uninstalling.

Changes in version 1.6.3:
-Added an option to allow changing the notification icon type.


18/sept/2012: Kernel patch (unlocked bootloader) for ICS .587
See the Patched kernel download section.


13/set/2012: CM9/10 FXP patched kernel
Thanks to svanteson
http://forum.xda-developers.com/showthread.php?t=1763227


12/set/2012: Locked bootloader patch updated to work with .587 stock firmware
http://forum.xda-developers.com/showthread.php?p=28871812#post28871812


10/aug/2012: Doing some research
You asked, so I'm doing some more research on an automatically way of restarting from software an early aborted charging process.


APK Updates

11/feb/2012: New FuelGaugeApp v1.6
There is a new FuelGaugeApp version - now it supports CPU clock detection.


APK Fix From Bazoocaze:
Please use the latest version, and with patched kernel v4 or later. See "Android APK helper". See "APK Issues".

v1.6 :) Detects CPU clock and calculates CPU consumption
v1.5.4: :) set battery to 100% on charger disconnected
v1.5.3: :) old - test version
v1.5.2: :) old - updated charger detection
v1.5.1: :) old - updated to sense GPS state and screen brightness
v1.5: :( old - this version was deployed with a bug in charging logic - please dont use
v1.4: :) old - updated menu icons, and show battery % on notification text.
v1.3: :) old - updated notification icon[/B]
v1.2: :) old - ugly notification icon, first charge issues
v1.1: :( failed - found a noob bug on APK - sorry
v1.0: :( failed
v1.0: :( failed


Stock kernel Driver Updates

v4: :) use this: allow driver to fake report 85% battery. Use with lastest APK FIX for online battery capacity changes. See "Kernel Issues". See "Warnings"
v3.1: :( failed: allow driver to fake report 85% battery. See "Issues". See "Warnings".
v3: :( failed: success: allow driver to fake report 100% battery. See "Issues".
v2: :( failed: leave/enter ROM mode (flash mode) - failure to write to 0x16 (0x0B) i2c address
v1: :( failed: reset / factory restore fuel gauge - failure to write to 0xAA (0x55) i2c address


FAQ

[Q] What is this?
[A] This is a workaround/patch to 0% battery issue caused by downgrading firmware from 2.3.4 to 2.3.2.

[Q] I need this patch?
[A] If your battery shows 0% and your android shutdown and does not charge, try to remove battery for 30 seconds and put it back. If this does not solve the issue, flash back stock 2.3.4 firmware. If this does not solve the issue, replace your phone using your warranty from Sony. If this does not solve the issue and you wish to take the risks, then this workaround is for you.

[Q] What kind of failure is this 0% battery issue?
[A] This is an unrecoverable hardware failure on the fuel gauge controller of the Arc/Neo. On our research, we concluded that no software can correct this.

[Q] There will be an official patch from Sony?
[A] No, because it's an unrecoverable hardware failure.

[Q] What I need to take this workaround?
[A] You have two options: unlocked bootloader and locked bootloader
Primary method - for locked bootloader / unlocked bootloader: you need root, BusyBox, android 2.3.3 or later, and follow the steps on http://forum.xda-developers.com/showthread.php?p=28871812#post28871812
Alternate method - for unlocked bootloader: if primary method fail, you need and unlocked bootloader device, android 2.3.3 or later, and follow the steps on this thread.

[Q] Primary method: what are the steps to apply the fix on my phone - (locked and unlocked bootloader)?
[A] First, read the full post, especially the FAQ.
Next, see http://forum.xda-developers.com/showthread.php?p=28871812#post28871812

[Q] Alternate method: what are the steps to apply the fix on my phone (only for unlocked bootloader)?
[A]
Only use this method if the primary method does not work for you.
1. First, read the full post, especially the FAQ. In case of doubt, you can use this guide to know how to do things:
http://forum.xda-developers.com/showthread.php?t=1133650
2. Unlock your booloader
http://forum.xda-developers.com/showthread.php?t=1551494&highlight=bootloader
http://forum.xda-developers.com/showthread.php?t=1034087
3. Grab the most recent kernel patch from this thread. The file is boot.img.xxx.7z for your phone (ARC / NEO). We call this the kernel patch, or only the patch.
4. You must be same firmware and patch version, so if you aren't firmware xxx, use flashtools to flash the correct firmware, and wipe the data if downgrading firmware version. You can find some recent stock firmwares in the [Firmwares (.FTF)] section.
http://forum.xda-developers.com/showthread.php?t=1304634
5. Use fastboot (or flashtools) to flash boot.img contained in file boot.img.xxx.arc.7z (or boot.img.xxx.neo.7z for NEO users). Flash the .img file, not the .7z file :) .
http://forum.xda-developers.com/showthread.php?t=1116970
PHP:
fastboot flash boot boot.img
6. Now you have a phone showing allways 85% battery capacity.
7. Install most recent FuelGaugeFixV??.apk from this thread (Bazoocaze version).
8. For the first time, make sure the charger is plugged, and select "Start full charge" from the apk fix menu (use the menu button to show options). A full charge takes 2h00 ~ 2h30 for stock charger, and 3h00 ~ 3h30 for USB.
9. Now you have a fully charged phone, and apk fix updates battery % acordingly to phone usage.
10. If you wish, you can now root your phone using the instructions on the section [Root for unlocked bootloaders].
11. See "Kernel issues" and "APK issues".
12. Press the tanks button on this thread, and optionally feel free to buy me some gift/beer/pizza/coffe. :D
http://forum.xda-developers.com/donatetome.php?u=4215483
13. Finish

[Q] There is another way of obtaining online battery % via software?
[A] Simple answer: no. Calculating battery % needs a coloumb counter hardware, that is the fuel gauge in our case. No fuel gauge, no coloumb count, no battery %.
Extended answer: there is no way of obtaining online battery capacity without the help of the fuel gauge, because battery dont have a "% capacity", but have a "full charged maximum capacity" and the actual capacity is the amount of charge left from the total minus the cumulative coloumb count of current drained by phone. The fuel gauge is responsible for sensing the coloumb count, and without it, we are only poor guessing the actual battery % capacity. This way, if the fuel gauge had an unrecoverable hardware failure, none can be made by us nor SE to recover the phone capacity of reporting battery status - its impossible to calculate without a coloumb counter in hardware.

[Q] But I installed your stuff and the battery % seems to be increasing / decreasing with use / charge. You said its impossible to obtain battery % via software. Whats happening?
[A] It's a guess value calculated based on peripheral usage of your phone, and not on stats measured from battery module. The usage is based on statistical usage of my phone, so maybe its not correct, but works.

[Q] I flashed the patch, and now my phone is not charging. Can you help?
[A] Do not let the phone runs out of charge. Recharge frequently. Try to charge with other chargers, and on the USB on PC. Try to leave the phone shuted off charging on PC, and go back after a time (1 hour) to see if the phone gets back on. If this does not work, I cannot help you.

[Q] What are the risks?
[A] See [Warnings] section.

[Q] I dont know how to {flash boot.img / unlock bootloader / use fastboot / use flashtool / etc}. Can you help?
[A] Every tool and proceding on this thread can be found on the XDA forum. Search in the forum for links / tutorials / manuals / guides.

[Q] I want this on CM / MIUI / Stock version xxx. You version/firmware sucks. Please, can you make a patch for the other version/firmware?
[A] See "Compatibility" section, or ask your favorite custom kernel / firmware developer to generate a patched version based on my work. Also, I did post the source code of my changed version of fuel gauge kernel driver, so you can make your own modified kernel version, or port the changes to CM / MIUI or other custom firmwares. Please respect my work and time spent and give me the credits on the kernel patch if you copy/use it.

[Q] I installed your stuff and my battery % is stuck on 85% or other value. Can you help?
[A] Have you installed the Fuel Gauge Fix APK and started the monitor service?
Also, make sure you dont have a task killer messing with the apk fix - it must runs ALL THE TIME to monitor peripheral usage. Also, make sure you installed the correct version of kernel and apk fix - check app version and kernel version, to make sure you have latest version. Also, you need to be on correct stock firmware version before patching the kernel.
If all versions are ok, try to stop the apk fix service and clean app data. If this cannot help, flash stock firmware (watch out to match the firmware version and kernel version), wipe the data, patch the kernel, and install app fix.

[Q]I'm using the patch, but I don't know why it seems like the phone turns off itself and needs to plug in after only X hours of usage or something.
[A] First, you can't charge offline (android not booted up). If the battery percentage doesn't change, battery driver stops the charging process.
Also, remember to choose the app option "Start full charge" BEFORE connecting the charger. Otherwise, the sudden negative variation on the battery charge caused by the option "Start full charge" selected AFTER connecting the charger may stop the process by safety measures.

[Q] Can you hide the icon on notification bar or add it in menu setting?
[A] Yes. Look into the application menu options.

[Q] I want to compile my own version of patched kernel?
[A] See the [Compile your own version] section.

[Q] Where can I find the firmware .FTF files to flash on my device?
[A] You can find some recent stock firmwares (not patched) on the [Firmwares (.FTF)] section. Please note that this versions are STOCK, not patched. Don't forget to apply the kernel patch after flashing this firmwares.

[Q] What can I do and cannot do with this patch on my phone?
[A]You cannot:
- Charge your phone offline (Android not running). The charge will stop after some minutes.
- Charge your phone with the Fuel Gauge Fix App not running. The charge will stop after some minutes.
- Leave your phone charging for a long time / charge it at night. The battery will start to discharge after it reach 100%, so you must disconnect it from the charger after that.
- Connect the charger and then select "Start Full Charge". The charge may stop after some minutes. You must select "Start Full Charge" before connecting the charger. You can try to charge without selecting "Start Full Charge" (if the battery percent is low) and see if it work.
You can:
- Use your phone as you want.
- Use it while charging.
- Play games.
- Set your battery percent to 100% if you charge for more than 1h30 and the percent stops below 100%. In this case the calculated charging rate may be slower than the real charging rate, and the real battery may be reaching 100% before the calculated percent.
- Fine tune the software battery capacity and consumption parameters on the Fuel Gauge Fix App. Try to take a mean of total consumption starting from 1500000uA from your usage, and change the value accordingly. The percent will reflect the value, so if you lower the value (say 1400000) you will get a low percent early, and if you rise the value (say 1600000), you will get a low percent later. Don't forget to mantain the charge current value with a relative value for a 1h30 to 2h30 charging time. Ask for help on thread to know more.

[Q] I like your work, and it worked fine for me. Thank you.
[A] I'm glad to know this. So, hit the thanks button, for me to know you liked. Or buy me some coffe, beer and pizza (fuel of a dev).


APK Issues

All versions:
- When the phone runs out of charge, the phone will simply shutdown without warning. There will be no Android warning, since the dead fuel gauge is the responsible for notifying the system about battery empty. This issue cant be fixed - you need to live with it.
- There is no way for the charger monitor to guess the current charge, so it starts with 100% on the first run. If your battery status is low when you start the monitor for the first time, maybe you get out of charge early before reaching 0%, and them you cant get a full charge until you reach a low percent value again. Use the "Start full charge" menu option on apk fix to make the phone take a full 3 hours charge.
- The phone does not charge to 100% and the charge process stops early: your are not using the correct firmware / patch / apk fix. Verify the instaled versions and install correct version. Also, do not use the phone during charge, because the charge process may be disable by an overheat event occured during charge.
- The phone does not charge to 100% and the charge process stops early: maybe your battery is full and the charging process is done. Disconnect the charger, and set battery to 100% if needed.


Kernel Issues

All versions:
- You must use the same Kernel and System version. This way, your Arc/Neo must be in the correct firmware before applying the kernel patch. Look for the patched kernel version on this thread, and flash the corresponding firmware/ROM stock version. If you dont use same Kernel and System ROM version, maybe you get temporary innoperant Wifi or other hardware malfunction until flash correct version.
Try to flashtool the correct .FTF firmware before flashing the patched boot.img, and see if your issues go away.
- If your phone stops charging, try with different chargers (official / others), and with charging via USB on PC.
- Try to not let your phone shutdown by running out of charge. The battery has a safety circuit to prevent undercharging that shutdown before lower limit, but case the protection fails and battery voltage runs below the lower limit threshould, the battery may become permanent disabled by safety circuit.
- If you know what are you doing, you can try this (kernel patch needed) on android shell to modify battery % capacity (the 85 indicates 85%):
Code:
echo 85 > /sys/class/power_supply/bq27520/set_capacity
The /sys/class/power_supply/bq27520/set_capacity file only exists in our patched kernel.


Android APK helper

Please use latest version. Use with patched kernel v4 or later. See "APK Issues".

v1.6:
Last changes:
- Detects CPU clock, and calculates CPU consumption accordingly.

v1.5.4:
Last changes:
- Set battery to 100% on charger disconnected event, after a minimum charging time.
- Charging statistics, like average charge and discharge time.

v1.5.3: test version
v1.5.2: old
v1.5: old
v1.4: old
v1.3: old
v1.2: old - must be kernel patch v4
v1.1: old
v1.0: old


Fuel Gauge Fix APK description

Its a service that runs all the time, calculating battery consumption / charge, and updating the battery % of the phone, trying to mimic te lost functionality of the defective fuel gauge. Use it in conjuntion with the patched Kernel. Its does not works without the patched Kernel (missing set_capacity functionality in kernel).


How to use the APK

- The APK needs android 2.3.3 or later.
- The APK needs patched kernel ou patched fuel gauge module.
- Install the latest patched kernel / module from this thread (watch out for kernel patch firmware version requirement), and this APK.
- The APK only update the battery % on patched kernels.
- Open the APK (Fuel Gauge Fix), Click "Start monitor", and configure the "Charger Monitor" to start on boot.
- Test the APK to see if it changes the battery % on phone.
- If it wont work, look into the screen of APK, on field "Patch status", and report here you problem.
- If it works now you can use your phone (mostly) normally.
- For the first time, and when necessary, do a full charge on the battery, selecting the menu option "Start full charge".


How APK fix works

- Runs every 1 minute on screen disabled, and every 5 seconds on screen enabled.
- Scans for connected / enabled hardware, like charger, screen, bluetooth, wifi, celular.
- Starting from v1.6, it will take in count the CPU clock / usage, too. Use CPU Spy APK to debug CPU usage.
- Generate consumption prediction for enabled hardware.
- Simulate coloumb counting on in memory battery stats, charging / discharging the stats accordingly, and updating the battery % show by phone.
- There is an 1% limit, that is, the phone will never shutdown while there is power on the battery.
- On the first run, the fix start with 100% stats. Full charge your phone to help sincronize the calculated value with the real value. The real value cant be get by software, thanks to the faulty hardware fuel gauge.
- The fix memorize the last stats, so if you stop the service or reboot the device, the monitor must maintain the same stats on next run. Use the app menu to reset stats to 100%.


Kernel / ROM compatibility list

0% friendly: this kernels / ROMs already have the kernel patch, so you only need to install the Fuel Gauge Fix APK start the monitor service:

[ARC/ARC S] DoomKernel (thanks to DooMLoRD)

[ARC/ARC S] CM9/10 FXP kernel (thanks to svanteson)
http://forum.xda-developers.com/showthread.php?t=1763227

[NEO] NightElf (thanks to Night-Elf)
forum.xda-developers.com/showthread.php?t=1468043

0% unfriendly: the developers of these work choose to not integrate the kernel patch, so you will have a hard time trying to make the patch working:
- CyanogenMod 7 / 9 / 10
- FXP


Warnings

- Very important: I just now discovered that the battery temperature sensor may have stopped to work properly because of the the fuel gauge issue. Thus, the battery may overheat in extreme situations, which reduces the average life of the battery or can even result in fire in rare cases. Even so, the sensor is still read correctly by the controller BQ24158, which inhibits the charging in event of overheating (temp > 45oC). Either way, avoid charging the battery and operating the phone at the same time, to minimize the heat generated during charging. Also, please charge the battery away from the sun or hot spots, and no more than three hours on the charger. Knowing this, if you think there is a risk for you or your equipment, please do not use this patch.
- This is an experimental kernel, compiled from stock kernel source code supplied by Sony. Use it on your own risk.
- If you unlock your bootloader, you have NO WARRANTY from Sony.


Requirements for the kernel patch

- Xperia Arc/Neo
- Firmware version 2.3.3 or later (APK fix requirement)
- Unlocked bootloader
- Fastboot (to flash the boot.img)


Credits

Initramdisk from DooMLoRD thread
First APK Fix script v1.1 from FiDra
steryman for various patched version
JasonStein for his MIUI patched version
DooMLoRD for patched DooMKernel version
svanteson for CM patched version
zdzihu for the first locked bootloader patch
Kernel sources from Sony
ARM compiler from CodeSourcery
IDE from Eclipse team
Android SDK from Google


Patched kernel download

:) If you think my work is helping, please press the thanks button.
- All versions here are STOCK kernel, unless explicitly stated. Ignore the image/logo on startup. For other kernels, see "Other kernels" section.

v4:
- Look in the download file name for version information. You must use the same firmware and patched kernel version. See "Kernel issues".


ICS 4.1.B.0.587
ARC: boot.img.4.1.B.0.587.lt15i.7z - 7 MB
http://www.mediafire.com/?jssaye1xm2ohva6

NEO: boot.img.4.1.B.0.587.mt15i.7z - 7 MB
http://www.mediafire.com/?ns8049q084kihio


(old) ICS 4.1.B.0.431

ARC: boot.img.4.1.B.0.431.lt15i.7z
http://www.mediafire.com/?ttldhug1zl487nk

NEO: boot.img.4.1.B.0.431.mt15i.7z
http://www.mediafire.com/?4so293y7o899kwa


- (old) NEO boot.img patched kernel .62:
http://www.mediafire.com/?7g6gz2mpp1ljb46

- (old) Patched Kernel for Xperia ARC / NEO (one zip file, 2 img files - choose arc/neo to flash) version 4.0.1.A.0.283:
http://www.mediafire.com/?64ogvfgp8xp8btg


Stock firmwares (.FTF)

These are stock firmwares, not patched, not rooted. You can flash this firmware using flashtools, then flash the boot.img patch.
If you have an unlocked bootloader you can use the method described in the section "Root for unlocked bootloaders" to root your device after firmware flashing.


GingerBread Android 2.3

NEO Firmware 4.0.2.A.0.42 Android 2.3.4 Generic Global(World)
MT15i_4.0.2.A.0.42_GLOBAL.7z
http://www.mediafire.com/?ic223ahl1sbftbj
http://115.com/file/e6gvbzgp
http://www.multiupload.com/ZHYL4RSZGW

ARC Firmware 4.0.2.A.0.58 Android 2.3.4 Generic HK
http://www.wupload.com/file/2536357702/LT15i_4.0.2.A.0.58_Generic_Global_HK.rar

ARC Firmware 4.0.2.A.0.42 Android 2.3.4 Generic Global(World)
LT15i_4.0.2.A.0.42_Generic_Global.ftf
http://www.wupload.com/file/2328127472/LT15i_4.0.2.A.0.42_Generic_Global.ftf


ARC ICS 4.0.4

LT15i_4.1.B.0.587_Generic Global World.7z
188Mb
http://www.mediafire.com/?xucot63l30epa4y

LT15i_4.1.B.0.431_Generic Central Europe 1 (cust_1247-1041).7z
188Mb
http://www.mediafire.com/?6jrtwqvn2f9mj1d

LT15i_4.1.B.0.431_GenericWorldFR.7z
195Mb
http://www.mediafire.com/?qbip855iltbv5is


Root for unlocked bootloaders

Please use this thread:
http://forum.xda-developers.com/showthread.php?t=1871981


Source code

In this post you can find the source code of my changed version of fuel gauge kernel driver (bq27520-kernel-driver.7z), so you can make your own modified kernel version, or port the changes to CM / FXP / MIUI or other custom firmwares. Please respect my work and time spent and give me the credits on the kernel patch if you copy/use it.


Compile your own version

This are simplified steps. If you dont know how to do, search in the forum.
- First, download the stock kernel source for Xperia (watch out for the correct version), or the sources for your custom ROM you want to use if its not compatible with stock kernel. The developer thread of dev Kalled from Sony (search on developer thread) has some instructions on how to compile the kernel.
This is the direct link to download Sony stock kernel sources:
http://developer.sonymobile.com/downloads/opensource/
- For the ARM compiler, download the CodeSourcery arm eabi compiler version 2010q1.
https://sourcery.mentor.com/sgpp/lite/arm/portal/release1294
- Install the compiler on Linux (You can use a virtual machine if you have Windows - use Virtual Box or VMWave Player, both are free for home use).
- Overwrite the bq27520 driver source code with the patched driver from this thread.
- Next, follow the guide on Kalled thread to select phone version and compile the Kernel.
- In the end of compilation, you get a zImage file, that is YOUR Kernel. Congratulations.
- You need a ramdisk. If you are targeting a custom ROM, get a ramdisk compatible with your custom ROM. Also, you can go to DoomLord thread about ramdisk and get a ramdisk suitable for your building. Or generate/use your own ramdisk if you know how. If you use other's ramdisk, give theirs credit.
- With kernel image and ramdisk, generate the file boot.img using mkbootimg tool from Android SDK, or abootimg tool from kubuntu repositories.
- If you choose to use mkbootimg, download a compiled version of mkbootimg, or compile your own version from Android SDK.
- Now you have a boot.img file. Flash it on your phone using fastboot and you are done. :)


Supporters :D

The following people have appreciated my work and time spent on this, and made me a contributiuon/bought me some gift:
- Beatmakernolv
- icet925
Thank you so much. :D I'm glad you like my work.
 

Attachments

  • bq27520-kernel-driver.7z
    12 KB · Views: 1,568
  • boot.img.4.0.2.A.0.42.arc.7z
    6.1 MB · Views: 3,397
  • boot.img.4.0.2.A.0.42.neo.7z
    6.1 MB · Views: 3,158
  • boot.img.4.0.2.A.0.62.arc.7z
    6.8 MB · Views: 2,645
Last edited:

Bazoocaze

Senior Member
Aug 13, 2011
371
857
Porto Alegre
this is log file of my arc

Thank you.

PHP:
<3>[    6.701660] bq27520 0-0055: Failed recover ROM mode
<6>[    6.701751] bq27520 0-0055: PATCH: entering failure recovery
<3>[    6.702056] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<6>[    6.702178] bq27520 0-0055: PATCH: get_status: failed to write - 0xfffffffb
<6>[    6.702331] bq27520 0-0055: PATCH: first status: 0xfffffffb
<6>[    6.702453] bq27520 0-0055: PATCH: reseting controller
<3>[    6.706390] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<3>[    7.719360] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<6>[    7.719512] bq27520 0-0055: PATCH: get_status: failed to write - 0xfffffffb
<6>[    7.719635] bq27520 0-0055: PATCH: reset status: 0xfffffffb
<6>[    7.719757] bq27520 0-0055: PATCH: factory restore controller
<3>[    7.719970] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<3>[    8.729339] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<6>[    8.729461] bq27520 0-0055: PATCH: get_status: failed to write - 0xfffffffb
<6>[    8.729614] bq27520 0-0055: PATCH: factory restore status: 0xfffffffb
<3>[    8.729827] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)
<6>[    8.729949] bq27520 0-0055: PATCH: get_status: failed to write - 0xfffffffb
<3>[    8.730163] bq27520 0-0055: PATCH: failed

Lines containing "PATCH:" are the recovery commands I'm sending to the controller during driver load. The problem is worse than I'm thinking - the fuel gauge is not responding for the write commands.

But I see that two important case tests that I wrote did not execute at all. I will correct this bug and generate another kernel version.
 

SireJoe

Member
Oct 21, 2011
27
2
Vancouver
If you are able to, might I suggest looking at the 146 rev. and compare it to the 283 rev. to see what differences it is sending/receiving to the battery or the i2c driver?

Im pretty sure anyone who flashes to rev.283 (the original) has no luck at all in regards to any battery status change, but with rev.146 I believe everyone has had the 1% battery status, so whatever the 146 is doing is allowing for some form of percentile increase of the battery charge.

I wonder if in the 146 the driver starts for a short burst of time and then crashes right away giving it the 1% mark that we all see, where as in any other version it doesnt even get far enough to show the 1%.

I dunno, there has to be something there that is pretty drastically different that we can go from using the phone all day to not being able to use it at all unplugged.
 
  • Like
Reactions: Bazoocaze

Bazoocaze

Senior Member
Aug 13, 2011
371
857
Porto Alegre
If you are able to, might I suggest looking at the 146 rev. and compare it to the 283 rev. to see what differences it is sending/receiving to the battery or the i2c driver?
.

Thank you for your point, I will diff the drivers to look for changes.

Until now, my research on this showed that the fuel gauge has it's own firmware, that are upgraded if needed each system startup (the firmware are 2 files contained in the system ROM). Moreover, the firmware is merged with proprietary battery data local to the fuel gauge before each firmware upgrade. I think that the system downgrade resulted in failure to downgrade the fuel gauge firmware/local data, leaving the fuel gauge in an invalid internal state.

Anyway, I'm working on a driver version that fakes the battery status, showing 100% all the time, to help people with no warranty options from Sony.
 

SireJoe

Member
Oct 21, 2011
27
2
Vancouver
Can you upload the kernel.sin? Or would I even be able to flash it seeing as how it may not be signed?

If you could even upload it anyways. I am always looking to try something out to get this issue resolved.
 

Bazoocaze

Senior Member
Aug 13, 2011
371
857
Porto Alegre
Hi. I wrote a new version (v3) that try to (fake) lock the battery capacity to 100%.

Try this, and report back if it function properly on your phone. In case it fails, pelase post the log dump.

I think the charger will still works, because the charging process is based on the real battery voltage, and not on the reported value from the dead fuel gauge.
 
  • Like
Reactions: DAVIDSIKH

Top Liked Posts

  • There are no posts matching your filters.
  • 128
    If you are using this workaround and are happy with it, please show it and press the thanks button. :D
    Thank you,
    Bazoocaze


    Latest updates


    29/nov/2012: Fuel Gauge Fix on Google Play

    I published the Fuel Gauge Fix application v1.6.3 on the Google Play:

    Free version:
    https://play.google.com/store/apps/details?id=br.bazoocaze.fuelgaugefix.free

    Donate version:
    https://play.google.com/store/apps/details?id=br.bazoocaze.fuelgaugefix.donate

    There is no differences between versions - install the version you want. Uninstall the standalone version before installing the play store version. The application data will not be transported between the standalone version and play store version, so take note of your customizations before uninstalling.

    Changes in version 1.6.3:
    -Added an option to allow changing the notification icon type.


    18/sept/2012: Kernel patch (unlocked bootloader) for ICS .587
    See the Patched kernel download section.


    13/set/2012: CM9/10 FXP patched kernel
    Thanks to svanteson
    http://forum.xda-developers.com/showthread.php?t=1763227


    12/set/2012: Locked bootloader patch updated to work with .587 stock firmware
    http://forum.xda-developers.com/showthread.php?p=28871812#post28871812


    10/aug/2012: Doing some research
    You asked, so I'm doing some more research on an automatically way of restarting from software an early aborted charging process.


    APK Updates

    11/feb/2012: New FuelGaugeApp v1.6
    There is a new FuelGaugeApp version - now it supports CPU clock detection.


    APK Fix From Bazoocaze:
    Please use the latest version, and with patched kernel v4 or later. See "Android APK helper". See "APK Issues".

    v1.6 :) Detects CPU clock and calculates CPU consumption
    v1.5.4: :) set battery to 100% on charger disconnected
    v1.5.3: :) old - test version
    v1.5.2: :) old - updated charger detection
    v1.5.1: :) old - updated to sense GPS state and screen brightness
    v1.5: :( old - this version was deployed with a bug in charging logic - please dont use
    v1.4: :) old - updated menu icons, and show battery % on notification text.
    v1.3: :) old - updated notification icon[/B]
    v1.2: :) old - ugly notification icon, first charge issues
    v1.1: :( failed - found a noob bug on APK - sorry
    v1.0: :( failed
    v1.0: :( failed


    Stock kernel Driver Updates

    v4: :) use this: allow driver to fake report 85% battery. Use with lastest APK FIX for online battery capacity changes. See "Kernel Issues". See "Warnings"
    v3.1: :( failed: allow driver to fake report 85% battery. See "Issues". See "Warnings".
    v3: :( failed: success: allow driver to fake report 100% battery. See "Issues".
    v2: :( failed: leave/enter ROM mode (flash mode) - failure to write to 0x16 (0x0B) i2c address
    v1: :( failed: reset / factory restore fuel gauge - failure to write to 0xAA (0x55) i2c address


    FAQ

    [Q] What is this?
    [A] This is a workaround/patch to 0% battery issue caused by downgrading firmware from 2.3.4 to 2.3.2.

    [Q] I need this patch?
    [A] If your battery shows 0% and your android shutdown and does not charge, try to remove battery for 30 seconds and put it back. If this does not solve the issue, flash back stock 2.3.4 firmware. If this does not solve the issue, replace your phone using your warranty from Sony. If this does not solve the issue and you wish to take the risks, then this workaround is for you.

    [Q] What kind of failure is this 0% battery issue?
    [A] This is an unrecoverable hardware failure on the fuel gauge controller of the Arc/Neo. On our research, we concluded that no software can correct this.

    [Q] There will be an official patch from Sony?
    [A] No, because it's an unrecoverable hardware failure.

    [Q] What I need to take this workaround?
    [A] You have two options: unlocked bootloader and locked bootloader
    Primary method - for locked bootloader / unlocked bootloader: you need root, BusyBox, android 2.3.3 or later, and follow the steps on http://forum.xda-developers.com/showthread.php?p=28871812#post28871812
    Alternate method - for unlocked bootloader: if primary method fail, you need and unlocked bootloader device, android 2.3.3 or later, and follow the steps on this thread.

    [Q] Primary method: what are the steps to apply the fix on my phone - (locked and unlocked bootloader)?
    [A] First, read the full post, especially the FAQ.
    Next, see http://forum.xda-developers.com/showthread.php?p=28871812#post28871812

    [Q] Alternate method: what are the steps to apply the fix on my phone (only for unlocked bootloader)?
    [A]
    Only use this method if the primary method does not work for you.
    1. First, read the full post, especially the FAQ. In case of doubt, you can use this guide to know how to do things:
    http://forum.xda-developers.com/showthread.php?t=1133650
    2. Unlock your booloader
    http://forum.xda-developers.com/showthread.php?t=1551494&highlight=bootloader
    http://forum.xda-developers.com/showthread.php?t=1034087
    3. Grab the most recent kernel patch from this thread. The file is boot.img.xxx.7z for your phone (ARC / NEO). We call this the kernel patch, or only the patch.
    4. You must be same firmware and patch version, so if you aren't firmware xxx, use flashtools to flash the correct firmware, and wipe the data if downgrading firmware version. You can find some recent stock firmwares in the [Firmwares (.FTF)] section.
    http://forum.xda-developers.com/showthread.php?t=1304634
    5. Use fastboot (or flashtools) to flash boot.img contained in file boot.img.xxx.arc.7z (or boot.img.xxx.neo.7z for NEO users). Flash the .img file, not the .7z file :) .
    http://forum.xda-developers.com/showthread.php?t=1116970
    PHP:
    fastboot flash boot boot.img
    6. Now you have a phone showing allways 85% battery capacity.
    7. Install most recent FuelGaugeFixV??.apk from this thread (Bazoocaze version).
    8. For the first time, make sure the charger is plugged, and select "Start full charge" from the apk fix menu (use the menu button to show options). A full charge takes 2h00 ~ 2h30 for stock charger, and 3h00 ~ 3h30 for USB.
    9. Now you have a fully charged phone, and apk fix updates battery % acordingly to phone usage.
    10. If you wish, you can now root your phone using the instructions on the section [Root for unlocked bootloaders].
    11. See "Kernel issues" and "APK issues".
    12. Press the tanks button on this thread, and optionally feel free to buy me some gift/beer/pizza/coffe. :D
    http://forum.xda-developers.com/donatetome.php?u=4215483
    13. Finish

    [Q] There is another way of obtaining online battery % via software?
    [A] Simple answer: no. Calculating battery % needs a coloumb counter hardware, that is the fuel gauge in our case. No fuel gauge, no coloumb count, no battery %.
    Extended answer: there is no way of obtaining online battery capacity without the help of the fuel gauge, because battery dont have a "% capacity", but have a "full charged maximum capacity" and the actual capacity is the amount of charge left from the total minus the cumulative coloumb count of current drained by phone. The fuel gauge is responsible for sensing the coloumb count, and without it, we are only poor guessing the actual battery % capacity. This way, if the fuel gauge had an unrecoverable hardware failure, none can be made by us nor SE to recover the phone capacity of reporting battery status - its impossible to calculate without a coloumb counter in hardware.

    [Q] But I installed your stuff and the battery % seems to be increasing / decreasing with use / charge. You said its impossible to obtain battery % via software. Whats happening?
    [A] It's a guess value calculated based on peripheral usage of your phone, and not on stats measured from battery module. The usage is based on statistical usage of my phone, so maybe its not correct, but works.

    [Q] I flashed the patch, and now my phone is not charging. Can you help?
    [A] Do not let the phone runs out of charge. Recharge frequently. Try to charge with other chargers, and on the USB on PC. Try to leave the phone shuted off charging on PC, and go back after a time (1 hour) to see if the phone gets back on. If this does not work, I cannot help you.

    [Q] What are the risks?
    [A] See [Warnings] section.

    [Q] I dont know how to {flash boot.img / unlock bootloader / use fastboot / use flashtool / etc}. Can you help?
    [A] Every tool and proceding on this thread can be found on the XDA forum. Search in the forum for links / tutorials / manuals / guides.

    [Q] I want this on CM / MIUI / Stock version xxx. You version/firmware sucks. Please, can you make a patch for the other version/firmware?
    [A] See "Compatibility" section, or ask your favorite custom kernel / firmware developer to generate a patched version based on my work. Also, I did post the source code of my changed version of fuel gauge kernel driver, so you can make your own modified kernel version, or port the changes to CM / MIUI or other custom firmwares. Please respect my work and time spent and give me the credits on the kernel patch if you copy/use it.

    [Q] I installed your stuff and my battery % is stuck on 85% or other value. Can you help?
    [A] Have you installed the Fuel Gauge Fix APK and started the monitor service?
    Also, make sure you dont have a task killer messing with the apk fix - it must runs ALL THE TIME to monitor peripheral usage. Also, make sure you installed the correct version of kernel and apk fix - check app version and kernel version, to make sure you have latest version. Also, you need to be on correct stock firmware version before patching the kernel.
    If all versions are ok, try to stop the apk fix service and clean app data. If this cannot help, flash stock firmware (watch out to match the firmware version and kernel version), wipe the data, patch the kernel, and install app fix.

    [Q]I'm using the patch, but I don't know why it seems like the phone turns off itself and needs to plug in after only X hours of usage or something.
    [A] First, you can't charge offline (android not booted up). If the battery percentage doesn't change, battery driver stops the charging process.
    Also, remember to choose the app option "Start full charge" BEFORE connecting the charger. Otherwise, the sudden negative variation on the battery charge caused by the option "Start full charge" selected AFTER connecting the charger may stop the process by safety measures.

    [Q] Can you hide the icon on notification bar or add it in menu setting?
    [A] Yes. Look into the application menu options.

    [Q] I want to compile my own version of patched kernel?
    [A] See the [Compile your own version] section.

    [Q] Where can I find the firmware .FTF files to flash on my device?
    [A] You can find some recent stock firmwares (not patched) on the [Firmwares (.FTF)] section. Please note that this versions are STOCK, not patched. Don't forget to apply the kernel patch after flashing this firmwares.

    [Q] What can I do and cannot do with this patch on my phone?
    [A]You cannot:
    - Charge your phone offline (Android not running). The charge will stop after some minutes.
    - Charge your phone with the Fuel Gauge Fix App not running. The charge will stop after some minutes.
    - Leave your phone charging for a long time / charge it at night. The battery will start to discharge after it reach 100%, so you must disconnect it from the charger after that.
    - Connect the charger and then select "Start Full Charge". The charge may stop after some minutes. You must select "Start Full Charge" before connecting the charger. You can try to charge without selecting "Start Full Charge" (if the battery percent is low) and see if it work.
    You can:
    - Use your phone as you want.
    - Use it while charging.
    - Play games.
    - Set your battery percent to 100% if you charge for more than 1h30 and the percent stops below 100%. In this case the calculated charging rate may be slower than the real charging rate, and the real battery may be reaching 100% before the calculated percent.
    - Fine tune the software battery capacity and consumption parameters on the Fuel Gauge Fix App. Try to take a mean of total consumption starting from 1500000uA from your usage, and change the value accordingly. The percent will reflect the value, so if you lower the value (say 1400000) you will get a low percent early, and if you rise the value (say 1600000), you will get a low percent later. Don't forget to mantain the charge current value with a relative value for a 1h30 to 2h30 charging time. Ask for help on thread to know more.

    [Q] I like your work, and it worked fine for me. Thank you.
    [A] I'm glad to know this. So, hit the thanks button, for me to know you liked. Or buy me some coffe, beer and pizza (fuel of a dev).


    APK Issues

    All versions:
    - When the phone runs out of charge, the phone will simply shutdown without warning. There will be no Android warning, since the dead fuel gauge is the responsible for notifying the system about battery empty. This issue cant be fixed - you need to live with it.
    - There is no way for the charger monitor to guess the current charge, so it starts with 100% on the first run. If your battery status is low when you start the monitor for the first time, maybe you get out of charge early before reaching 0%, and them you cant get a full charge until you reach a low percent value again. Use the "Start full charge" menu option on apk fix to make the phone take a full 3 hours charge.
    - The phone does not charge to 100% and the charge process stops early: your are not using the correct firmware / patch / apk fix. Verify the instaled versions and install correct version. Also, do not use the phone during charge, because the charge process may be disable by an overheat event occured during charge.
    - The phone does not charge to 100% and the charge process stops early: maybe your battery is full and the charging process is done. Disconnect the charger, and set battery to 100% if needed.


    Kernel Issues

    All versions:
    - You must use the same Kernel and System version. This way, your Arc/Neo must be in the correct firmware before applying the kernel patch. Look for the patched kernel version on this thread, and flash the corresponding firmware/ROM stock version. If you dont use same Kernel and System ROM version, maybe you get temporary innoperant Wifi or other hardware malfunction until flash correct version.
    Try to flashtool the correct .FTF firmware before flashing the patched boot.img, and see if your issues go away.
    - If your phone stops charging, try with different chargers (official / others), and with charging via USB on PC.
    - Try to not let your phone shutdown by running out of charge. The battery has a safety circuit to prevent undercharging that shutdown before lower limit, but case the protection fails and battery voltage runs below the lower limit threshould, the battery may become permanent disabled by safety circuit.
    - If you know what are you doing, you can try this (kernel patch needed) on android shell to modify battery % capacity (the 85 indicates 85%):
    Code:
    echo 85 > /sys/class/power_supply/bq27520/set_capacity
    The /sys/class/power_supply/bq27520/set_capacity file only exists in our patched kernel.


    Android APK helper

    Please use latest version. Use with patched kernel v4 or later. See "APK Issues".

    v1.6:
    Last changes:
    - Detects CPU clock, and calculates CPU consumption accordingly.

    v1.5.4:
    Last changes:
    - Set battery to 100% on charger disconnected event, after a minimum charging time.
    - Charging statistics, like average charge and discharge time.

    v1.5.3: test version
    v1.5.2: old
    v1.5: old
    v1.4: old
    v1.3: old
    v1.2: old - must be kernel patch v4
    v1.1: old
    v1.0: old


    Fuel Gauge Fix APK description

    Its a service that runs all the time, calculating battery consumption / charge, and updating the battery % of the phone, trying to mimic te lost functionality of the defective fuel gauge. Use it in conjuntion with the patched Kernel. Its does not works without the patched Kernel (missing set_capacity functionality in kernel).


    How to use the APK

    - The APK needs android 2.3.3 or later.
    - The APK needs patched kernel ou patched fuel gauge module.
    - Install the latest patched kernel / module from this thread (watch out for kernel patch firmware version requirement), and this APK.
    - The APK only update the battery % on patched kernels.
    - Open the APK (Fuel Gauge Fix), Click "Start monitor", and configure the "Charger Monitor" to start on boot.
    - Test the APK to see if it changes the battery % on phone.
    - If it wont work, look into the screen of APK, on field "Patch status", and report here you problem.
    - If it works now you can use your phone (mostly) normally.
    - For the first time, and when necessary, do a full charge on the battery, selecting the menu option "Start full charge".


    How APK fix works

    - Runs every 1 minute on screen disabled, and every 5 seconds on screen enabled.
    - Scans for connected / enabled hardware, like charger, screen, bluetooth, wifi, celular.
    - Starting from v1.6, it will take in count the CPU clock / usage, too. Use CPU Spy APK to debug CPU usage.
    - Generate consumption prediction for enabled hardware.
    - Simulate coloumb counting on in memory battery stats, charging / discharging the stats accordingly, and updating the battery % show by phone.
    - There is an 1% limit, that is, the phone will never shutdown while there is power on the battery.
    - On the first run, the fix start with 100% stats. Full charge your phone to help sincronize the calculated value with the real value. The real value cant be get by software, thanks to the faulty hardware fuel gauge.
    - The fix memorize the last stats, so if you stop the service or reboot the device, the monitor must maintain the same stats on next run. Use the app menu to reset stats to 100%.


    Kernel / ROM compatibility list

    0% friendly: this kernels / ROMs already have the kernel patch, so you only need to install the Fuel Gauge Fix APK start the monitor service:

    [ARC/ARC S] DoomKernel (thanks to DooMLoRD)

    [ARC/ARC S] CM9/10 FXP kernel (thanks to svanteson)
    http://forum.xda-developers.com/showthread.php?t=1763227

    [NEO] NightElf (thanks to Night-Elf)
    forum.xda-developers.com/showthread.php?t=1468043

    0% unfriendly: the developers of these work choose to not integrate the kernel patch, so you will have a hard time trying to make the patch working:
    - CyanogenMod 7 / 9 / 10
    - FXP


    Warnings

    - Very important: I just now discovered that the battery temperature sensor may have stopped to work properly because of the the fuel gauge issue. Thus, the battery may overheat in extreme situations, which reduces the average life of the battery or can even result in fire in rare cases. Even so, the sensor is still read correctly by the controller BQ24158, which inhibits the charging in event of overheating (temp > 45oC). Either way, avoid charging the battery and operating the phone at the same time, to minimize the heat generated during charging. Also, please charge the battery away from the sun or hot spots, and no more than three hours on the charger. Knowing this, if you think there is a risk for you or your equipment, please do not use this patch.
    - This is an experimental kernel, compiled from stock kernel source code supplied by Sony. Use it on your own risk.
    - If you unlock your bootloader, you have NO WARRANTY from Sony.


    Requirements for the kernel patch

    - Xperia Arc/Neo
    - Firmware version 2.3.3 or later (APK fix requirement)
    - Unlocked bootloader
    - Fastboot (to flash the boot.img)


    Credits

    Initramdisk from DooMLoRD thread
    First APK Fix script v1.1 from FiDra
    steryman for various patched version
    JasonStein for his MIUI patched version
    DooMLoRD for patched DooMKernel version
    svanteson for CM patched version
    zdzihu for the first locked bootloader patch
    Kernel sources from Sony
    ARM compiler from CodeSourcery
    IDE from Eclipse team
    Android SDK from Google


    Patched kernel download

    :) If you think my work is helping, please press the thanks button.
    - All versions here are STOCK kernel, unless explicitly stated. Ignore the image/logo on startup. For other kernels, see "Other kernels" section.

    v4:
    - Look in the download file name for version information. You must use the same firmware and patched kernel version. See "Kernel issues".


    ICS 4.1.B.0.587
    ARC: boot.img.4.1.B.0.587.lt15i.7z - 7 MB
    http://www.mediafire.com/?jssaye1xm2ohva6

    NEO: boot.img.4.1.B.0.587.mt15i.7z - 7 MB
    http://www.mediafire.com/?ns8049q084kihio


    (old) ICS 4.1.B.0.431

    ARC: boot.img.4.1.B.0.431.lt15i.7z
    http://www.mediafire.com/?ttldhug1zl487nk

    NEO: boot.img.4.1.B.0.431.mt15i.7z
    http://www.mediafire.com/?4so293y7o899kwa


    - (old) NEO boot.img patched kernel .62:
    http://www.mediafire.com/?7g6gz2mpp1ljb46

    - (old) Patched Kernel for Xperia ARC / NEO (one zip file, 2 img files - choose arc/neo to flash) version 4.0.1.A.0.283:
    http://www.mediafire.com/?64ogvfgp8xp8btg


    Stock firmwares (.FTF)

    These are stock firmwares, not patched, not rooted. You can flash this firmware using flashtools, then flash the boot.img patch.
    If you have an unlocked bootloader you can use the method described in the section "Root for unlocked bootloaders" to root your device after firmware flashing.


    GingerBread Android 2.3

    NEO Firmware 4.0.2.A.0.42 Android 2.3.4 Generic Global(World)
    MT15i_4.0.2.A.0.42_GLOBAL.7z
    http://www.mediafire.com/?ic223ahl1sbftbj
    http://115.com/file/e6gvbzgp
    http://www.multiupload.com/ZHYL4RSZGW

    ARC Firmware 4.0.2.A.0.58 Android 2.3.4 Generic HK
    http://www.wupload.com/file/2536357702/LT15i_4.0.2.A.0.58_Generic_Global_HK.rar

    ARC Firmware 4.0.2.A.0.42 Android 2.3.4 Generic Global(World)
    LT15i_4.0.2.A.0.42_Generic_Global.ftf
    http://www.wupload.com/file/2328127472/LT15i_4.0.2.A.0.42_Generic_Global.ftf


    ARC ICS 4.0.4

    LT15i_4.1.B.0.587_Generic Global World.7z
    188Mb
    http://www.mediafire.com/?xucot63l30epa4y

    LT15i_4.1.B.0.431_Generic Central Europe 1 (cust_1247-1041).7z
    188Mb
    http://www.mediafire.com/?6jrtwqvn2f9mj1d

    LT15i_4.1.B.0.431_GenericWorldFR.7z
    195Mb
    http://www.mediafire.com/?qbip855iltbv5is


    Root for unlocked bootloaders

    Please use this thread:
    http://forum.xda-developers.com/showthread.php?t=1871981


    Source code

    In this post you can find the source code of my changed version of fuel gauge kernel driver (bq27520-kernel-driver.7z), so you can make your own modified kernel version, or port the changes to CM / FXP / MIUI or other custom firmwares. Please respect my work and time spent and give me the credits on the kernel patch if you copy/use it.


    Compile your own version

    This are simplified steps. If you dont know how to do, search in the forum.
    - First, download the stock kernel source for Xperia (watch out for the correct version), or the sources for your custom ROM you want to use if its not compatible with stock kernel. The developer thread of dev Kalled from Sony (search on developer thread) has some instructions on how to compile the kernel.
    This is the direct link to download Sony stock kernel sources:
    http://developer.sonymobile.com/downloads/opensource/
    - For the ARM compiler, download the CodeSourcery arm eabi compiler version 2010q1.
    https://sourcery.mentor.com/sgpp/lite/arm/portal/release1294
    - Install the compiler on Linux (You can use a virtual machine if you have Windows - use Virtual Box or VMWave Player, both are free for home use).
    - Overwrite the bq27520 driver source code with the patched driver from this thread.
    - Next, follow the guide on Kalled thread to select phone version and compile the Kernel.
    - In the end of compilation, you get a zImage file, that is YOUR Kernel. Congratulations.
    - You need a ramdisk. If you are targeting a custom ROM, get a ramdisk compatible with your custom ROM. Also, you can go to DoomLord thread about ramdisk and get a ramdisk suitable for your building. Or generate/use your own ramdisk if you know how. If you use other's ramdisk, give theirs credit.
    - With kernel image and ramdisk, generate the file boot.img using mkbootimg tool from Android SDK, or abootimg tool from kubuntu repositories.
    - If you choose to use mkbootimg, download a compiled version of mkbootimg, or compile your own version from Android SDK.
    - Now you have a boot.img file. Flash it on your phone using fastboot and you are done. :)


    Supporters :D

    The following people have appreciated my work and time spent on this, and made me a contributiuon/bought me some gift:
    - Beatmakernolv
    - icet925
    Thank you so much. :D I'm glad you like my work.
    16
    This is it guys, we can now flash CM7/DooMKernel on our 0% battery problem ARCs/NEOs !

    [ARC/ARC S]CM7 patched Kernel(FXP047)


    Download Link: http://www.mediafire.com/?s3vn1hc83kp5y1t

    CONTENT

    -boot.img(the patched kernel)
    -CM7 Update zip(I've integrated the FuelGaugeFixv1.5.2 apk in it, so when you flash it you will have the apk installed)
    -Gapps(same zip from CM7) and APPS folder(from CM7).



    [ARC/ARC S]DooMKernel for CM7(FXP047) patched


    Download Link: http://www.mediafire.com/?tea35mj9y220b29


    CONTENT

    -boot.img(the patched kernel)
    -CM7 Update zip(I've integrated the FuelGaugeFixv1.5.2 apk in it, so when you flash it you will have the apk installed)
    -Gapps(same zip from CM7) and APPS folder(from CM7).



    [ARC/ARC S]DooMKernel for STOCK ROM patched


    Download Link: http://www.mediafire.com/?5hidnuygmyykogh

    CONTENT

    -boot.img(the patched kernel)
    -WiFi Modules



    [ARC/ARC S] DooMKernel for MiUI patched


    Download Link(LT15i/ARC): http://www.mediafire.com/?8amdrkm9h3vgff5
    Download Link(LT18i/ARC S): http://www.mediafire.com/?m8zk2j8ywmdz5sk

    CONTENT

    -boot.img(the patched kernel)
    -MiUI update.zip(The same from THIS topic)



    [NEO/NEO V]CM7 patched kernel(FXP047)


    Download Link: http://www.mediafire.com/?pge19o4y2nhrfox

    CONTENT

    -boot.img(the patched kernel)
    -CM7 Update zip(I've integrated the FuelGaugeFixv1.5.2 apk in it, so when you flash it you will have the apk installed)
    -Gapps(same zip from CM7) and APPS folder(from CM7).



    [NEO/NEO V]DooMKernel for CM7 patched


    I CAN'T PATCH DOOMKERNEL FOR CM7 FOR XPERIA NEO, BECAUSE I CAN'T FIND DOOMLORD'S POST... I THINK HE DIDN'T EVEN WORKED ON IT. Correct me if I'm wrong



    [NEO/NEO V]DooMKernel for STOCK ROM patched


    Download Link: http://www.mediafire.com/?3idvl50o797hdn4

    CONTENT

    -boot.img(the patched kernel)

    WARNING: I don't know if this will work correctly, as DooMLoRD stopped working at the kernel for this phone. Try using .283 or .42 FW. First of all test the WiFi if it can start on .283 or .42 FW




    Requirements
    Before flashing the boot.img, first of all make a backup. ALL KERNELS ARE VERSION 4.0.2.A.0.42(Excepting DooMKernel for Neo, I don't really know if it's .42 or .283), SO YOU WILL NEED TO FLASH 4.0.2.A.0.42 FW FIRST! USING OTHER FW VERSIONS THAN KERNEL'S VERSION MAY CAUSE INCORRECT FUNCTIONALITY OF SOME SERVICES


    Credits
    Bazoocaze - made the battery patch and published it, made the apk and wrote the steps for compiling kernel
    DooMLoRD - helped me to fix the Wlan driver and created DooMKernel
    FXP - for creating CM7 for our devices
    steryman(me) - compiled the kernel and suffered a headache for 2 days xD

    [ARC/LT15i]Ice Cream Sandwich
    Check this: http://forum.xda-developers.com/showpost.php?p=20672610&postcount=708

    ENJOY!!!
    10
    [ARC/LT15i]DooMKernel Alpha IceCream Sandwich battery patched

    Okay so many of you've been waiting for this... here it is finally, after almost 1 week of work, the Alpha ICS DooMKernel battery patched and working WiFi modules.

    Download link: http://www.mediafire.com/?sbr9abu1lv66ca1

    Content
    -boot.img(patched kernel)
    -WiFi modules(flash them in recovery mode)
    -DooMLoRD's touchscreen Recovery

    [ROM]Main v01: http://www.multiupload.com/899YNW8HUT
    [ROM]Update pack v01 to v02: http://www.multiupload.com/MIVHN3R01C
    [Recommended]WiFi + GSM + BT enabler: http://forum.xda-developers.com/attachment.php?attachmentid=818136&d=1323989489
    [Recommended]Google apps for ICS: http://download.clockworkmod.com/test/gapps-ics-20111125-2.zip
    [Recommended]WiFi fix(requires the WiFi + GSM + BT enabler): http://forum.xda-developers.com/attachment.php?attachmentid=818854&stc=1&d=1324050710
    [Optional]ICS original launcher: http://hotfile.com/dl/132851095/c755a7b/Launcher2.apk.html
    [Optional]Boot animation: http://forum.xda-developers.com/attachment.php?attachmentid=818499&d=1324020244
    [Optional]ICS On-Screen Button Enabler: http://www.multiupload.com/X1XYV0HA51
    [Optional]ICS On-Screen Button Disabler: http://www.multiupload.com/1BD2VCQ5BD


    How to install
    1. Download the kernel
    2. Enter the phone in fastboot mode then flash the kernel using:
    Code:
    fastboot flash boot boot.img
    3. Reboot the phone
    4. When the blue LED lights, keep spamming/pressing BACK button
    5. Flash the v01 ROM zip and the v01 to v02 update zip, the WiFi modules(if you want working wifi) then flash other zips you downloaded and copied to SDcard
    6. Rebot the device
    7. Enjoy

    CREDITS
    Sony Ericsson - posted the ALPHA build and made us this gift present
    DooMLoRD - Made the DooMKernel and helped me compiling the kernel and the WiFi modules
    Bin4ry - the WiFi/BT/GSM enabler
    Koush - gapps for ICS
    Bazocaze - made and published the battery driver patch
    steryman(me) - patching the kernel and wifi modules
    augie7107 - Linked me something very important on PM helping me with the WiFi modules​

    Merry Christmas guys and ENJOY!!!
    9
    Here is the APK Fuel Gauge Fix helper :)

    [Updates]
    v1.2: :rolleyes: new version - test this - must use kernel patch v4
    v1.1: :( failed - found a noob bug on APK - sorry
    v1.0: :( failed


    [Description]
    Its a service that runs all the time, calculating battery consumption / charge, and updating the battery % of the phone, trying to mimic te lost functionality of the defective fuel gauge.

    I cant test the battery update on my device, because its isnt faulty, so I want you to test and see if it can update the % status of battery. If the apk cant write to set_capacity, it falls back to try to write to file using ROOT access. Please let me know if it works, and if it asks for root access.

    [How to use]
    - Install the latest patched kernel from this thread, and this APK.
    - Open the APK (Fuel Gauge Fix), Click "Start monitor", and configure the "Charger Monitor" to start on boot.
    - Test the APK to see if it changes the battery % on phone.
    - If it wont work, look into the screen of APK, last line on field "Patched status", and report here you problem.
    - If it works now you can use your phone normally.

    [How it works]
    - Runs every 1 minute on screen disabled, and every 1 second on screen enabled.
    - Scans for connected / enabled hardware, like charger, screen, bluetooth, wifi, celular. For now, it doesnt take in count the CPU clock / usage.
    - Generate consumption prediction for enabled hardware.
    - Simulate coloumb counting on in memory battery stats, charging / discharging the stats accordingly, and updating the battery % show by phone.
    - There is an 1% limit, that is, the phone will never shutdown while there is power on the battery.
    - The stats will learn the battery limits if you leave your device running until it runs out of power. You can see if its working on the "Full capacity" field. For now, it will only expand capacity - in a later version I will make that it will retract the full capacity to compensate a high usage.

    Enjoy :D
    9
    Good News :D : the apk to auto-fix the battery capacity is almost done.

    Here is a screen shot from the Android emulator:
    http://imageshack.us/photo/my-images/819/fuelgaugeshot.png/

    On the next days I will be posting here the finished APK, for you to test and send feedback.