Jump to content

USB Charging Commander


Guest t0mm13b

Recommended Posts

Guest justcosmic1

Just what I was looking for - upgraded my ZTE racer and noticed the lack of this feature.

I used to tether my old MDA vario all the time to my laptop, and it def killed the battery.

So looking forward to trying this out on CM7.

If you could get it to properly integrate into the settings etc that would of course be even better ...either way, thanks for providing the app :)

Link to comment
Share on other sites

  • 1 month later...
Guest zachtmobile

I usually dont have this much problem figuring something like this out BUT....

I cant seem to get it to work either. I have a rooted Nexus S, and when I click to Disable USB charging it says "Updated OK," but when I go 'adb shell dumpsys battery' in the command prompt it has the USB charging listed as "True" and after 5 minutes the level has gone up by 2.

And if someone is looking for a reason why this program can be helpful - running logs for battery, cpu, and memory usage over long periods of time for application testing and verification. The battery info is all screwy when the USB is charging the device, but its necessary to have the usb connected into the computer to receive all the logs. Hence my opinion is that this program is gold and i would easily pay for it.

If I can get it to work...

Any thoughts or tips?

Edited by zachtmobile
Link to comment
Share on other sites

Guest t0mm13b

I usually dont have this much problem figuring something like this out BUT....

I cant seem to get it to work either. I have a rooted Nexus S, and when I click to Disable USB charging it says "Updated OK," but when I go 'adb shell dumpsys battery' in the command prompt it has the USB charging listed as "True" and after 5 minutes the level has gone up by 2.

And if someone is looking for a reason why this program can be helpful - running logs for battery, cpu, and memory usage over long periods of time for application testing and verification. The battery info is all screwy when the USB is charging the device, but its necessary to have the usb connected into the computer to receive all the logs. Hence my opinion is that this program is gold and i would easily pay for it.

If I can get it to work...

Any thoughts or tips?

Speaking for Blade community, the designation of battery device specific files solely rest with the Blade's kernel in question (at the time, it was 2.6.32 kernel for blade).

As you say you have Nexus S, the kernel would be different, no doubt, poke around in /sys directory on your handset to see for any clues. :)

Link to comment
Share on other sites

Guest zachtmobile

Speaking for Blade community, the designation of battery device specific files solely rest with the Blade's kernel in question (at the time, it was 2.6.32 kernel for blade).

As you say you have Nexus S, the kernel would be different, no doubt, poke around in /sys directory on your handset to see for any clues. :)

i have been in the sys directory for a few days looking for clues when I stumbled upon this thread. Would anyone have any idea at which file Charging commander looks at, or what key words I should be looking for to change the property?

Link to comment
Share on other sites

Guest t0mm13b

i have been in the sys directory for a few days looking for clues when I stumbled upon this thread. Would anyone have any idea at which file Charging commander looks at, or what key words I should be looking for to change the property?

Try: /sys/module/msm_battery/parameters/usb_chg_enable, well, that is on the blade.

Link to comment
Share on other sites

  • 1 month later...
Guest sibero80

I can certainly point out another use for this tool. I just bought a power pack for my I9100, and it seems to lack an ON/OFF switch.. so its ALWAYS charging. Is this tool could work with my device it would certainly save some unnecesary charge cycles on those power packs, so the used would CHOOSE when the charge is needed...

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
Guest KarunaV

Could you post the final bug free .apk for the app here?

I am still testing o the very first .apk posted on it thread and it shows the charging on the Status bar.

Link to comment
Share on other sites

  • 2 months later...
Guest t0mm13b

I am going to leave this here for the benefit of others who wishes to use this into their own handset - this will vary across different kernels.

Someone emailed me, and was trying to fit it within their LG Optimus 3D (P920), this is what I replied to this person,

Was looking at the Gerrett-RoadRunnerKernel-Cosmos, in

drivers/mfd/twl_core.c which *I* think is where the battery

regulator is...

And judging by the module itself, it looks like redirecting a value

to a sysfile is not a requirement here (that is in relation to the

MSM architecture in which USB Charge Commander does it in that

fashion), rather, more so, ioctl calls would have to be made, as

there's read/write functions in there, used in conjunction with

drivers/mfd/twl6030-gpadc.c (*/static long

twl6030_gpadc_ioctl(struct file *filp, unsigned int cmd, unsigned

long arg) /*)but this part caught my eye within twl_core.c

In the function *static void _init_twl6030_settings * there's this:

/* CHARGERUSB_CTRL3 */

twl_i2c_write_u8(TWL6030_MODULE_ID1, 0x21, 0xEA);

so I'd imagine an ioctl call to write a value to 0x21 (perhaps that

is a command you pass into the ioctl?), a value probably an inverse

of 0xEA to indicate no charge? (I am not 100% certain as am not

familiar with OMAP architecture - and please don't try write to it

directly for my fear due to limited knowledge of the said

architecture and perhaps risking damaging the battery)

So it will depend on your chipset and kernel. This Optimus as in this case, in which I received that in email was my actual reply above. USB Charge Commander only works with the msm architecture - specifically, msm7227 which uses the MSM battery driver built into the kernel which from there, bore the idea of USB Charge Commander.

All in all, you need to look through the kernel sources depending on your chipset and possibly would require an ioctl call to the driver itself to disable it for your handset.

Now, disclaimer follows - please do not try this on your handset and assume that in my reply to the person, that is to be taken as a given for your handset.

Link to comment
Share on other sites

Guest t0mm13b

i use gingerbread on xperia... sadly its still charging......

is this project dead?

I have an Xperia Mini... I will check it out shortly and get back to you on this :)

Link to comment
Share on other sites

  • 2 months later...
Guest modacococo

I have an Xperia Mini... I will check it out shortly and get back to you on this :)

My one is Xperia Mini Pro :)

Did you get this working?

Link to comment
Share on other sites

Guest t0mm13b

My one is Xperia Mini Pro :)

Did you get this working?

No, did not get it to work - semc board uses different layout altogether unlike MSM7227.

Still trying to figure it out :)

Link to comment
Share on other sites

  • 6 months later...
Guest jas2002

Xperia Play. Android 2.3.4

Sadly not working :(

I've been ages looking for something like these. My windows phone had this option integrated and I find it useful when connecting so many times the phone to the computer, cause I assume, you reduce considerably your battery life.

Thanks to the author anyway :)

Link to comment
Share on other sites

Guest t0mm13b

Xperia Play. Android 2.3.4

Sadly not working :(

I've been ages looking for something like these. My windows phone had this option integrated and I find it useful when connecting so many times the phone to the computer, cause I assume, you reduce considerably your battery life.

Thanks to the author anyway :)

SEMC chipsets uses a different battery driver so it will take some hacking around to get it to work proper with it.

The project was designated exclusively for the Blade.

So asking questions for other non-Zte Blade handsets won't suffice ;)

Link to comment
Share on other sites

  • 2 years later...
Guest angelfirex

Hi,

any way to get it working on carbon kk (phone is a motorola photon q)?

I'v been searching for a way to turn off charge for many days....

 

Thanks

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.