[KERNEL PATCH] Force AC (fast) Charging

Search This thread

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
This is for kernel devs only. The patch itself is useless to those who do not/can not compile their own kernel.

I put together this patch for you guys at the request of a few different members here in the nexus S forum who had saw my patch in the gnex forum. This allows one to force AC charging for any charger that is detected as USB (e.g. many car chargers) and pull the full current the charger can support. It also provides additional security when connecting to public charging stations because by forcing AC charging, USB/adb data transfers are disabled, protecting your data.

Fast charge can be toggled by issuing:

echo 1 > /sys/kernel/fast_charge/force_fast_charge

and off:

echo 0 > /sys/kernel/fast_charge/force_fast_charge

Some roms (AOKP) have also implemented toggles.

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

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

For the widget (or any fast 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).

Here you go. Good luck have fun:
http://www.incredikernel.com/wp-con...wnload.php?id=nexus_s_force_fast_charge.patch
 

Attachments

  • off.jpg
    off.jpg
    4.5 KB · Views: 2,866
  • on.jpg
    on.jpg
    9.4 KB · Views: 2,760
Last edited:

brenix

Senior Member
Mar 24, 2011
204
109
San Diego
Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA
 

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
Its been brought to my attention that the AOKP toggle interferes in some way with the widget. I'm going to contact them and see what's up. I think they may be setting the permissions of the fast charge toggle in an undesirable manner.
 

Oodie

Inactive Recognized Developer
May 6, 2011
1,680
1,940
Kuliyapitiya
Its been brought to my attention that the AOKP toggle interferes in some way with the widget. I'm going to contact them and see what's up. I think they may be setting the permissions of the fast charge toggle in an undesirable manner.

Or you could just make an app for it till you resolve the issue.

Sent from my Nexus S
 

chad0989

Senior Member
Oct 31, 2010
1,883
9,424
Or you could just make an app for it till you resolve the issue.

Sent from my Nexus S

It's not an issue on my end. It's theirs as testers had no issues with any other ROMs.

I do have an app also via will toggle, its called incredicontrol. I didn't mention it because it doesn't fully support the s. You're free to try it though. It's free in the market.

Sent from my ADR6425LVW using XDA
 

Oodie

Inactive Recognized Developer
May 6, 2011
1,680
1,940
Kuliyapitiya
It's not an issue on my end. It's theirs as testers had no issues with any other ROMs.

I do have an app also via will toggle, its called incredicontrol. I didn't mention it because it doesn't fully support the s. You're free to try it though. It's free in the market.

Sent from my ADR6425LVW using XDA

oh ! I've use incredicontrol for a long time when i was using my X10 . Didn't know it was yours :D
& waiting for our kernel devs to implement your patch & will test & give feedback gladly .
Thanks again for your hard work :)
 

easye420

Senior Member
Sep 28, 2010
449
138
Like how fast compare to the standard 3,5 hrs full charge?

I tested this patch out on a test kernel chad sent me. I didn't test to long as wifi was broken with his kernel. Its definitely faster than regular usb charging if your USB can put out more. It takes advantage of the extra juice instead of limiting it, It all depends and what your trying to charge from. I'm just waiting for it to implemented into our kernels. So some real test can be done.

Sent from my Nexus S using XDA
 

mluu921

Member
Jun 22, 2007
11
3
THANK YOU VERY MUCH FOR THIS! I'm a student, and it dreadful to charge my phone from my laptop. Here's to hoping with the patch, I can charge a bit quicker with USB. :)
 

Oodie

Inactive Recognized Developer
May 6, 2011
1,680
1,940
Kuliyapitiya
Will this hurt our device . Or will it affect the battery in a harmful way ?

Sent from my Nexus S
 

Top Liked Posts

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

    I put together this patch for you guys at the request of a few different members here in the nexus S forum who had saw my patch in the gnex forum. This allows one to force AC charging for any charger that is detected as USB (e.g. many car chargers) and pull the full current the charger can support. It also provides additional security when connecting to public charging stations because by forcing AC charging, USB/adb data transfers are disabled, protecting your data.

    Fast charge can be toggled by issuing:

    echo 1 > /sys/kernel/fast_charge/force_fast_charge

    and off:

    echo 0 > /sys/kernel/fast_charge/force_fast_charge

    Some roms (AOKP) have also implemented toggles.

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

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

    For the widget (or any fast 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).

    Here you go. Good luck have fun:
    http://www.incredikernel.com/wp-con...wnload.php?id=nexus_s_force_fast_charge.patch
    4
    For those of you who are fans of the widget, here's a little teaser of what's coming...

    If anyone has any other ideas for center icon options feel free to let me know.

    attachment.php


    attachment.php


    attachment.php
    1
    Like how fast compare to the standard 3,5 hrs full charge?
    1
    Will this hurt our device . Or will it affect the battery in a harmful way ?

    In general, unlikely. In you particular case, anything is possible. You should do some reading on fast charging vs usb 500mA limited charging, and then you can make up your own mind.
    1
    Yep. Known JB "problem". Ironically, have you pirated the app, the issue wouldn't be there. It's due to a copy protection mechanism integrated by Google.

    Here's a workaround:
    Using a file browser, navigate to the /mnt/asec/ directory on your phone
    Find the folder titled com.incredicontrol.fastchargewidget
    Browser it and copy pkg.apk from there to your SD
    Uninstall Fastcharge/Toggle widget (if wanted, you can backup the app with Titanium Backup before to be able to restore data!)
    Install the pkg.apk file on your SD
    Restore app DATA ONLY using Titanium Backup

    Haha, this is what I get for legitimately purchasing it. I'll give this a shot later - thank you for the suggestion.