[Kernel mod] enable USB fast charging(now in the jawz101 kernel!

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
XDA user chad0989 made a patch to enable USB fast charging on several phones. Even some cheap car chargers I've had have been recognized as USB power and, consequently, the phone drains faster than it charges if I had, say, Maps and bluetooth going.

It's now ported over to the Optimus V jawz101 kernel for gingerbread IHO phones.

here's the commit
to see what was done to enable it on other variants

chad0989 even made a little toggle app on the Google Play store
https://forums.androidcentral.com/e...ncredicontrol.fastchargewidget&token=seCf24Gn
... I will be making a similar toggle app made with Tasker & will post a download some time in the next week or so.

The only drawback noted is USB mass storage won't work while it's drawing more power but who cares. That's why there's a way to toggle.
As far as safety is concerned it's been reported safe by many which makes sense since this is just getting the phone to charge as fast as a wall charger would go.

To toggle fast charging from terminal you'd need to issue the command:
on:
Code:
echo 1 > /sys/kernel/fast_charge/force_fast_charge
and off:
Code:
echo 0 > /sys/kernel/fast_charge/force_fast_charge
Attached are before & after screenshots of my phone connected to my laptop. The app I used is Battery Monitor Widget to get the mA power draw.
 
Last edited:

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
Hmmm, I have Ubuntu set up right now to build kernels, but I don't have a V to test on......

Sent from my LG-LW690 using Tapatalk 2
 

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
Re: kernel mod to enable USB fast charging

Hmmm, I have Ubuntu set up right now to build kernels, but I don't have a V to test on......

Sent from my LG-LW690 using Tapatalk 2

make it flashable, Ill probably test. Im sure a lot of people would
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
Re: kernel mod to enable USB fast charging

make it flashable, Ill probably test. Im sure a lot of people would
does the actual patch look like it's something flashable? The commands to execute it could be once the functionality is baked into the kernel but I dunno.

+1
Isn't this built in on AOKP too?

Sent from my LG-VM670 using Tapatalk 2

I'm pretty sure it is. I'm still stuck on the GB Roms though
 
Last edited:

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
does the actual patch look like it's something flashable? The commands to execute it could be once the functionality is baked into the Rom.
I could even make a little free Tasker AppFactory app anyone could use once it was put in the kernel. or see if the GB Rom builders could incorporate it into the CM settings.

What are the commands? And you would just flash kernel and then execute commands in terminal .....

Edit: nvm, never bothered to look at xda....

Sent from my LG-LW690 using Tapatalk 2
 
Last edited:

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
Re: kernel mod to enable USB fast charging

well there's code for the function that goes into the kernel & then you run a script from terminal or whatnot to toggle fast charging off & on since you'll still want to be able to turn it off when you want to connect your phone to your laptop & access the SD card storage.
It could be set to always be on and not have a toggle but there'd still need to be the kernel piece that says set USB to be AC power or back to USB power.

I don't know if you can make the patch a flashable thing, though.
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
well there's code for the function that goes into the kernel & then you run a script from terminal or whatnot to toggle fast charging off & on since you'll still want to be able to turn it off when you want to connect your phone to your laptop & access the SD card storage.
It could be set to always be on and not have a toggle but there'd still need to be the kernel piece.

I don't know if you can make the patch a flashable thing, though.

Anything is flashable. Any app replacement, adding /replacing files, it can always be done via recovery.

Sent from my LG-LW690 using Tapatalk 2
 

Zakman

Well-known member
Aug 1, 2011
492
185
0
Visit site
Can someone patch this to thekravens test 15 kernel??? I'd like to use it in cm10 :D

Sent from my LG-VM670 using Android Central Forums
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
Seeing as it's a kernel patch, I wonder if TDM included it in his kernel.

And yeah, all I use is Gingerbread :p

Sent from my LG-VM670 using Tapatalk 2
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
Can someone patch this to thekravens test 15 kernel??? I'd like to use it in cm10 :D

Sent from my LG-VM670 using Android Central Forums

Get me the source please, I'll build as soon as I have time......not today, maybe tomorrow or Thursday ....

Sent from my LG-LW690 using Tapatalk 2
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
Someone running thekraven's test 15 kernel, run this command and upload the file please

adb pull /proc/config.gz

You will find config.gz in same directory as adb.

Sent from my LG-LW690 using Tapatalk 2
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
Re: kernel mod to enable USB fast charging

This patch is written to go into another device/board and needs modification to build for thunderc.

most def. that's where I'm trying to figure out what files I need to touch:
FROM THE PATCH
/arch/arm/mach-s5pv210/Kconfig
+config FORCE_FAST_CHARGE

/arch/arm/mach-s5pv210/Makefile
+obj-$(CONFIG_FORCE_FAST_CHARGE)

/arch/arm/mach-s5pv210/fastchg.c *new file
+#include <linux/fastchg.h>

/arch/arm/mach-s5pv210/mach-herring.c
+#ifdef CONFIG_FORCE_FAST_CHARGE
+#include <linux/fastchg.h>

/include/linux/fastchg.h *new file

FOR VM670
/arch/arm/mach-msm/Kconfig?
+config FORCE_FAST_CHARGE

/arch/arm/mach-msm/Makefile?
+obj-$(CONFIG_FORCE_FAST_CHARGE)

/arch/arm/mach-msm/fastchg.c *new file
+#include <linux/fastchg.h>

/arch/arm/mach-msm/???.c
+#ifdef CONFIG_FORCE_FAST_CHARGE
+#include <linux/fastchg.h>

/include/linux/fastchg.h *new file


I don't know if I need to go into the makefile & kconfig in \arch\arm\mach-msm & edit those or arch\arm\mach-msm\lge\ to edit them
 

Forum statistics

Threads
943,006
Messages
6,916,851
Members
3,158,770
Latest member
jcl678