yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] kobridge:
Thanks so much sfhub!

It seems like I stayed too many nights awake. I corrected one place saying recovery-install.sh to install-recovery.sh.

Now I'm downloading your auto root package again and let me also correct the information accordingly.
[Samsung Epic 4G Touch] kobridge:
It's always rwxrwxrwx order.

rwx (read write execute) -> 4 + 2 + 1 -> 7

rw_ -> 4 + 2 + 0 -> 6

r_x -> 4 + 0 + 1 -> 5

r__ -> 4 + 0 + 0 -> 4

the second bit is always for w (write) permission. So, the order -rx is not possible.

Some basic binary calculation and permission related info:

The permission is consist of 9 bits for user, group, and other (each user group holds 3 bits).

With binary expression, it would be same

111 (user) 111 (group) 111 (other)

For first bit represent the read permision and the second is for write, third one is for execute.

so 755 equals in binary expression 111 101 101 (= rwxr_xr_x)
[Samsung Epic 4G Touch] TeamERA:
Thanks for the info kobridge, I still have not figured out why wifi causes a partial wake lock on ICS. But it plays much better with GB. Ive tested this also.
[Samsung Epic 4G Touch] patrao_n:
So these can be applied to gingerbread right?
[Samsung Epic 4G Touch] Pheno.menon:
Can we use this on aokp?

Transmission sent from my slim n trim Galaxy S II.
[Samsung Epic 4G Touch] RustedRoot:
Gotcha, with thanks.
[Samsung Epic 4G Touch] kobridge:
It's not been tested on aokp. If the kernel is same, then there are high chances that this tweak would run. But, all the paths on this tweak needs to be verified and tested.

If someone want to run this from AOKP, please try it with scripting tool like SManager first before putting it into init.d folder.

Unfortunately, I don't use AOKP rom yet. Only the way, I can do the test would be downloading the rom and verifying the zip file manually. But if the kernel is different, then I couldn't do that because I don't know the command difference on AOKP rom.
[Samsung Epic 4G Touch] kobridge:
To properly answer your question, we may need the kernel source to check the mechanism.

There are couple of options locking wifi (I think you already know about this, right?)

Sleep Modes: (pm.sleep_mode=)

This is supposedly for topaz/rhodium that I found on the xda wiki:

* '4' will do "wait for interrupt", no change in arm11's clock or voltage

* '3' will do "wait for interrupt and ramp clock", the arm11's clock is lowered to 20MHz instead of 300-500, and voltage is lowered too.

* '2' will do "app sleep", arm11 is still on, but put into low power mode (registers are still saved)

* '1' and '0' will totally power off the arm11 (so we have to restore registers and things ourself), don't know the differences between them

pm.sleep_mode=0 -> Power Collapse Suspend

pm.sleep_mode=1 -> Power Collapse (Provides best power savings)

pm.sleep_mode=2 -> Apps Sleep

pm.sleep_mode=3 -> Slow Clock and Wait for Interrupt

pm.sleep_mode=4 -> Wait for Interrupt

(http://xdaforums.com/showpost.php?p=17680020&postcount=9)

The similar function is also provided by settings > wifi > menu > advanced > Keep wi-fi on during sleep options. There are three options, Always, Only when plugged in, and never.

If you set up above values in somewhere, partial wake up lock would be dependent on the values you've chosen. Aslo, if there is any application which is configured to use wifi for communication, you may also need to check the application if it's causing partial wakeup lock.

It seems like there's something needs to be tested from your side. :D

FYI, I set the pm.sleep_mode value to 1 in my tweak and build.prop.

Update: I just added some more screenshots on post #2. Check out screenshot #6 and comments on that.
[Samsung Epic 4G Touch] kobridge:
Updated my thread based on your information! http://xdaforums.com/showthread.php?p=25120392#post25120392

Thanks sfhub!

Updated info :

4/29/12 sfhub improved his auto root tool to support some other kernels, those are enabling init.d through different .xc files.

Stock kernels and some repacked kernels are supporting init.d scripts through init.xc and/or install-recovery.sh but some other repacked kernels are supporting init.d scripts running through different .xc files. So, sfhub made some modification on his script. Because he's adding a new install-recovery.sh file into /system/etc folder, if there's a existing install-recovery.sh file at the same location, the existing install-recovery.sh file will be replaced by his previous version of Auto Root Tool. To prevent the replacing existing install-recovery.sh file with his same named install-recovery.sh file which supports the init.d scripts, his tool now creates a copy of old file and create a new one. Old install-recovery.sh file will be named as install-recovery-orig.sh.

If you are enabling the init.d support by running his tool, be sure that the existing install-recovery.sh file was not created by his old Auto root tool nor you manually created it following this guide. If the file is the one you created by sfhub's tool or my guide in here, be sure that you remove the old file manually before you run his new Auto Root Tool. Otherwise, the init.d scripts would run twice whenever you reboot your phone.

If you just want to simply enable init.d support without using sfhub's tool, then download the new-install-recovery.zip file from my second post and unzip it. Like I explained above, if there's any existing install-recovery.sh file and it's not related to init.d support, then rename it to install-recovery-orig.sh and move the unzipped file to same directory (/system/etc). Assign the file permission 550 (r_xr_x___). New install-recovry.sh file will execute the init.d scripts (if it's there) and old install-recovery-orig.sh (if it's there) during the boot.
[Samsung Epic 4G Touch] sfhub:
BTW the installer in Auto Root checks to see if the existing install-recovery.sh is the one that adds init.d support. If it is, it just overwrites it. Only if the existing install-recovery.sh has nothing to do with init.d support does it move it to install-recovery-orig.sh. The way it detects whether the existing install-recovery.sh is used for init.d support is the presence of the BusyboxBin string, which is the shell variable used to define the busybox location used by the script. The chances some arbitrary install-recovery.sh script defines that string is very low (but not zero)

So bottom line if Auto Root is working properly, it shouldn't be necessary to remove your existing init.d install-recovery.sh script as it will not cause a situation where init.d is run twice.

Also I forgot to mention that some people wanted to run init.d but didn't have busybox installed. I didn't want to clobber busybox for people that have installed it, so basically just had the init.d install-recovery.sh use /system/xbin/busybox-initd (which gets copied into place by the auto root installer) This makes it easier (more symmetrical) to remove init.d support and associated busybox-initd without worrying about who installed busybox to start with.

For the "new-install-recovery.zip" you should do a symlink from busybox-initd to busybox

su
cd /system/xbin
ln -s busybox busybox-initd
[Samsung Epic 4G Touch] gershee:
didn't work for me. had to Odin a kernel and reflash. not sure which script as I tried all from the OP. tomorrow I can figure it out which.

anyway to delete init.d scripts via Odin if it fails to boot? I end up odining el26, wiping, and reflashing. :/

EDIT:

oops. I used the sh script.

want me to post the included fd26 aosp kernel from aokp?
[Samsung Epic 4G Touch] kobridge:
Do you think aosp kernel works on stock rom? If it is, then I think I can make some test.

If init.d fails on boot, and boot screen is stuck on Samsung logo, then we would flash the rom again. Flashing kernel would not help because it does not delete the system partition. Once after the rom is flashed, do the nandroid recovery that you made before the init.d test.
[Samsung Epic 4G Touch] odub303:
Just curious if you are experiencing any Sleep of Death using the CPU screenstate settings you have, specifically enabling a powersave as the sleep governor with a cpu freq range of 200-500. A very common issue on the ICS builds so far is setting the max freq below 1ghz can cause Sleep of Death where the device will not wake from sleep and must be rebooted.
[Samsung Epic 4G Touch] JohnCorleone:
And I was curious if the undervolt or underclock have triggered any 4g reboots for you. A few of my friends were getting them on earlier ICS ROM and I had them delete the undervolt script and they stopped. Some people's phones just handle that stuff better than others though

Sent from my Nexus S 4G using Xparent Blue Tapatalk 2
[Samsung Epic 4G Touch] Admiral2145:
Naw.. That was battery monitor widget pro.
[Samsung Epic 4G Touch] tdunham:
Gotcha. I haven't used that in a while. Haven't had to but I guess I'll reinstall it to monitor draw now that I'm back in testing mode. Have you posted that info here yet? I'm sure KO would like to see that he's making a difference.
[Samsung Epic 4G Touch] kobridge:
First, Thanks for posting your screen!

I'm using many kind of tools to measuring the CPU and Battery stats but CPU SPY. No reason not using CPU SPY.

I mainly use three tools now - System Tuner Pro (just for monitoring and don't activate any tools thru it), Easy Battery Stat and Battery Widget Pro. Once you start to save lots of battery power, then you would start to realize that these tools are also using many portion of battery, though. :D

Edit, whoops. Better Battery Stat (free for XDA users). Not Easy Battery Stat.

Here - http://xdaforums.com/showthread.php?t=1179809

Update: yet too early to say something but so far so good with my new teaks. Actually best among my tweaks.
[Samsung Epic 4G Touch] tdunham:
Super good info. I understand what you mean. I try to keep things as lean as possible. The only reason I ever ran BBS or BWP were battery drain issues and wanting to find an offending app.

The entire point to this thread (as you stated in the OP) is to improve deep sleep, which ultimately improves battery life. Statistics become irrelevant while the phone is awake due to varying CPU usage. Of course, regulating the CPU while awake via the init.d/build.prop tweaks contributes to the overall experience as well. :D

---------- Post added at 07:21 PM ---------- Previous post was at 07:09 PM ----------

Since it looks like things are going pretty nicely and TeamERA is going to be helping out as well, has anyone considered bundling the tweaks in a flashable format? It shouldn't be that difficult to do.
[Samsung Epic 4G Touch] kobridge:
We may consider that after getting more statistics. Seems like too early to talk about making self installation package at least you guys know how to use this tweak! :)
[Samsung Epic 4G Touch] tdunham:
Actually it took me a while to figure out which init.d scripts to keep and which one's had to be disabled for yours to work with Calk's rom. It's pretty obvious to me now but getting there was a different story. :o

I agree with you. I'll just write a couple for myself. I'm getting lazy in my old age. Copying, pasting and editing permissions gets tedious after a while when you can just boot into recovery and flash the changes you need. ;)
[Samsung Epic 4G Touch] RustedRoot:
Did you see some dude posted on sfhub's FE07 thread that he's gotten 1d 15+h with 61% left? I wanted to ask if his phone was off the whole time, but didn't. I asked for pics, however cause I'm from Missouri on this one.
[Samsung Epic 4G Touch] kobridge:
It's possible based on which tweak he used. Only with Calk's tweak, it would be really hard to get that result. If you check somewhere in my thread or somewhere, you may find the almost same result like that with screenshots.

One noticeable thing is, after I released my tweaks, there are really many people started shouting about the longer battery life from here and there.

I also noticed that Agat mentioned on his thread, he got the this tweak from many places. That's right at least his tweak file but not the build.prop. No more comments and it's always good thing that seeing better battery life!:D
[Samsung Epic 4G Touch] RustedRoot:
Wow, I've never seen more than 1 3/4 days with >50% left. Best I've seen is about 1 1/2 days with an empty battery! And I'm not a heavy user. Seems to me you have to live under a cell tower, never use 4G and never talk/text to get this result.

I believe you, but you're in the 1%. How bout that, the 1%!
[Samsung Epic 4G Touch] Admiral2145:
I've done that b4 but, I have a 3800mah extended battery ;-)
[Samsung Epic 4G Touch] kobridge:
Kind of heavy usage on the day when I measured it. Don't have other graphs available now. If you see the wifi and radio signal, it's so bad for me always! That's why I started working on these tweaks to survive on the bad signal.

If you are in good signal area, you'll get at least more than mine.

Edit: the time on the graph is wrong. It's a kind of bug on Battery widget pro. Just check the # of lines. 1 line is 1 hour. So, it's about 24 hours. I'm sure I reported this in somewhere else but don't remember that. I'm using stock battery came with phone.
[Samsung Epic 4G Touch] Admiral2145:
I'm bout to flash aokp build 35...Do these scripts work with that?
[Samsung Epic 4G Touch] guirae:
ya. i second kobridge. his tweaks are amazing...been on them for the past 3 days. wow for all three..
[Samsung Epic 4G Touch] kobridge:
Just checked the PM from countryteazer and he reported back to me, this tweak works great on AOKP with Kernel FE07. He is also on AOKP build35. I put the build.prop file for AOKP rom at post #156.

He gave me a great point about my tweaks but I do not want to copy his phrasal in here without his ok. Hope he jump into this thread again and leave a feedback.

Thanks countryteazer for your pm and feedback!
[Samsung Epic 4G Touch] RustedRoot:
LOL. I'd a thought you'd get more than that from a 3 lb phone!!
[Samsung Epic 4G Touch] kobridge:
I think many of the rom MODders started realizing the battery life and adding the better tweaks on their roms. With just simple addition of couple of lines of commands on build.prop and init.d tweak files, we can easily extend the battery life so differently.

So, based on what I said, there's no secret on battery savings and how to extend the life of battery until we have customized kernels.

So far, many Modders are doing,

1. enabling deep sleep

2. underclocking CPU

But, what I think about is,

they should focus on the changes on the rom itself. Making phone faster or getting more battery life, etc... is a kind of independent area so far.

Sometimes people recognize the rom based on better battery life or better performance. But the thing we have to think about is, they can replace the part based on their requirements and needs. If user want better battery life, then they just need to buy or replace couple of parts for that.

This is just an example. So, think about that. All-in-one or Buffet?

Related post:

http://xdaforums.com/showpost.php?p=25949070&postcount=4161

http://xdaforums.com/showpost.php?p=25950208&postcount=280

http://xdaforums.com/showpost.php?p=25950504&postcount=284

http://xdaforums.com/showpost.php?p=25950736&postcount=290
[Samsung Epic 4G Touch] Admiral2145:
tweaks

i put the init.d tweaks and the phone gets stuck on the sII screen... is there a aokp init.d? im running aokp that has the sms fix and voicemail fix...
[Samsung Epic 4G Touch] kobridge:
Have you ever tried to SManager and run init.d script manually on AOKP? I hope you have a FE07 Kernel downloaded and installed for AOKP.
[Samsung Epic 4G Touch] countryteazer:
The build.prop for AOKP that kobridge posted is working very well. However, for some reason my phone wouldn't boot beyond the Samsung screen when using the unit.d scripts. After testing them one by one I realized the one causing the issue is: 31cpufreq_scaling. Everything else is working phenomenally well! Thanks again!
[Samsung Epic 4G Touch] JohnCorleone:
Kobridge, two things...first, do you have a script that only changes Max frequency to 1000 and nothing else?

Second, have you considered putting individual scripts together from that thread that has all of the info to write them?

Sent from my SPH-D710 using Xparent Blue Tapatalk 2
[Samsung Epic 4G Touch] kobridge:
Thanks countryteazer! I also maxed out my thanks for today.

Let me double check the 31 tweak again and post the result. I'm not sure why it's not working on AOKP but there should be a reason.

One problem that I have is, I don't have the ability to test the AOKP rom. Let me test it based on Stock.
[Samsung Epic 4G Touch] beserker15:
Caulk's original 31 tweak does the same thing on AOKP, so if yours is a modified version of that, unfortunately the same fate would occur. Sad too because I generally use Caulk's script to overclock the gpu while underclocking the cpu =(
[Samsung Epic 4G Touch] kobridge:
This is one of the reason why I need to look the actual AOKP rom. There's no reason that this tweak or Calk's tweak wouldn't work. Based on what you said, I think you know how to check the tweaks and the values. Have you ever tried to follow the steps and check the values?

Only the way that I could check this would be flashing the AOKP but it's too many for me. :(

If the 31 tweak does not work, then battery savings would not be that big comparing with the roms where 31 enabled. Hmmmmm....
[Samsung Epic 4G Touch] Admiral2145:
gb roms

do these scripts work on gb roms?
[Samsung Epic 4G Touch] kobridge:
I tried it before on GB Blazer Rom but I'm not sure about Stock GB.

There are couple of differences between GB and ICS in CPU perspective (CPU governors).

You can try it on GB rom but would not get huge enhancement because GB rom is already taking many advantages. If you want to use GB, then use the conservative governor which is not provided on ICS yet. Then you may get the almost same result with tweaks that I'm using.

(unfortunately I don't have any tweaks customized for GB rom, but it would work on GB and may get the better result comparing with stock)
[Samsung Epic 4G Touch] JohnCorleone:
Still nothing in inbox kobridge. I will keep checking

Edit.. Kobridge, PM me again. I still didn't get anything

Sent from my SPH-D710 using Xparent Blue Tapatalk 2
[Samsung Epic 4G Touch] kobridge:
Ya, it seems like I lost my previous pm to you. I re-wrote and sent again just before.

Edit, it would be a lot shorter than my original because you are close to the morning now...
[Samsung Epic 4G Touch] edlee:
sorry for the noob question.

I am running calk's 2 v1.5 battery saver rom.

Can I just copy your init.d script files to the same folder where calk's scripts are, and they can both run at the same time. Or is it better if I delete those scripts or change the permission so they dont run at startup?
[Samsung Epic 4G Touch] tdunham:
Calk's 2 & 3 scripts need to be moved or disabled via permissions. They are being replaced by Kobridge's 21 & 31 script.

For Kobridge's init.d scripts, yes just copy them over and change their permissions to match the original scripts.
[Samsung Epic 4G Touch] kobridge:
Last screenshots from FE07

Can't wait any longer...

I think this would be my last screenshots from FE07. Planning to flash AOKP Build35 to see how it works.

Pray for me :D

By the way, I think I must remove go-weather app. I works great but worst app that I've ever seen for Battery life.
[Samsung Epic 4G Touch] RustedRoot:
Kobridge, something is amiss for me. Here are screenshots for phone sitting idle overnight. Awake and wifi times should be de minimis among other things that you'll catch. Obviously something started to really drain in middle of this period. Haven't seen anything like this in a long time, but...I just reflashed Agat's FE07 yesterday afternoon... I don't think that's the issue.

Running 2b2 scripts
[Samsung Epic 4G Touch] kobridge:
Can you post the wakeup lock screen also?

As you can see on your screenshots, there's something preventing deep sleep. It was awaken for more than 3hours and wifi was on during that time. Was something running.
[Samsung Epic 4G Touch] im0rtalz:
You didn't use your phone for 20 hrs?
[Samsung Epic 4G Touch] RustedRoot:
Nothing was supposed to be running that I can see, unless it was buried in the list. Is wakeup lock screen 'Partial Wakelock' or... using BetterBattery? Since I had to plug phone into PC to upload screenshots, I've lost 'since unplugged' data. 'Since charged' is available but I understand its accuracy is questionable. Let me know what I can retrieve.
[Samsung Epic 4G Touch] kobridge:
Used 20 minutes over lots of times - check emails, sent/received SNS, took snapshoots, etc...

That is most important thing along with alarm. You need to check what was running and made your phone awake for 3-4 hours.
[Samsung Epic 4G Touch] im0rtalz:
Yeah I noticed, but I'm a bit more surprised at how the battery was still draining so much for that much deep sleep. Is FE07 not as good as other builds when it come's to battery. I think if you can get this much deep sleep, your aokp battery just might be even better than this.
[Samsung Epic 4G Touch] RustedRoot:
OK, duly noted for next round. I assume you're working on FE10 scripts. I'm going to do a clean install -- again -- before flashing ROM. Haven't decided to wait for Agat or go with sfhub when he has repacked ready.

My reading of Agat and sfhub's FE07 threads is that most folks are having excellent battery life on this leak. Woe is me. (jk)
[Samsung Epic 4G Touch] kobridge:
That's what I'm trying to do now. First time to try flashing AOKP.
[Samsung Epic 4G Touch] im0rtalz:
I'll try to post cm9 for comparison then, this was taken right in morning when alarm rang on the phone. Typically lose 1% to 2 % over night on wifi. I'll try to post another picture since I been on 3g for about 5 hours more now so idle is not as good as wifi.
[Samsung Epic 4G Touch] kobridge:
I think you are missing something in here. I'm not hosting this thread to compare the battery life between the different roms nor compete each other. I'm hosting this thread to extend the battery life based on my experience on the same rom or kernel. So, my focus is, how I can extend my battery life under the same rom and kernel. The reason why I'm jumping into is, there were some users having issue on AOKP rom and I wanted to find out and how I can fix that.

Personally, I prefer to stay with rooted stock rom.
[Samsung Epic 4G Touch] im0rtalz:
Point taken, but I do have a couple questions. I wont be posting any more then, but is stock different in that it does not break down wifi into the battery usage?
[Samsung Epic 4G Touch] kobridge:
I've not seen the wifi usage is break down from stock.
[Samsung Epic 4G Touch] RustedRoot:
Kobridge, just PM'd you.
[Samsung Epic 4G Touch] kobridge:
Just replied back to you. Hope you understand and we are on the same page.
[Samsung Epic 4G Touch] kobridge:
I stopped working the tweaks on AOKP. Sorry for any users using AOKP.

Actually it requires me terrible amount of time, my phone is almost useless because of flashing, testing.... I'm feeling like my phone is no longer a phone, it's a just test device. Most importantly I'm not going to spend my time to work on the tweaks for AOKP anymore and I added this information at TOP thread. AOKP or any other rom users, please use your ROM's Dev section for any request or questions about your roms. Your questions or request would not be answered in this thread.
[Samsung Epic 4G Touch] countryteazer:
Oh wellz, thanks for trying kobridge! I'm more than likely gonna hop on the next MIUI anyway, assuming they've got 4G figured out.
[Samsung Epic 4G Touch] kobridge:
Tweaked-FE10-build.prop.zip - Check OP. This is a tweaked Stock FE10 build.prop. This file would not work on other Roms but stock. Directly under /system folder and permission set to 644. Other init.d tweaks don't need to be changed.
[Samsung Epic 4G Touch] daniel4653:
Sweet so just need to push build prop now. No init.d files ?