FORUMS

Which OEM Would You Like to Help?

Most manufacturers have moments of greatness and moments of decadence, and in the past few years … more

Root T-Mobile S6/Edge on 5.1.1 Without Tripping Knox

If you purchase phones from a carrier, you may be no stranger to the difficulties … more

IonVR Coming Soon, HTC M9 Dev Edition Gets Android 5.1 – XDA TV

The HTC M9 Developer Edition has received Android 5.1. That and … more

Android 5.1.1 Omni ROM For Motorola Xoom

Back in Feb 2011, the Motorola Xoom became the first device to be sold with Android 3.0 … more

[KERNEL PATCH] Force AC (fast) Charging

1,883 posts
Thanks Meter: 9,456
 
By chad0989, Senior Member on 26th March 2012, 03:54 AM
Post Reply Subscribe to Thread Email Thread
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:	off.jpg
Views:	2314
Size:	4.5 KB
ID:	965488   Click image for larger version

Name:	on.jpg
Views:	2202
Size:	9.4 KB
ID:	965489  
Last edited by chad0989; 27th March 2012 at 06:24 PM.
The Following 28 Users Say Thank You to chad0989 For This Useful Post: [ View ]
 
 
26th March 2012, 03:57 AM |#2  
simms22's Avatar
Recognized Contributor
BROOKLYN!
Thanks Meter: 24,711
 
More
very nice, thanks
26th March 2012, 04:25 AM |#3  
brenix's Avatar
Senior Member
Flag San Diego
Thanks Meter: 111
 
More
Nice job... Thanks!
26th March 2012, 04:27 AM |#4  
mixtapes08's Avatar
Senior Member
Flag Quezon City
Thanks Meter: 1,738
 
More
Nice......

Sent from my Nexus S
26th March 2012, 05:27 AM |#5  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
Donate to Me
More
Many thanks . Hoping our devs implement this to their kernels.

Sent from my Nexus S
26th March 2012, 06:21 AM |#6  
brenix's Avatar
Senior Member
Flag San Diego
Thanks Meter: 111
 
More
Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA
26th March 2012, 06:52 AM |#7  
Member
Flag Sofia
Thanks Meter: 28
 
More
Great job! Thank you!
26th March 2012, 10:02 AM |#8  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
Donate to Me
More
Quote:
Originally Posted by brenix

Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA

Nexus S ? How do you use it since there are no kernels supporting this feature yet ?

Sent from my Nexus S
26th March 2012, 12:06 PM |#9  
debaj's Avatar
Senior Member
Flag Budapest
Thanks Meter: 168
 
More
Quote:
Originally Posted by Oodie

Nexus S ? How do you use it since there are no kernels supporting this feature yet ?

I reckon he compiled one for himself.
26th March 2012, 12:55 PM |#10  
OP Senior Member
Thanks Meter: 9,456
 
Donate to Me
More
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.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes