yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] secondskin:
Only problem is that I have no idea how to config the settings after setting this up. The instructions say to go back into the shell and configure the battery settings. Guess I will have to wait until someone who knows what they're doing tries. I don't have any skills at working within shell and wouldn't know what coding to write.
[Hero CDMA Android Development] Decad3nce:
Go into shell and type "batt-cfg"
[Hero CDMA Android Development] Papa Smurf151:
i have tested on my red dawn rom and it is working. Thanks for the tweak man
[Hero CDMA Android Development] mquinn24:
Thank you for this tweak. I have been using it for a few days and getting 30+ hrs. Awesome work
[Hero CDMA Android Development] platinumrug:
I tried going into terminal emulator just to test out the batt-cfg, and it continues to tell me permission denied. Granted I haven't flashed the update yet, so maybe that's why... at least on that.

I'm a straight noob when it comes to this stuff, I can't seem to get it to work, always getting permission denied on terminal emulator.
[Hero CDMA Android Development] Jedis:
Thanks! Configured mine to use the 748mhz setting.
[Hero CDMA Android Development] xxproblemzxx:
Can I do batt-cfg thru terminal?

Update: keep getting this when I do it through terminal

Loading 748mhz defaults

Saving Settings...

mount: permission denied (are you root?)

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

/system/bin/batt-cfg: cannot create /system/etc/batt.conf: read-only file system

mount: permission denied (are you root?)

Settings Saved.

Starting batt.sh

Started

NOTE: when you exit ADB or terminal, you may have to hit CTRL-C

$
[Hero CDMA Android Development] black7:
Is there a difference between this and setting profiles in SetCPU for different battery levels?
[Hero CDMA Android Development] DirtyShroomz:
I do believe u have to type su to get it to work on terminal to get it to work (thanks duff.... i was completely off and to think i use terminal hah)
[Hero CDMA Android Development] duffkitty:
Type su in the terminal first to make it root.

Sent from my CDMA Hero running CM6 using the XDA application.
[Hero CDMA Android Development] xxproblemzxx:
Ah lol totally 4got. Thanks man
[Hero CDMA Android Development] DirtyShroomz:
Testing.... will post results tomorrow
[Hero CDMA Android Development] DirtyShroomz:
I was wondering the same thing
[Hero CDMA Android Development] atoz350:
Don't know if there is an actual difference, but my phone seems a lot smoother now. As though I eliminated a huge bog from it's processes.
[Hero CDMA Android Development] DirtyShroomz:
Did you have it OC'd before?
[Hero CDMA Android Development] Pauper7:
maybe im doing something wrong. I loaded this set it at the 710 like you suggested thru the Term EMU. have not rebooted. and charged to 100%. I unplugged and within ten minutes having NOT DONE A THING...I was down to 84 on the battery...WTH did I do wrong? what in the name of LEBRON is goin on around here?
[Hero CDMA Android Development] arcejefferson:
Im having the same issue its been two hours since my last charge and im at 49 % battery... Please help

Sent from Aloysius HERO using Tapatalk.
[Hero CDMA Android Development] s0be:
If you're on test 2, you need the beta 8 battery tweak
[Hero CDMA Android Development] Pauper7:
What do u mean by test 2 and where do I find beta 8?
[Hero CDMA Android Development] ItsDon:
There is a beta 8??
[Hero CDMA Android Development] dsMA:
need help, config prompt doesnt recognize input

deleted...figured out what i was doing wrong.
[Hero CDMA Android Development] arcejefferson:
Can u share what u did...

Sent from Aloysius HERO using Tapatalk.
[Hero CDMA Android Development] METHOD1911:
Wheres the beta8
[Hero CDMA Android Development] arcejefferson:
No clue...

Sent from Aloysius HERO using Tapatalk.
[Hero CDMA Android Development] dedian:
"beta 8" is the script that s0be posted a few pages ago.
[Hero CDMA Android Development] s0be:
Decad3nce bundled up a update of it.

Also, I have A better fix in my github, untested though
[Hero CDMA Android Development] Pauper7:
There is nothing from sobe I can find that relates to beta 8.
[Hero CDMA Android Development] arcejefferson:
I found the script but how do I use it.. Do I have to run that in a terminal...? Thanks

Sent from Aloysius HERO using Tapatalk.
[Hero CDMA Android Development] chefthomas99:
CFS Performance Tweaks - what is it? Should I use it?
[Hero CDMA Android Development] dsMA:
I enabled CFS tweaks, see first pic to confirm. But when I run the diag the CFS section reports file not found for all tweaks, see second pic. Is this what is suppose to be displaying?

Looks like I can only upload one pic through the xda app :-( the pic uploaded is the second pic I refer to with the CFS section. Note CFS Tweak has a value of 1
[Hero CDMA Android Development] Big-O-Devil:
Where is beta 8 ???
[Hero CDMA Android Development] Pauper7:
Battery Tweak applied on froyo test 2...chose option 2 for default 710

. Experiencing Massive drainage and battery temp constant 107...WTF IS GOIN ON HERE... I'm close to wiping everything and re-rooting and reflashing. Basically starting over.
[Hero CDMA Android Development] Decad3nce:
You probably have something running in the background keeping a wake-lock, or you're using a version of froyo which contained a kernel that didn't have a definition for the 672000 frequency causing the battery tweak to stutter and possibly stick at whatever frequency(probably 710) and cause excessive heat. This problem has been eradicated in the latest Froyo, go update. There is no way this tweak caused you drainage otherwise, it just can't lol.
[Hero CDMA Android Development] CrashV2010:
On Beta 8

Wow, I have tweat the crap out of my phone....

768 mhz

all the turn on cfg's

And wow, im at over 5.0 MFLOPS.... And no burning, lol !!!!
[Hero CDMA Android Development] Pauper7:
what is mflop?
[Hero CDMA Android Development] CrashV2010:
MFLOPS are how many frames/sec, or look it up in a search engine sir.
[Hero CDMA Android Development] collin_ph:
I wouldn't say that everyone will see 30+ hours in their current configuration, although they should see improved life. Many people who get only 6 or fewer hours are using WIFI, GPS, and many widgets that poll for data often. I've seen a single widget such as the weather channel widget cut battery life in half while on the tweak. I have ideas for a future version that may improve this situation more, but for now, check your widget usage and disable wifi if you're not using it. I've been told GPS can make a difference, but in my experience, GPS doesn't effect battery life as much as other things.
[Hero CDMA Android Development] collin_ph:
When charging to 100%, make SURE to let it charge until the LED goes Green. 100% on the indicator is a lie sometimes. Also, temperature makes a huge difference, so if it's HOT, let it stay on the charger until it cools down. You can also wipe battery stats, although this tweak does not require it.
[Hero CDMA Android Development] collin_ph:
Either of you guys noticing anything with the changes you made? I'm still wondering if that code does anything new besides precalculate math, which normally I would say would be a good thing.. but all this code to save 100 math problems over the course of an entire discharge cycle might not pay off in the long run (you could say that the extra 8K of memory usage might offset such a small gain), unless I'm missing something.
[Hero CDMA Android Development] collin_ph:
What's the largest battery user? (look at your battery stats).

Either you have a bad cell in your battery, it wasn't really charged at 100%, or you have some kind of widget that's downloading constantly --I can run pandora for an hour and not use anywhere near 50%.
[Hero CDMA Android Development] collin_ph:
Beta 8 is Decad3nce and S0be's work on including a slightly different way of doing the math in the process. Beta 7 is nearly identical and shouldn't differ in battery performance-- We're winding down development on Version 3 (beta 7/8) of the battery tweak, and moving on to version 4, which will include heat management and an attempt at focusing on more hardware than just the CPU.
[Hero CDMA Android Development] collin_ph:
What ROM are you using? I don't think the battery tweak is working well on your ROM-- notice the "operation not permitted" on the mount command. This indicates that you're on a significantly different ROM than Darch...
[Hero CDMA Android Development] collin_ph:
I've been out on vacation and just saw your post. Can you run a batt-diag and PM it to me (or pastebin it).

adb shell

batt-sh -v > /sdcard/batt.log

Then download the batt.log, view it and PM or pastebin it. Thanks!
[Hero CDMA Android Development] ItsDon:
I asked this question over in my rom specific thread but perhaps it is better suited to this one.

If I am running a 691OC kernal and select option 2 on the tweak, will it override the kernal settings and scale up to 710 or just stop at 691 since that is what the kernal is set to? Oh, I'm running beta 8 at the moment.
[Hero CDMA Android Development] s0be:
Also uses only allowed frequencies.
[Hero CDMA Android Development] s0be:
Ok, to be a little more verbose as to where/why this came about...

At first, I was using an awk script to look in scaling_available_frequencies [1] and use the next larger frequency when one that was not valid was requested. This added the overhead of a /sys access every update. Acceptable probably would have been to cache the output of the sed step and just echo through awk.

Next, I changed the behavior to use the next lower freq rather than next higher [2]. With the same overhead. With the same overhead problem. This still left us with the various FP math steps being repeated, as well as a /sys access on each update.

I was unhappy with these overheads, as was CJD, who suggested the lookup tables. The problem was, lookup tables usually use arrays, and the awk shell in bb on android doesn't support arrays. I don't think it uses a full 8k (maybe you measured it?) but more like, 100 * (9Bytes+8Bytes) if it's ALWAYS interpreted, so 1.7Kish. If ash precompiles and internally uses pointers, it would be closer to 1K, as you would have 2 Bytes for the pointer rather than 9 Bytes for the variable name.

Unfortunatley, I'm far from an ash shell scripter (perl maybe).

1:

temp = sed "s:\ :\n:g" < /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies | awk -v target=$temp '$1 >= temp { print $1; exit }'

2:

temp = sed "s:\ :\n:g" < /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies | awk -v target=$temp '$1 ~ "^[0-9]+$" && $1 <= a { last = $1 }; END { print last }'
[Hero CDMA Android Development] collin_ph:
I found in testing that it automatically rounds down to the next highest available valid frequency when it actually scales. So the min and max frequencies do not have to be valid frequencies, just arbitrary caps. In practice, the scaling takes a more stair-step approach-- a better approach would be to use math that combines the voltages and frequencies in the calculations, so that it could stick on high-frequency, low voltage combos longer.
[Hero CDMA Android Development] dsMA:
I am using Aolysius 2.1.2 with update 6-29. I was just sent an email from another user who told me this rom is based off the damages rom.

If there is anything I can do to hep you guys test on this rom let me know.

Last night I saw about 14hrs powered own with 3hrs screen on. I do not have gps or wifi enabled. The only widgets I use are the HTC clock/weather wideget, a battery display widget that shows battery level as a precent (batterytimer lite), friendstream but I have it set to update only eveyr 8hrs), and the HTC agenda widget for google calander. As for app usage I do twitter (check every 30mins or so), light to moderate txting (though yesterday was really lite), some game playing (imobster, world wars) but only for a few mins at a time.

FYI the kernel I have installed is: 2.69.29-godmode-darchshlizz-oc ameer@darchstar #1

Also I am using beta7
[Hero CDMA Android Development] s0be:
We had people in IRC reporting that it was NOT behaving that way for them, but rather, always assigning the 245000ish value when not hitting a value inside of certain ranges (was friday, don't rememebr exactly right off). I was able to reproduce this behavior, under some unknown prereq conditions though.
[Hero CDMA Android Development] s0be:
If you're on B7, and it works, no need to go to B8. B8 is an attempt to fix what may or may not be problems in 2.2 based roms.
[Hero CDMA Android Development] dsMA:
idk if it is working properly. I have CFS Tweaks enabled but when running the diag checking the CFS section shows file not found errors. There is an image a couple of pages back I posted.
[Hero CDMA Android Development] collin_ph:
Definitely stuck on 245mhz with the noobz release, but haven't ever heard of anything like this on any other darch release.
[Hero CDMA Android Development] collin_ph:
S0be's patch won't address your issue. Your issue appears to be ROM related, as it doesn't have the same kernel as the froyo releases. Your kernel doesn't appear to support CFS tweaks (you may be running a BFS kernel), and you should check to verify that it is in fact overclockable and reclockable.
[Hero CDMA Android Development] Pauper7:
curious thing

Why does it seem that the battery tweaks reset when the phone powers down and back up. I installed Rom then the tweak chose the audio fix, CFS Tweaks (What are those?) and Option 2. I had to shut the phone down and just turned it on and it seems to have reset as though nothing was done.
[Hero CDMA Android Development] collin_ph:
There are 2 parts to your question. First, battery tweak has to be started upon startup by the ramdisk in your ROM.. the short version is that if you're using a Darch froyo Rom, (not dd2.7/dd2.8) then the startup part should work fine.

Secondly, the configuration utility uses a configuration file (/system/etc/batt.conf) to save your choices. It sounds like you might not be choosing to save your settings.. either that, or the Rom you're using isn't allowing us to remount /system as read-write. What Rom are you using?
[Hero CDMA Android Development] Pauper7:
I am using Darch's Rom from last night MOD6.0.0-Heroc-RC0.
[Hero CDMA Android Development] collin_ph:
I'll try and look into it tonight, but Darch is going to release a real RC tonight and I'll be testing on that release if it appears to be running properly. The last few releases have been kinda squirrelly so I haven't been testing much on them-- they didn't seem stable enough for me. I'm currently running on the "dog" release.
[Hero CDMA Android Development] Pauper7:
you mentioned saving settings properly..how do I do that? I type exit twice in the Term EMU...thought that was all I needed to do.
[Hero CDMA Android Development] theimpaler747:
When darch releases a the new RC tonight, where will it be? On the irc or the cyanogenmod page? Anyone know? Thanks
[Hero CDMA Android Development] dsMA:
It is overclockable. When the diagnostics it shows that it is reaching frequencies up to 710 and as low as 245. This was also confirmed with the following command:

cat sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

How can I check to see if it is uses BFS or CFS and if it doesn't use CFS should I disable those tweaks?

The odd thing is after enabling it my phone became much more responsive, before it was performing very sluggish after the initial install.
[Hero CDMA Android Development] collin_ph:
Choose option 9 when exiting instead of just hitting enter.
[Hero CDMA Android Development] collin_ph:
I don't have a BFS kernel right now to test it, but search for a file called rr_interval

if it exists then you are running BFS.

cd /

find * -name rr_interval
[Hero CDMA Android Development] collin_ph:
Can't say if he's releasing it to XDA tonight, but it will be on IRC for sure if it's released at all.
[Hero CDMA Android Development] theimpaler747:
Ok cool thanks hope he releases it! :)
[Hero CDMA Android Development] s0be:
to detect if you're running a bfs kernel:

in a shell (adb shell or terminal emulator), run dmesg | grep BFS

if it returns something like BFS 0.323, then you're running a BFS kernel.
[Hero CDMA Android Development] Pauper7:
ok so I went into Term EMU and did batt-cfg

chose option 2. there was no option to save after it ran, just said started and gave me a pound sign. so I did batt-cfg again and chose 8 for audio tweaks and the save option 9 was avail. so I chose that. and re did the batt-cfg and chose 5 and again option 9 was available. so I did. I went back in and both option 5 and 8 were back to ENABLE...
[Hero CDMA Android Development] theimpaler747:
Don't bfs kernals break GPS?
[Hero CDMA Android Development] collin_ph:
I'm not sure I understand, but I'll explain this much:

batt-cfg always shows the option 9, so you can save changes and restart (even if you haven't made any changes)

options 1 and 2 (the profiles) automatically save and exit when you choose them. However, you can go back into batt-cfg to customize or enable other parts of the tweak after batt-cfg. If you're still having issues, just cat /system/etc/batt.conf and see if it looks like your options were chosen (1 = on 0= off)-- there are probably more settings in there that you're looking for, but it should be fairly easy to figure it out.

Let me know. If you're not sure, just try and set it the way you want and then email me the batt.conf file -- be sure and let me know what settings you were trying to enable/disable.

Thanks.
[Hero CDMA Android Development] dpeeps74:
crossing my fingers. running dd 2.8 and after only getting about 5-6 hours of battery life today, figured i'd give this battery tweak a go round. weird because sometimes my battery lasts 10 or more hours...maybe this will give me some consistency so long as i remember to run it!
[Hero CDMA Android Development] chefthomas99:
does this work with DD 2.8?
[Hero CDMA Android Development] dpeeps74:
From what i've read, yes, you just have to run batt-cfg each boot.
[Hero CDMA Android Development] pwachleman:
Just wanted to say a quick thank you to the creator! Youve really changed my phone as much as Darchstar's 2.2 ROM. Its very appreciated!
[Hero CDMA Android Development] mdsj:
Alright I just flashed Cyanogenmod 2.2 on my hero and the battery tweak. I put the settings on default to 710mhz. Now I hope that I get as good results as what I have been reading! :-)
[Hero CDMA Android Development] xxproblemzxx:
Which build r u on?

Yes I am using my Sprint Hero to upload this. Got a problem with it?!
[Hero CDMA Android Development] mdsj:
Unfortunately I only had the tweak installed for 20 minutes and I lost 12% battery life. :(

I disabled the tweak and will try again when the next version is out. Don't know whats going on.
[Hero CDMA Android Development] Decad3nce:
The tweak is not working properly right now as there is a bug with the kernel in that it doesn't properly using .show scaling_available_frequencies.

To be fixed!
[Hero CDMA Android Development] mdsj:
Oh ok. Well I removed it from my phone for now, will come back to it. My build is: FRF91
[Hero CDMA Android Development] juanxhdz:
I had the same problem when I first installed it within 30minutes I had lost 20% with no usage of the phone:confused:.....this is what I did.

I set the custom settings to undervolt and only OC to 691, I left the rest of the settings the same, for some reason it does drain the battery quickly at the beginning, but I just decided to fully charge it to see what would happen, I unplugged the phone today at 9:00am and I still have 50%, with a lot of texting, few 3-5 minute calls and testing chrome to phone a few times, also about 30 minutes of Pandora. Play with the settings and fully charge your battery, dont go by the first few minutes of flashing the tweak.
[Hero CDMA Android Development] mdsj:
Alright Ill give it one more shot with those settings. This time I ran it from command prompt in windows not the terminal emulator and set the max to 691mhz so lets see what happens. If the battery drains I will charge and see if there is a difference tomorrow. If not than I gotta move on for good, or until another release is out that is promising. :D
[Hero CDMA Android Development] Pauper7:
IS there a version of the tweak that is functional with the current ROM from Darch (last nights nightly.)?
[Hero CDMA Android Development] METHOD1911:
NO read a few post up.
[Hero CDMA Android Development] Decad3nce:
Pre-Beta 8 should still function as it wasn't dependent on the look up table by s0be(which depended on the scaling_available_frequency).

The one's before were based on a math problem really.
[Hero CDMA Android Development] androidus:
Where can Pre-Beta 8 be downloadeed?

Where can Pre-Beta 8 be downloaded? Thanks
[Hero CDMA Android Development] pbp776:
The first post in this thread. The one with collin_ph_battery_tweak_v3_beta7.zip
[Hero CDMA Android Development] mdsj:
Ok I went into batt-cfg and hit 4 to disable the tweak and than 9 to save the settings.

I just want to make sure that the tweak is off. Killing the battery right now.
[Hero CDMA Android Development] james33440:
You want to uninstall it?

batt-rm.sh in the terminal screen.

Sent from my Froyo Hero using the XDA app
[Hero CDMA Android Development] markus_del_marko:
so uninstalled this tweak and now my led is sticking... is this normal?
[Hero CDMA Android Development] james33440:
Got Froyo? Then I would say it's normal because this tweak enables the led fix.

Just download the leds hack app from the market. Works great for me.

Sent from my Froyo Hero using the XDA app
[Hero CDMA Android Development] markus_del_marko:
yeah i was trying 2.2.....i though the dev fixed the led stick?
[Hero CDMA Android Development] Pauper7:
Collin_ph, are the frequency tables fixed yet? I noticed on Beta 7 that when I went to customize the file didnt exist. Im wondering if that because I had used beta 8, iflashed last nights nightly, then flashed beta 7. I am assuming i screwed up by not wiping. btw, wiping removes all installed apps and data, correct?

Thansk for your help!
[Hero CDMA Android Development] s0be:
It's a kernel problem, and it's being worked on
[Hero CDMA Android Development] duffkitty:
I would love to see the led fix as a standalone until we have a new release.

Sent from my CDMA Hero running CM6 using the XDA application.
[Hero CDMA Android Development] s0be:
beta 7 still works [*]

[*] it does better than the stock kernel does for battery, just not as good as it worked with other kernels.
[Hero CDMA Android Development] pitmanr2003:
will this tweek cause conflict with setcpu. seemed like i got slower speeds without setcpu. but was wandering if setcpu would just set it and i would not benefit from the batt tweak
[Hero CDMA Android Development] scmastertech:
yes it does
[Hero CDMA Android Development] Pauper7:
i noticed that after beta 7 is flashed the frequency tables are not found when customizing, but if I flash the overclock fix they appear.
[Hero CDMA Android Development] s0be:
The unfound frequency tables are a bug of that particular kernel.
[Hero CDMA Android Development] dsMA:
Hey guys

I tried to create my own custom battery profile but was unsuccessful, the changes did not save.

Note, running 2.1
[Hero CDMA Android Development] collin_ph:
If you are going to run batt-cfg through terminal and not adb shell, you must be root. Run su and try again.
[Hero CDMA Android Development] collin_ph:
Beta 9 has been released on www.primoweb.com/froyo - check it out.