Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
chad0989
Old
#1  
Senior Member - OP
Thanks Meter 8970
Posts: 1,726
Join Date: Oct 2010

 
DONATE TO ME
Default [KERNEL PATCH] Force AC (fast) Charging

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/d...stchargewidget

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-cont...t_charge.patch
Attached Thumbnails
Click image for larger version

Name:	on.jpg
Views:	512
Size:	9.4 KB
ID:	965500   Click image for larger version

Name:	off.jpg
Views:	497
Size:	4.5 KB
ID:	965501  
The Following 15 Users Say Thank You to chad0989 For This Useful Post: [ Click to Expand ]
 
Joshhayes801
Old
#2  
Joshhayes801's Avatar
Senior Member
Thanks Meter 99
Posts: 439
Join Date: Apr 2010
Location: Ogden, UT

 
DONATE TO ME
Hopefully we will see this implemented into a lot of our kernels around here. It looks pretty sweet. If I knew how to compile kernels I'd be all over it.

Sent from my Nexus S 4G using xda premium
The Pen is mightier then the sword but you must ALWAYS have a sword for when the pen fails.
 
xamadeix
Old
#3  
xamadeix's Avatar
Senior Member
Thanks Meter 62
Posts: 823
Join Date: Sep 2010
Location: Boston, MA
Thanks! I'd like to see this also!
 
chad0989
Old
#4  
Senior Member - OP
Thanks Meter 8970
Posts: 1,726
Join Date: Oct 2010

 
DONATE TO ME
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.
 
hp420
Old
#5  
hp420's Avatar
Senior Member
Thanks Meter 634
Posts: 1,104
Join Date: Jul 2011
Location: NY
thank you x 1million!!! I requested this from mathkid about two weeks ago & never heard anything back....I hope this gets implemented now
 
JohnCorleone
Old
#6  
JohnCorleone's Avatar
Recognized Contributor
Thanks Meter 5148
Posts: 14,424
Join Date: Dec 2010
Location: Whittier,CA

 
DONATE TO ME
Quote:
Originally Posted by hp420 View Post
thank you x 1million!!! I requested this from mathkid about two weeks ago & never heard anything back....I hope this gets implemented now
Yup, I remember that and now its here to add! Looking forward to this

Sent from my SPH-D710 using xda premium
 
chad0989
Old
#7  
Senior Member - OP
Thanks Meter 8970
Posts: 1,726
Join Date: Oct 2010

 
DONATE TO ME
Quote:
Originally Posted by hp420 View Post
thank you x 1million!!! I requested this from mathkid about two weeks ago & never heard anything back....I hope this gets implemented now
He messaged me and it took me a couple weeks to get around to it. Haha

Sent from my ADR6425LVW using XDA
 
hp420
Old
#8  
hp420's Avatar
Senior Member
Thanks Meter 634
Posts: 1,104
Join Date: Jul 2011
Location: NY
Quote:
Originally Posted by chad0989 View Post
He messaged me and it took me a couple weeks to get around to it. Haha

Sent from my ADR6425LVW using XDA
ahh, thanks for the response I'll write him and thank him for his part in researching this for matrix kernel.
 
stu5797
Old
#9  
stu5797's Avatar
Senior Member
Thanks Meter 115
Posts: 822
Join Date: Aug 2011
Location: Cleveland, Ohio
any kernels on the nexus s 4g support fast charge? I cant wait to get this working! Great job!
Current Devices:
Verizon: Note 2, Palm Pre 3, Palm Pre 2
Sprint Phones: Galaxy Note 2, Galaxy S3, Nexus S 4g, Photon, every Palm phone available...
 
thezero4
Old
#10  
Member
Thanks Meter 2
Posts: 45
Join Date: Dec 2007
I've always had a problem of GPS draining my phones battery no matter what ROM I'm running, or what car charger I use, been through about 5 of them. If this helps with that I'm super stoked about this, since it's the only thing that I don't like about my Nexus S.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Guide to Using Adobe Air on Android

When writing an app with performance in mind, you most likely want to write it native code using the … more

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more