yashsingh1/xdaforums huggingface dataset:
[Xperia Arc General] Bazoocaze:
Changed permission of file set_capacity from write/user to write/user/group/others, to see if the APK can work and try to run without root permission.

You can try the APK v1.1 first. If it doesnt work, then flash the new boot.img.
[Xperia Arc General] Bazoocaze:
Installed APK v1.1 on my Arc,, running the service, and the Gallery is working fine (a bit slow on the first run - 50 to 100 files on gallery).
[Xperia Arc General] danielnghk:
dmesg with v4 patch and v1.1 apk
[Xperia Arc General] Bazoocaze:
I really hope it work this time. :o

I'm learning too much, and its cool, but I'm getting crazy to go back to my Netflix and its dialy growing queue. :)
[Xperia Arc General] Bazoocaze:
Had you started the Charger Monitor service on the APK v1.1?

Please, report the field "Patch status" on the end of the screen. Thank you.
[Xperia Arc General] FiDra:
Hi Bazoocaze, mine said that "Patch OK/Success".

I used V4 and your APK 1.1 :)

---------- Post added at 12:55 AM ---------- Previous post was at 12:44 AM ----------

By the way, in some case, if Bazoocaze's apk does not update the battery level, my apk (ArcBatteryFix.1.1.apk) still helps you guys.

Please follow these following steps and you will get rid of the "killing by Android memory management":

- Start the ArcBatteryFix.

- Allow root access (if it asks).

- Plug in your charge.

- IMPORTANT: Let the app OPEN.

With that way, app is still running and the Android memory management will not kill the process.

My arc has been charged up to 80% with that way (why 80%, because I unplugged the charger at 80% :D).

Cheer!
[Xperia Arc General] Bazoocaze:
I found a little bug on APK v1.1.

Now the APK v1.2 WILL WORK. It MUST WORK. I can feel. hehehehe

I had put APK v1.2 for download. Please let it a try.
[Xperia Arc General] :
It does work for me
[Xperia Arc General] jojora:
log with [K4/APK1.2] :D
[Xperia Arc General] FiDra:
Ha ha, very nice and hard work Bazoocaze :D

Thank you so much :)

---------- Post added at 01:49 AM ---------- Previous post was at 01:45 AM ----------

Finally, it works :D :D :D

Our Arcs are back from hell :D

Thank you Bazoocaze :)
[Xperia Arc General] anjue:
Thank you Bazoocaze and FiDra !

very nice and hard work.

---------- Post added at 09:06 AM ---------- Previous post was at 08:56 AM ----------

many members can't download v4,can yon upload it to forum?
[Xperia Arc General] :
Yes Thank you guys
[Xperia Arc General] ajennn@163.com:
we are excting the new apk/kernel....

thks
[Xperia Arc General] lenathou972:
Thanks a lots. With this patch my pictures issue is gone.
[Xperia Arc General] anjue:
many members can't download v4, can't Bazoocaze upload it to forum?
[Xperia Arc General] danielnghk:
:) thanks.

But is it the accurate indicator for 100% after full charge of my phone?

I think it is a calculation of the usage of the battery.

Thus, it change the battery level/indicator from the calculation.
[Xperia Arc General] peacekeeper38:
Bazoocase and FiDra i don't have words to express my thnks and admiration for you two guys, really don't know what we would do without you guys in this forum, now phones is working as before and everything is because of you...... thnk u thnk u millions of thnks you........:D
[Xperia Arc General] shahzaib.khan:
Glad u did it guyz :) .
[Xperia Arc General] itachi naruto:
battery change% yes, I am very happy
[Xperia Arc General] fcastillousfq:
Thanks guys for all your hard work, I really appreciate all the time you have put into fixing this issue. THANKS!!!

Everybody in this forum, go show some love to Bazoocaze and clikc that Thanks button in one of his post
[Xperia Arc General] masray:
Dear friend,can you make a kernel(bott) for ROM 2.3.3 4.0.A.2.368?

234 really sucks,~~~ 283 or 042 both run not smoothly. 2.3.3 4.0.A.2.368 is really the best version by now.~

or maybe a CM7 kernel?

= =.Just hate the 2.3.4

Tested your V4 kernel and FuelGaugeFix V1.2, they work on my NEO.Thanks!
[Xperia Arc General] steryman:
Hehe I already Thanked him in a lot of posts xD

Now I have one more wish which I'm sure it will happen: Patched CM7 Kernel :D Or a How To patch other kernels... anyway, thank you Bazoocaze for your hard work. Oh and one more question: Do I have to wipe my data when flashing the new boot image?
[Xperia Arc General] itachi naruto:
I also want what's on cm7 kernel :D:D
[Xperia Arc General] steryman:
Ok this is very strange: I just entered the phone in fastboot mode, got detected by the computer as Android ADB Interface, but when I use "fastboot flash boot boot.img", it says "waiting for device" like I didn't connected or I didn't installed the drivers. I tried reinstalling the drivers, restarting the phone, restarting the computer but still nothing... WTF?

Later Edit: Fixed! I uninstalled the driver deleting them too -> restart pc -> restart phone -> put phone in fastboot -> Update drivers(install them) and it worked.
[Xperia Arc General] love4nothing:
so i have to unlock the bootloader
[Xperia Arc General] steryman:
Yes you do, otherwise you won't be able to flash the boot image.

Ok so I have installed the APK too but I have one question... it starts with 100%... if I'll start it when the battery is low will it start with 100%? I mean, will it detect that the battery is low or will start with 100%?
[Xperia Arc General] danielnghk:
Thus, I ask same question in this thread.

Also, I attach my logcat.
[Xperia Arc General] steryman:
Ok now I observed something... I've ran the app, started monitoring, ticked start on boot, pressed home button... used the phone, etc. and after some time it was still 100%... I dragged then the status bar, selected the app and it was just like I first time ran it... I had to select again start monitoring and tick start on boot and whenever I get back to what I've been doing by home button or back button, when I run the app I have to start again and again all these things...
[Xperia Arc General] masray:
Could you make a kernel for the 2.3.3 ROM plz? or the CM7/MIUI?

Cuz 2.3.4 runs really slow,that sucks.
[Xperia Arc General] steryman:
We already requested that :D I think he's working on it... or a How To would be good too :D
[Xperia Arc General] masray:
Dude，are you replying me?
[Xperia Arc General] phantnang:
thank Bazoocaze for your work!

K4/APK1.3 works well!

can you hide icon on status bar or add it in menu setting
[Xperia Arc General] Bazoocaze:
I updated the FAQ with your latest questions:

- Patch on CM / MIUI - wont do, but can be done - see the FAQ

- Stuck on 100% - see the FAQ

- Cant download from mediafire - downloads now on xda on first post

- First status is 100%. Is this correct? - see first post - APK how it works.

- Allready thanked bazoocaze in a lot f post: thanks more, donate, send a postcard, whatever you want to show your gratitude. :D
[Xperia Arc General] Bazoocaze:
:)

Its done this way to prevent android from killing the Charger Monitor service. Without it, android can kill the service during low memory events, like browsing, gaming. I will alter the APK to help configure this, but I warn you that if android kills the service, the battery stats will stop updating.
[Xperia Arc General] FiDra:
Hi Bazoocaze,

Instead of hiding the icon, could you please make it turn into a battery indicator to show the battery level. That will be very useful and we don't need to install any other battery indicator :).

Thanks!
[Xperia Arc General] ajennn@163.com:
thank you bazoocaze and fidra！you kernel and apk save our 0% arc & neo... thksssssssss......
[Xperia Arc General] phantnang:
yes, i know. can you make it as 'quick setting app'', it still on status bar but not show unless pull down.

doom's kernel has alot interesting as: full USB OTG, OverClock.. Can you keep it in your kernel ?
[Xperia Arc General] steryman:
Bazoocaze, I would donate a lot but my dad rarely give me money xD I'm going to read first page to learn how to do this patch on CM7 :D

Later Edit: oh I thought you wrote a How To patch other kernels... anyway I already PM-ed FXP about 1 week ago to make a patched CM7 Kernel, they said they'll investigate it... anyway thank you again for your hard work and maybe someday you'll post a How To :)
[Xperia Arc General] itachi naruto:
Remember to send them this theard , it would be a slight cm7
[Xperia Arc General] Bazoocaze:
Now that there seems to be an apropriated workaround for the 0% battery issue, I uploaded the bq27520 kernel driver source code, so you can port it to your favorite custom firmware, compile your own version, or ask your favorite dev to port/integrate it into his work.

But dont forget the safety risks of lost of hardware fuel gauge (See FAQ and Warnings on first post).

Enjoy :D
[Xperia Arc General] Bazoocaze:
:D

I updated the [FAQ] and instructions on first post.

- Source code of kernel driver: anyone can compile a patched kernel - CM, MIUI, FXP, others...

- Brief instructions on how to compile your own version.
[Xperia Arc General] steryman:
Dude god bless you! I love you man!!! Thanks for posting faq so I can patch fxp :d
[Xperia Arc General] Dark Stranger:
Great Work!! Bazoocaze!! It was flashing the kernel that you have developed that my Xperia arc re-load. Great Work!:cool:
[Xperia Arc General] itachi naruto:
there are some problems when the battery is about 15% off your order and indicating the battery

p/s: fuel gaug auto close continuous
[Xperia Arc General] feydz:
Thanks!!! Great Work! only one thing, the icon on the notificacion bar that says "fix battery percent", is on every time, isnt it?

STICKY for this Thread!!
[Xperia Arc General] steryman:
Ok now I observed something about the APK... the charging is more faster than normal... did you calculated for Li-Ion or for Li-Polymer? Normally on my Li-Polymer 1% of charging took... minimum 5 minutes I think while now with the APK it takes about... 2-3 minutes..?

Nah I think it's just me :D

Ok now one more thing: You said to download first the kernel source or whatever for Xperia .283... CM7(FXP) requires .42(LT18i)... So do I really need .283 or I can download .42? Because I heard and I think even you said that using a kernel version with a different FW version can cause some services to not work properly... And even now I'm running .42 with you patched kernel... And when do I have to add your driver? Before compiling the kernel? Srry for asking but I'm still a noob... I want to start "scripting" in Android :D
[Xperia Arc General] anhviet030295:
One more thing..... why when I close the APK. The battery % is still counting, automatic by phone!
[Xperia Arc General] steryman:
Ok so I'm stuck at the Kernel/Ramdisk part... how can I download them...? Can I just download the FXP boot img and decompile it and edit it's kernel and use it's ramdisk?

Later Edit: Ok now I'm compiling the .42 kernel... I placed your driver in kernel/driver/power is that ok? And I get some warnings when compiling... anyway, what does actually CM7 have modded to work? Kernel of Ramdisk? Because if it's the kernel.. I dunno how it will work since I compile stock kernel
[Xperia Arc General] Bazoocaze:
With 5 minutes per 1% the charging process will be taking more than 8 hours :eek:

100% x (5 minutes / 1%) = 500 minutes = 8h20

I calculated the rate to let the charge process take 3 hours (mine take around this).

About the driver, overwrite the file bq27520_battery.c with the patched version before compiling the kernel (before the "make" command).

You must match the version of firmware(ROM) and kernel, but if you mess versions and all works (wifi, etc), then you are fine.
[Xperia Arc General] Bazoocaze:
Look in APK for the Charger Monitor service status, because it runs in background without need of APK open.

If the service status its "running" then the battery % will be updated. If its "stopped" then the battery % will not be updated. Use "Start monitor" and "Stop monitor" buttons to control monitor process.
[Xperia Arc General] steryman:
Yea I got it now but don't I actually have to modify the CM7 kernel? Because it says with stock kernel won't work, and what you told us to do is modify the stock kernel... and about the ramdisk, isn't better just to decompress CM7 boot.img and use it's ramdisk?
[Xperia Arc General] Bazoocaze:
Yes, its the rigth place to put the driver :) !

If CM7 isnt compatible with stock (I'm not sure it is), you must use the CM7 kernel sources, not stock sources.

About the boot.img, you create it from your zImage (kernel) and ramdisk.

In my case, I had take a boot.img from .283, removed original zImage and inserted my version.

I had used the abootimg package from kubuntu repositories, like this:

abootimg -u boot.img -k zImage

-u stands for updating boot.img file, and -k informs the new kernel to insert

If you know about Makefile, this is mine for you to automatize boot.img update:

all: boot.img

zImage: ../../kernel-283-arc/kernel/arch/arm/boot/zImage
cp ../../kernel-283-arc/kernel/arch/arm/boot/zImage zImage

bootimgoriginal:
cp boot.img.original boot.img

boot.img: zImage bootimgoriginal
abootimg -u boot.img -k zImage
cp boot.img ../boot.img.arc

clean:
rm -f zImage boot.img
[Xperia Arc General] Bazoocaze:
Then its simple, too:

- Get CM7 kernel sources

- Overwrite bq27520 driver

- Compile kernel and generate zImage

- Get CM7 boot.img

- Insert your zImage on CM7 boot.img using abootimg

- Done :D

I updated the first post with this compilation details.
[Xperia Arc General] Bazoocaze:
Strange. I verified the code for issues on 15%, but found nothing.

Running on my phone, the calculated value is at 18%, with real battery at 7% and until now the monitor is running fine. The big percent difference (7% to 18%) was because I had reseted the calculated value to 100% when it is at 86% during an APK update - without that, the values would be 7% real and 2% calculated.
[Xperia Arc General] Bazoocaze:
I received a donation from Beatmakernolv. :D

Thank you so much, Beatmakernolv. I'm glad you like my work.

Thank you, and may the god of the phones protect your Xperia from bricks and failures.

:)
[Xperia Arc General] lenathou972:
Maybe I ask something impossible but it's just to know. There is know means to compile this kernel with the Doomlord's kernel?
[Xperia Arc General] steryman:
Ok but how can I edit it? I used racer kitchen to uncompress the boot.img into boot.img-kernel and boot.img-ramdisk... All I have to do is to extract the boot.img-kernel like a normal archive and do whatever I had to do with a stock kernel from SE site? Sorry for asking but now I can't test, all I've done before were on my friends laptop but now I'm @ home so I have to start everything again. And about the Ramdisk, I can use the original CM7 kernel one wich gets extracted when uncompressing the boot.img right?
[Xperia Arc General] Bazoocaze:
Guy, dont worry, its simple.

First, look in this thread: http://xdaforums.com/showthread.php?t=1066266

Its from Kalled, from Sony, and explains how to generate boot.img from sony stock.

Weel, think of boot.img as a zip file. Its not a zip file, but its a container of files, containing zImage (kernel) and ramdisk (and maybe other files in some cases).

You can generate your boot.img in two ways:

-Easy way (I do this way):

Get an existent boot.img (must match the custom firmware you are targeting), and the abootimg kubuntu linux tool to overwrite the kernel in the boot.img. You get a new boot.img, containing the original ramdisk and your kernel.

-Hard way:

Get mkbootimg from google. Compile it.

Get your kernel (zImage).

Get (or do) a ramdisk, suitable for your firmware target. If you allready had a boot.img from your target rom, them extract the ramdisk from it using the tools (dont remember the name) from this forum.

Now that you have your zImage and ramdisk, use mkbootimg to construct a boot.img from ground.

Good luck.
[Xperia Arc General] Bazoocaze:
Not done yet, for now, but you can merge the driver changes onto Doomlord kernel source, and compile your own version.

I think it can be done, but I´m not working on this. :)
[Xperia Arc General] lenathou972:
Thanks a lot for your patience Bazoocaze...really!!! :)
[Xperia Arc General] steryman:
Sorry dude you got it wrong :D I know how to create the boot.img, all I need to know is how do I edit an already made kernel.. because CM7 doesn't work with official kernel, it has own kernel, and I need to edit it(add your modified driver), then simply recompile it.
[Xperia Arc General] Alucard93:
hey man, awesome work, thanks!!!! :)
[Xperia Arc General] Bazoocaze:
Got it.

- Download CM7 kernel source.

- Overwrite the bq27520 driver with patched version.

- Compile the kernel.

- Now you have a zImage, it's your kernel.
[Xperia Arc General] phantnang:
Bazoocaze!

i realize that my phone often out of battery (phone shutdown) when apk show remain over 30 %, cause of this is brightness screen, speaker or APK forced closed while battery still drain...so recharging battery not full. Can you add 'set battery' in APK for this case.
[Xperia Arc General] steryman:
Nah that's what I want to say: I need to decompile/extract kernel source from CM7, because they didn't posted the source. But right now I'm downloading Doomkernel's version for FXP044 source, going to patch it and compile it, and after that combine with doomkernel's version for FXP044 original Ramdisk and flash the bootimage :)
[Xperia Arc General] itachi naruto:
yes . metoo ,I also own this :D
[Xperia Arc General] steryman:
Wohoho!!! THANK YOU BAZOOCAZE!!! I MADE IT!!! CM7 ON MY BUGGED ARC! Going to post the boot.img tomorrow :D

The problem is that I get Error at WiFi when I try to turn it on

And it's a little laggy too :(
[Xperia Arc General] shahzaib.khan:
Bazoocaze is this is the end of the developing on this matter or u r still focusing sum thin new for this :D
[Xperia Arc General] Ghost_kh_07:
Bazoocaze can you make fix apk as one of services(no icon) and automatic start when reboot.
[Xperia Arc General] itachi naruto:
I figured out the problem auto shutdown due to battery at 100% brightness and 80%, if the brightness to 28-45%, the pin will return to 1%
[Xperia Arc General] steryman:
Ok I said yesterday that I will post the boot.img, but I don't think that will be today because I encountered some problems like WiFi error when turning on... I'll post it when it will be bug-free

Later Edit: Umm.. this is strange... I tried modifying even FXP kernel(I found the source) but I still have the wifi issue...
[Xperia Arc General] FiDra:
Hi Bazoocaze,

My arc also has this issue:

The battery level show 70%, but the phone shut down due to being out of power.

May be the usage calculation is still not work good ^^! Hope that you will improve it in the future release.

Thanks!
[Xperia Arc General] Bazoocaze:
OK. I will see what I can do. :)
[Xperia Arc General] peacekeeper38:
Hi Bazoocase recently i started to see that issue on my phone also arround 80% in the battery indicator but it shut down suddenly.

I am using the 0.42 should be because of that?

I am using app of FiDra also at the same time, should be that?

I cheked the last line of the field in the apk and it says patched sucessfully done

So everything seems to be working good.

As usual thnks in advanced for your time to see thw problem :o
[Xperia Arc General] steryman:
And umm.. Don't forget that the APK calculates for a stock fw without custom roms, as for example cm7 consumes a lot more battery than stock
[Xperia Arc General] itachi naruto:
Today I actually test programs have problems when setting up light from 70-100%.

Bazoocaze you can make a video when you do the program. Thank you very much about what makes us
[Xperia Arc General] Alucard93:
the only problem that I found is that my phone automatically turns off at the 15% of battery
[Xperia Arc General] mehdi.xterra:
i have not any problem and my phone work correctly and i am very happy
[Xperia Arc General] steryman:
Bazoocaze, can you help me please? As I read here, it seems that I need to recompile the ti wlan. I downloaded the drivers/folders from FreeXperia's Github, but I don't know how to compile them, because when I use the make thing specifying the compiler's directory and kernel's directory says there is no target specified and no makefile... or tell me how you compiled the kernel when you patched it to make wifi work... because I didn't observed any wlan.ko file in /system/lib/modules on your patched kernel..

Later Edit: umm... you have 1 more file that other kernels doesn't have it in that directory(/system/lib/modules): modules.dep

Later Edit 2: Still doesn't works... tried to copy modules.dep.bb :D
[Xperia Arc General] icet925:
Is there a fix to the auto shut down for this set up?

I really like this rom but it always shut down on me and cannot turn it back on without the charger.

Is this something to do with the brightness?

What percentage should i set it to?

---------- Post added at 03:28 AM ---------- Previous post was at 03:21 AM ----------

Can you explain further on what the issue is?

I'm having this problem:(
[Xperia Arc General] peacekeeper38:
Is there a fix to the auto shut down for this set up?

I really like this rom but it always shut down on me and cannot turn it back on without the charger.

yes i am having the same problem even my cell is on 92% suddenly it shut down and i have to connect to the charger if i want to turn it on again :confused
[Xperia Arc General] steryman:
Well umm.. don't forget that the APK starts with 100% when you run it, but that doesn't mean the battery is 100%, so charge it some time before starting to use the phone without charger plugged in.
[Xperia Arc General] peacekeeper38:
yea you are right, i think this is what i have to do, charge the cell for sometime before using it this is what i am doing just now,

i uninstalled the app and installed again hopefully it will work again after some time plugged in. cause everything seems to be in order

anyway thks for the hint!!!!!!!!!