[KERNEL PATCH] - Force AC (fast) or USB(slow) charging

Search This thread

kitty's_daddy

Senior Member
Sep 2, 2011
178
44
jeonju
Guys you also did skip my suggestion about car chargers. I won't suggest fast charge also with them.

And always remember to disconnect the phone during the ignition of the engine also! It is 95% cause of broken fuses in the phone itself. (the other ones are lightening and disappearance of zero AC line at home...)

Please see the usb circuit. :)
The Power line is V_chg combined with some parts.
FL102 is a EMI/ESD filter(NFM18PC104R1C3), V103 is a varistor(ICVL0518400V500FR) and 2 capacitors.
These mean EMI/ESD(Surge) Protection.
LG hardware engineers are not bad. ;)

added: I found v103 at my su660 manual. I guess this applied to p990,too.
 

Attachments

  • USB_circuit.png
    USB_circuit.png
    17.9 KB · Views: 446
Last edited:

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
Just an update for you guys. I'm still waiting to hear back from the tester. If I don't hear back by the end of today I'll try to get the materials out to another tester.
 

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
Just want to give you guys a head up that we're almost there for a 3 way toggle (slow (USB), auto, fast (AC)). I just have to get confirmation of a couple more things and update the widget.

Hang in there. I didn't forget about you guys.
 
Last edited:

rcosta111

Senior Member
Mar 29, 2012
59
5
Lisbon
Hi All,
It will be also an option not to charge it trough USB? The idea is only connect the USBcable to access the SD card and not using it to recharge the phone.
Thanks and keep the good work
Regards
 

owain94

Inactive Recognized Developer
Sep 21, 2010
3,538
6,041
29
The Hague
Just want to give you guys a head up that we're almost there for a 3 way toggle (slow (USB), auto, fast (AC)). I just have to get confirmation of a couple more things and update the widget.

Hang in there. I didn't forget about you guys.

chad your patched worked fine for me i am repling this here becouse my pm didn't send so this way iam sure you can read it :eek:
but please help me out on this one 0=automatic 1=force AC 2=force USB right?
so i can use right values in the Settings app

EDIT:

My ROM is ready for this =D
fvz71w.png
 
Last edited:

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
chad your patched worked fine for me i am repling this here becouse my pm didn't send so this way iam sure you can read it :eek:
but please help me out on this one 0=automatic 1=force AC 2=force USB right?
so i can use right values in the Settings app

That's correct. Looks quite nice also. What changes did you make to the patch itself? You had mentioned that you made some changes.

Have you tested current draw to make sure that its definitely going to the selected mode?
 

owain94

Inactive Recognized Developer
Sep 21, 2010
3,538
6,041
29
The Hague
That's correct. Looks quite nice also. What changes did you make to the patch itself? You had mentioned that you made some changes.

Have you tested current draw to make sure that its definitely going to the selected mode?

my changes screwed up i am so bad with kernels so lets not talk about that :eek:
sometimes it was not switching properly (1/50 times it is aceptable in my opinion)
but it was working
 

andresilva

Member
Apr 7, 2007
21
8
Lisboa
Nice addition to the options.

Can you make it multi-rom capable? To work in stock and cm7 also would be perfect.

It's only me or when the phone is in charge through pc usb it tends to be more hot?

Nice work.

PS: Nice to see Portuguese people also in here :)
 

owain94

Inactive Recognized Developer
Sep 21, 2010
3,538
6,041
29
The Hague
Nice addition to the options.

Can you make it multi-rom capable? To work in stock and cm7 also would be perfect.

It's only me or when the phone is in charge through pc usb it tends to be more hot?

Nice work.

PS: Nice to see Portuguese people also in here :)

it is a kernel change?
so it is already "multi-rom capable"
 
  • Like
Reactions: bespinhal

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
I need one more tester. PM me. Preferably someone running the SetiroN kernel, because that's what I've been using as my base.
 

FaceTheSlayer

Senior Member
Apr 14, 2011
115
47
I hope this would solve my problem that I have when using car charger and having GPS navigation on with max brightness and 3g data on. In this case battery isn't charging at all, more like staying at same level or very slowly discharging.
 

Mungulz

Senior Member
Oct 5, 2011
472
81
Sydney
I hope this would solve my problem that I have when using car charger and having GPS navigation on with max brightness and 3g data on. In this case battery isn't charging at all, more like staying at same level or very slowly discharging.

If your phone registers the source as AC this app wont do anything.
If the phone registers your charger as USB, app will allow you to force to AC resulting in faster charge.



Sent from my Optimus 2X using Tapatalk 2
 

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
I hope this would solve my problem that I have when using car charger and having GPS navigation on with max brightness and 3g data on. In this case battery isn't charging at all, more like staying at same level or very slowly discharging.

That's the exact scenario that prompted me to develop these patches. So most likely your charger is being detected as USB and this should help.

Sent from my ADR6425LVW using XDA
 

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
Almost completely done with testing. Just need to confirm that the current draws are correct for each mode and I will be releasing the patch and updated widget.

As it stands right now it will work like this:

Auto: Default behavior
Force AC: AC power detected, no data (usb transfers disabled, no adb etc)
Force USB: USB power detected, no data (same as above, don't want your phone to try to transfer when slow charging from AC, also provides security)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    This is for kernel devs only. The patch itself is useless to those who do not/can not compile their own kernel.

    This patch allows one to force AC or USB charging for any charger. It also provides additional security when connecting to public charging stations because with either force AC or force USB mode on, USB transfers are disabled, protecting your data.

    Fast charge can be toggled by issuing:

    echo 1 > /sys/kernel/fast_charge/force_charge_mode

    Slow charge:

    echo 2 > /sys/kernel/fast_charge/force_charge_mode

    and off:

    echo 0 > /sys/kernel/fast_charge/force_charge_mode

    Plug your phone into the charger AFTER toggling the desired mode.

    In addition I have created a toggle fast charge widget that may be used to toggle fast/slow charge on and off right from your home screen:

    https://play.google.com/store/apps/details?id=com.incredicontrol.fastchargewidget

    I have not yet implemented the three way toggle into incredicontrol (free), but I will be. I have to change it to support slow charge also and haven't yet gotten the chance to. I will be implementing it when I get the chance though so you guys have a convenient free way to toggle also.

    For the widget (or any fast/slow charge toggle) to work, you MUST be running a kernel that has this patch implemented.

    As a good gesture to support a fellow dev, I ask that if you implement the patch into your kernel, please link to my widget as one means to toggle it. You are of course free to provide other ways to toggle it as well if you so desire.

    Kernel devs, if you would like to test the widget yourself to confirm its working, and for convenience of testing, please contact me and I will provide you with a copy. You must show that you are a kernel dev though (i.e. link me to your kernel post so I can match your username).

    Good luck have fun!

    http://www.incredikernel.com/wp-con...r/download.php?id=o2x_force_fast_charge.patch

    Here is the neoblaze kernel (stock froyo/gb, not AOSP) patched with the mod so that you guys can test. I will not be supporting anything regarding this kernel except the charging mod itself!

    http://chad0989.dyndns.org/mirror/o2x_fastcharge_test_neoblaze2.zip
    5
    Okay. I'll work on it some more and release a new patch.
    5
    Just want to give you guys a head up that we're almost there for a 3 way toggle (slow (USB), auto, fast (AC)). I just have to get confirmation of a couple more things and update the widget.

    Hang in there. I didn't forget about you guys.
    4
    There is a trick which I use to, um, trick the phone to pull 1A from pretty much any USB 2.0/3.0 port on any PC:

    Simply plug the cable into the phone really slowly, until it says charging. Then fully plug in the cable.

    That's it. It works with the cable that comes with the phone, and at least one other 3rd party cable that I have. You can confirm it with any battery monitoring app.

    Interestingly, the same trick doesn't work on my colleague's Samsung.

    Confirmed. :D
    I think a current is not the key,but the key is usb_id. (4th pin of usb connector)
    Here is a usb circuit of p990.
    If you want force AC charging then use only 1&5 pin of usb cable.

    Also the charging current is controlled by RT9524.
    It is a Linear Single Cell Li-Ion Battery Charger IC and check datasheet. :)
    So you need not worry about your phone, but I think this way may damage your PC because the typical USB charging current is 0.395A but AC mode is 1A.
    It's not good condition. ;)
    3
    Wow Mister Mungulz! I'm not sure if Ferrum has a learning disability (don't think so) but you surely have a politeness disability!!

    If Ferrum says he has had to repair motherboards due to iPad's that charge at 1A through USB, who are you to say otherwise?

    Anyways, everyone knows that a battery that charges slowly is a healthier battery than one that charges fast. I'm glad so many people liked my "idea" :)

    What's wrong with a force USB charge option, Mister Politeness disability? In the end it's the users decision, like you said, right?