yashsingh1/xdaforums huggingface dataset:
[Nexus S 4G Android Development] ymshulman:
Oh thanks I get it, that's a big help. It's just one off of that cause the first page throws everything off, like now it's page 262 but we're at posts 2611-2616. Thank you :-)
[Nexus S 4G Android Development] Skunk Ape1:
And again.... Lol

____________________

Just Flash It !!!
[Nexus S 4G Android Development] zeeraf:
hey skunk i know this may be a stupid question cause im sure i already know the answer but its early and im stilll half asleep so im gonna ask just to be sure ...............to freeze apps ur using TB ??
[Nexus S 4G Android Development] Skunk Ape1:
Yes, TB. But I think to freeze apps you need the pro version but I'm not sure. also I've heard there are other apps that will freeze them but since I already have the pro version of TB, I haven't really investigated it.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] treezy26:
Idk how good this is but its the best I've had in awhile...

View attachment 916010

idk how I got here...
[Nexus S 4G Android Development] Skunk Ape1:
Nothing wrong with those numbers at all. Anything over 18 hours on these phones and you should be very pleased.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] rift999:
I Use Rom toolbox Pro. You need the pro version like TB but it is cheaper and preforms all the same functions. Plus it has a script editor and ad blocker built in.

Rift
[Nexus S 4G Android Development] JohnCorleone:
One of my favorite apps now. ROM Toolbox Pro is Titanium, Ad block, Script Manager, PropModder, SD boost, Font Installer all rolled into one app ..then theres still more..like 100 custom boot animations. I could go on but you get the picture
[Nexus S 4G Android Development] formula84:
Should add this as a link in your sig.
[Nexus S 4G Android Development] Master Ramy:
:-) :-) my neighbor built that app, Rom Toolbox :-)
[Nexus S 4G Android Development] JohnCorleone:
I probably helped buy your neighbors house...lol. I think I have purchased every app he has on Market
[Nexus S 4G Android Development] JohnCorleone:
Does anyone out there have the skillz to whip up an init.d script that runs 800/200 lazy then change to wheatley when screen off so I don't have to use an app to set up profiles?
[Nexus S 4G Android Development] joebarkho:
what does init.d do? i always hear about it.
[Nexus S 4G Android Development] JohnCorleone:
Well I don't know the exact definition but its where the devs put the scripts they write/add to control features like governors, SD read speeds, CPU scaling, etc so you don't have to have a 3rd party app running to make the changes. It automatically commands the phone to implement the changes
[Nexus S 4G Android Development] Skunk Ape1:
Now that would be great! I would love an easy way to swap to lazy when screen on and Wheatley when the screen it's off. Great idea! I just wish i coos do it. Lol...

____________________

Just Flash It !!!
[Nexus S 4G Android Development] rift999:
I would be extremely interested as well. As for Rom toolbox I would also highly recommend it.
[Nexus S 4G Android Development] Skunk Ape1:
Now that would be one long boring signature. :D

____________________

Just Flash It !!!
[Nexus S 4G Android Development] mushupork:
init.d explained (in part)

Init scripts are run as the phone is booting up - their history comes from Unix systems. They are placed in the init.d directory and numbered to indicate the order in which they should be run at system startup.

I stand ready to be corrected if anyone jumps in with a viable solution, but having been a Unix/Linux admin in a previous life, I'm not aware of any way to create an init script that will dynamically manage screen on/off profiles to change governors.

This requires a program that regularly polls phone state or receives signal that phone state has changed (i.e. screen has turned on, screen has turned off).

That is the model used by setcpu and others of its kind.
[Nexus S 4G Android Development] treezy26:
Previous life???

idk how I got here...
[Nexus S 4G Android Development] mushupork:
As in, I used to do that for a living. :-)
[Nexus S 4G Android Development] JohnCorleone:
Different phone but I have a script on my Epic Touch from Calkulin that runs 1200/200 on demand with screen on then 500/200 powersave with screen off. I actually modified it because it initially slowed to 1000 at 85% battery and 800 at 35%. It also was conservative so I changed that. Hopefully something similar could be made because that would give us some great battery life. I could send someone the script but they would obviously have to modify it to add wheatley governor and any other frequency changes that needed to be made
[Nexus S 4G Android Development] mushupork:
I'd be glad to give it a look. I'll pm you an email address.
[Nexus S 4G Android Development] kyouko:
someone try this out. quickly wtrote it up at a friends house. i think youll have to run it thru a dos2unix converter first

#!/system/bin/sh

# gov for ScreenON =
SCREEN_ON_GOV="lazy";
# gov for ScreenOff =
SCREEN_OFF_GOV="wheatley";

# make it repeat
(while [ 1 ];
do

# assign screen-on governor
ON=`cat /sys/power/wait_for_fb_wake`;
if [ $ON = "awake" ]; then
echo $SCREEN_ON_GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;

# assign screen-off governor
OFF=`cat /sys/power/wait_for_fb_sleep`;
if [ $OFF= "sleeping" ]; then
echo $SCREEN_OFF_GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
fi

haven't done scripting in almost a year. but i think it'll work :p
[Nexus S 4G Android Development] JohnCorleone:
Appreciate that. Now if someone can run it through dos2unix...lol. I have ideas but definitely need help with putting them together. Mushupork, can you work with that? I will check my PM's in about 15 minutes when I get home
[Nexus S 4G Android Development] kyouko:
EDIT: fixed some stupid mistakes sleep deprivation = errors lol

:( fail double post
[Nexus S 4G Android Development] JohnCorleone:
I hope this gains traction. I just don't have the knowledge to do it myself. I will send Calkulin's scripts to Mushupork and hopefully between yours and those, we can have a script to push to init.d. edit ...Mushupork, PM sent as well. As long as one is what we want then this will be great! Thanks Kyouko and Mushupork for trying to make this happen!!!

Edit 2...Mushupork, can't send to second one either. Shows not able to receive...
[Nexus S 4G Android Development] mushupork:
Weird. Can you get to a computer and try to send it from there, or paste it into a PM?

---------- Post added at 11:43 PM ---------- Previous post was at 11:39 PM ----------

Wrapped up, renamed appropriately for an init script and put on Sendspace.

http://www.sendspace.com/file/61bifw

I have not tested it, so cannot make any warranties. Feel free to pull it down, then 'adb push 97gov_changer /etc/init.d/'.

Reboot and it should start up at boot. It does appear that this may do the job.
[Nexus S 4G Android Development] kevincwelch:
Thanks for doing this.

Can you tell me how this is different from using SetCPU to have a profile for screen off and just using NS Tools to set the default scaling governor when the screen is on?
[Nexus S 4G Android Development] mushupork:
Intent and goal is the same. The real difference is using a script run by the android OS as opposed to using a third-party app. The hope is that one can achieve more efficiency using a script vs an app, but I'm not convinced yet that it's viable.

Testing will reveal truth. :D
[Nexus S 4G Android Development] Skunk Ape1:
I bought Set cpu ages ago and pretty much quit using it when I installed nstools. I completely forgot about the profiles. It is now set up for wheatley when the screen is off and lazy when the screen is on.... Now to test.... :)

Thanks Kevin!
[Nexus S 4G Android Development] mushupork:
I've been using setcpu to do the same as a test. I'm using lulzactive for screen on and wheatley for screen off.

Figured it wouldn't hurt to play around with a script and see how it compares... :)

---------- Post added at 01:08 AM ---------- Previous post was at 12:38 AM ----------

JohnCorleone: Don't sweat sending it. I found the script in Calukin's ROM post for the Epic Touch 4g. Several init scripts. I'll look at them and see what I can do.

So long as MK95 doesn't consider this a thread hijack, I'll come back here with results.
[Nexus S 4G Android Development] kyouko:
Just tried out the setcpu app. It does the job - lazy when awake, wheatley when sleeping :D

edit: for those of u who want to test it out and see if the script / setcpu is working, connect your phone to a computer, then:

adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

if the screen is off it should say "wheatley" and obv On would be "lazy"
[Nexus S 4G Android Development] JohnCorleone:
I will have to reinstall adb as mine is somehow borked. The reason I wanted the script was to avoid running 3rd party app. I knew SetCPU would work but having a script is more battery efficient. So basically I can download the compiled one a few posts up, push to system/etc/init.d and hopefully adb test today...asap. thanks everyone for making it happen so fast. I am sure MathKid can adb check it if I can't get a proper reinstall here.
[Nexus S 4G Android Development] JohnCorleone:
OK this is looking just like the one my friend made for my Epic touch. If you download, you need to rename and take the ".bin" off of the end. It must do that to make it in downloadable form. I am about to push it to init.d now but I did save a few %'s on wheatley while sleeping compared to lazy so .. hopefully either someone else or I can adb check to see the script is functioning properly. .so far so good though...edit.. got rid of NSTools because that will probably override the script. I know SetCPU does on Calkulin's. I used Astro to change file name to delete the ".bin" and pushed it with Root Explorer and rebooted. When phone booted I checked in Rom Toolbox Pro and I was running 800/200 lazy. I just need someone to do the adb check. Maybe I can have someone check it if someone else doesn't this morning but I have it in my init.d folder now! Thanks guys!

Edit 2 BLN app back on my phone to keep that feature but I think NSTools may have to be deleted for script to function properly. Hopefully someone will double check this all this morning.

Edit 3..BLN app gives green screen flash like crazy ...hmmmmmm
[Nexus S 4G Android Development] kyouko:
Did you post a link to it? :confused:

I must be blind
[Nexus S 4G Android Development] JohnCorleone:
Its here kyouko......can you adb check it?
[Nexus S 4G Android Development] luciferii:
hey weirdo.. i take back what i said bout your kernel, it runs great and the issues i had have ceased. good job!

neXus•S•4G°Cødename•Ændroid°1.4.0
[Nexus S 4G Android Development] kyouko:
Oh..I thought you were referring to another one haha.

nope. doesnt work for me. Stays at lazy - NSTools/SetCPU uninstalled as well.

Ran

sh -n /etc/init.d/97gov_changer

to see why it wasn't working and it spit out:

/etc/init.d/97gov_changer[14]: syntax error: 'if' unmatched

so apparently my first 'if' statement (the one for $ON - line 14) isn't right.

I don't have time to look at why right now - but I figured I should inform you guys so someone else can look at it ;)
[Nexus S 4G Android Development] JohnCorleone:
Just got adb up too...lol. thanks. I will roll with SETCPU for now but thanks for getting the ball rolling!
[Nexus S 4G Android Development] FL0OD:
Running this on the latest CM9 nightly and it's real nice.:thumbup:

°•neXus S4G•°
[Nexus S 4G Android Development] SA-07:
Sweet :)
[Nexus S 4G Android Development] FL0OD:
Just like the old days, CM nightlies and matr1x

°•neXus S4G•°
[Nexus S 4G Android Development] kevincwelch:
You know, I felt the same way about SetCPU.

When this script was introduced, I thought about using the profiles again. So, I have a wheatley screen off profile and just use SetCPU to intellidemand. I'm getting increased battery life now. Not dramatic, but noticeable.
[Nexus S 4G Android Development] styckx:
Was just stoppin by to see if anyone threw this on the CM9 nightlies yet and it was answered just like that.

Nightlies + Matr1x.. Good to be back. Seems like Nightly 174 was 10 years ago. :)
[Nexus S 4G Android Development] Xaelius:
Loving this so far. Running great on mine with no issues that I have observed so far and have gotten the first stable OC on my wife's NS4G (800/1200, all V's +25, smartassV2). Great job man :)
[Nexus S 4G Android Development] Skunk Ape1:
Also went with the cm9 nightly. And of course matr1x. Lol

____________________

Just Flash It !!!
[Nexus S 4G Android Development] frankie51:
I'm getting better battery too. I'm going on thirteen hours, with an hour and a screen on time(very light use today) and at 76%.
[Nexus S 4G Android Development] jmelick07:
I know I saw this somewhere else but for the life of me I can't find it so I'll just ask here...

When talking about battery life freezing apps seems to be a big factor, how do you do that? through titanium backup?
[Nexus S 4G Android Development] frankie51:
Yes or rom toolbox
[Nexus S 4G Android Development] SA-07:
Taking feature requests for 17.5 :)
[Nexus S 4G Android Development] kevincwelch:
super dooper deep idle? I'm not sure how you could improve upon this!
[Nexus S 4G Android Development] Braneless:
You can also disable system apps in ICS app manager. Click 'Talk', for instance, and select 'disable'.
[Nexus S 4G Android Development] JohnCorleone:
I am glad this is working out for people. I am using SetCPU myself for the time being...screen off profile 400/200 wheatley.
[Nexus S 4G Android Development] frankie51:
How do you set up speed to run screen off? I just put mine at the lowest, it was like 19.2 or something. Can you post a screenshot of your screen off profile please?
[Nexus S 4G Android Development] JohnCorleone:
When you are setting the profile, use the sliders. They look grayed out but they work...
[Nexus S 4G Android Development] jerusry:
Great piece of work you have here! Thanks!

I was wondering if anybody had any new news about the screen on/off profiles script? I would definitely be interested in that if it ever gets cooked up and working. This would be the next coolest thing to add to my phone.
[Nexus S 4G Android Development] treyweez11:
I smell a 17.5 lol

Sent using Tapatalk, you know, the free version.
[Nexus S 4G Android Development] frankie51:
How do you get those CPU settings though? Mine has weird settings.
[Nexus S 4G Android Development] frankie51:
Never mind I figured it out. I had to reset app and click auto set freuqencys.
[Nexus S 4G Android Development] Rem3Dy:
Miss MK's kernels :(
[Nexus S 4G Android Development] Skunk Ape1:
Why??? They're only a flash away.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] enosh816:
how are you liking that. I flashed it last night and checked it out for a minute but I noticed there was no multiple unlock. and I dindt feel like trying to figure out a good color setting for the deep black and stuff. Let me know if Im missing out. went back to codename and am checking out dynastys red theme. Its pretty sweet.

Bye the way.

MathKid do whatever you want. You rock.
[Nexus S 4G Android Development] Skunk Ape1:
It is very nice i like it quite a bit. Didn't even notice it was missing multi lock as i can't use that function as I need my phone password protected.

I'm trying the slim ics right now and it seems very smooth. The higher resolution is nice but takes a bit to get used to it but the colors are very rich and the blacks are BLACK.

Don't hate me as I haven't loaded matr1x yet but am doing so soon as i finish typing this. :D

____________________

Just Flash It !!!
[Nexus S 4G Android Development] JohnCorleone:
Kind of interesting... with the screen off profile, if you look closely, my battery actually went up a bit...
[Nexus S 4G Android Development] Skunk Ape1:
Yeah... That is weird.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] JohnCorleone:
And I didn't connect to laptop to push files or anything like that. I think I am going to stick with the 400/200 wheatley screen off profile
[Nexus S 4G Android Development] frankie51:
I'm using 400/100 wheatley screen off profile and my phone didn't drop a percent while idle for three hours!
[Nexus S 4G Android Development] benniebeeker:
hi all... reporting 2 issues on my 9020t here...

first my camera no longer works... when i take a picture, it just comes out as a grey screen...

secondly, my home, search, menu, back buttons stay lit all the time while in power save mode... running kang latest milestone rom...

::edit::

if i reboot the phone, i can take a picture just fine... when i re-open the camera green lines start spewing around the screen and photos come out grey when i actually snap them...
[Nexus S 4G Android Development] dscatto:
I know this is a given & I'm not saying it isn't amazing, but all these screen shots of great battery life have some things in common. 1) A constant, or fairly close to it, wifi signal, 2) Great signal & 3) No GPS on.
[Nexus S 4G Android Development] JohnCorleone:
On my end, I always leave Wifi on with both of my phones so its a bit misleading. I am about 50/50 Wifi and 3g with a bit of 4g tossed in there. For instance, same with my Epic Touch. It shows Wifi the whole time but I was walking around NYC bouncing between 1x,3g, and 4g. That's why my screen on time only 4.5 hours..edit...damn....wrong pic
[Nexus S 4G Android Development] Skunk Ape1:
I've been saying that for weeks..

____________________

Just Flash It !!!
[Nexus S 4G Android Development] Skunk Ape1:
Why would anyone want GPS on if you aren't using it? The only time I use GPS is when I need directions or open an app that needs it.

I have explained my usage before. When I'm at work, we are not allowed to pick up, answer or turn on the screen to our phones. Doing so will get you 3 days off without pay the 1st offense, a week the 2nd time and unemployment the 3rd. So I have made it a habit to turn off data while at work. Can't use it anyway.

When at home, of course I use wifi, It's faster.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] the1dynasty:
Sorry for the noob question but i haven't been in this thread in a while.... I see talk of screen profile adjustment... I usually make adjustments with NSTools... Is that feature available with that app? Curiosity has me wanting to test this feature lol
[Nexus S 4G Android Development] Skunk Ape1:
No. Nstools does not have this option. SetCPU does.

____________________

Just Flash It !!!
[Nexus S 4G Android Development] rift999:
Has any progress been made on the script idea?
[Nexus S 4G Android Development] kevincwelch:
Mathkid95-

I wonder if you should start expanding your development into additional arenas. You seem like the type of person who could certainly do so.

Your kernels have been consistently top notch. And now with this interest in profiling the phone when the screen is working under different circumstances, I think it would be really interesting to see what you could produce in terms of dynamic kernel profiles.

What do you think?

You might say that SetCPU could do it just as easily, but as others have said, this requires running a 3rd party app. I don't know if it would be any different, but I'm sure you could make something leaner and more efficient.
[Nexus S 4G Android Development] rift999:
I have no idea how difficult that would be but it would be awesome. And if anyone could do it my money would be on mk
[Nexus S 4G Android Development] JohnCorleone:
I was wondering the same thing because the profiles in SetCPU work great so I could only imagine what it would be like if an app didn't have to constantly make the screen on/off changes
[Nexus S 4G Android Development] kyouko:
Hey mathkid

I have a question regarding the dalvik script you include. Did you relocate it to /cache to increase the amount of /data space we have available? or does it also have some sort of performance increase as well?

I ask because with the script installed the app SwitchMe doesn't work because of the symlink created (removing it easily allows it to work perfectly). Just wondering :)
[Nexus S 4G Android Development] kyouko:
1) not that much wifi for me

2) meh signal the whole time

3) gps is always enabled for me, but it doesn't show up on the battery stats cuz I didn't use google maps this time around

4) :cool:

Today I'm gonna reinstall setcpu and try out that profile thing see if it makes the battery life even better like some of you are reporting
[Nexus S 4G Android Development] Nexism:
Have been bouncing around to different kernels since the switch to ICS. Just flashed Matrix day before yesterday. My phone is finally stable and reliable. Thank you mathkid for the great work.
[Nexus S 4G Android Development] dscatto:
Nice! :)
[Nexus S 4G Android Development] sevoh:
Hey MK what you think your going to put on the next update? ;)
[Nexus S 4G Android Development] gear.h34d.2012:
Another here for Screen off Scripts! Much love MK, you're amazing.
[Nexus S 4G Android Development] srthimsen:
Amazed with 17. Froze sprint menu and anything related to nfc. Spent about 1.5 hours with all data off, just cell, but other than that, just light txt and browsing. On cm9 kang.

Edit: this is 1.5 hours screen on.
[Nexus S 4G Android Development] jerusry:
Thought u may like to see Real battery use stats. This was medium to pretty heavy use. If you want more details I can repost em or you can check the vhgomez lotar1 thread where the longpost is, Cuz its the rom I'm running . This is the kernel I'm using.

Here is my stats.

Took the last one just now cuz I forgot the details. So its showing a few minutes of charging at the end....
[Nexus S 4G Android Development] ejohn3288:
Can you post a link to the long post? And nice battery life. Thanks for sharing
[Nexus S 4G Android Development] jerusry:
link requested

and this is the whole page the post is on...
[Nexus S 4G Android Development] kyouko:
yo jerusry, is that with the stock 1500mAh battery?
[Nexus S 4G Android Development] jerusry:
Yes, about 5 months old

Seriously I was super surprised too.... I am HEAVILY using my phone this morn. So we will see how it goes.
[Nexus S 4G Android Development] Evo_Shift:
I feel like an idiot but the link for the nexus s kernel and the nexus s 4g kernel seem to be the same. I don't see where i can select the 4g version or how i know if i have the 4g version downloaded or doesn't it matter? I only see an option for cfs or bfs but not nexus s vs nexus s 4g
[Nexus S 4G Android Development] jerusry:
Download either one. Cfs what I downloaded. It is for both NS and Ns4G.
[Nexus S 4G Android Development] kevincwelch:
Hmmm....7.5 hours on...that's sick.

...I think you 'shopped that image, dude ;)
[Nexus S 4G Android Development] genaro12543:
Or left the screen timeout on 5 hours
[Nexus S 4G Android Development] SA-07:
17.5 in the works