[Tweak][V2.4] Extend your Battery Life - init.d, build.prop and everything

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
The second version tweak coming soon...
Mainly on 41tweaks and build.prop file.

Edit: created issue log section in post #2. It seems like there's some wifi issue. I'm not sure it's Kernel related or this tweak related. Checking it now.

Update: Tested with Wifi Fixer but wifi still do not want to sleep. Now I'm heading to drug store to buy 'phenobarbital'(sleeping-aid). Still checking...
Update2: Finished testing wifi sleep mode. Actually there's nothing like that and wifi never sleep after it's turned on. Wifi could be disconnected by some app or any wifi configuration but it never go to sleep by check wifi 'never' option nor by setting the pm.sleep_mode. I added this info into the op and second post.

I'm not sure this would be the only stock rom/kernel issue but at least it's not working on ICS Stock/kernel.
 
  • Like
Reactions: TeamERA

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
All three scripts seem to get me stuck on the SGS2 screen on AOKP m5. I have to odin el26 kernel and then use recovery to remove the scripts. Anyway to troubleshoot? /etc/init.d/ works because I made a test script to echo output to a file in /data/local/tmp

Any way for me to troubleshoot?
how'd you removes the init.d files via adb? I kept getting permission denied.. :/
what was I doing wrong?
 

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
have a quick question..
if there is a build.prop setting in 2 different locations with 2 different values in the build.prop, which value would stick? first or last?
which one? The second one will be active. Let me know which one has two. Actually, it had two versions and seems like you are using first version. If I found the same thing on the second one, let me edit & post it for you. Incorrect edit would be a reason of stuck on boot screen.

how'd you removes the init.d files via adb? I kept getting permission denied.. :/
what was I doing wrong?
Are you testing it thru SManager? then you need to assign su permission to run the scripts. To remove, simply use root explorer or es file explorer.
 

rmikulus

Senior Member
Oct 3, 2010
64
17
0
St. Louis, MO
soundcloud.com
I ran this on AOKP, although I already have a lot of init.d and build.prop tweaks set, so I'm not sure of the impact. Was able to run fine though.

---------- Post added at 09:52 AM ---------- Previous post was at 09:51 AM ----------

My buddy with an Evo 4G was wondering if this would work on other phones, or if the script settings are specific to our device.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
which one? The second one will be active. Let me know which one has two. Actually, it had two versions and seems like you are using first version. If I found the same thing on the second one, let me edit & post it for you. Incorrect edit would be a reason of stuck on boot screen.



Are you testing it thru SManager? then you need to assign su permission to run the scripts. To remove, simply use root explorer or es file explorer.
I meant in general. I have a list of build.prop tweaks and I just toss em any build.prop I'm using. wanted to make sure. I put them at the end not beginning right? I'm not checking for duplicate entries.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
which one? The second one will be active. Let me know which one has two. Actually, it had two versions and seems like you are using first version. If I found the same thing on the second one, let me edit & post it for you. Incorrect edit would be a reason of stuck on boot screen.



Are you testing it thru SManager? then you need to assign su permission to run the scripts. To remove, simply use root explorer or es file explorer.
I meant if you can't boot up. in recovery. how do you remove the init.d scripts via adb? I was doing something wrong. I opened an adb shell. went to /system/etc/init.d/ and tried to remove the scripts but I didn't have permission? :what:

rephrased:
last time I tried these scripts on aokp one or more of them broke boot for me. stuck at sgsii.
I want to try again but how can I remove a script via recovery using adb?

and kobridge, a suggestion.. why not have the build.prop tweaks just as a standalone without the erroneous settings? that way people just drop the tweak settings in the end of their current build.prop.... less hassle..
 
Last edited:

sfhub

Senior Member
Oct 23, 2008
5,342
7,217
0
rephrased:
last time I tried these scripts on aokp one or more of them broke boot for me. stuck at sgsii.
I want to try again but how can I remove a script via recovery using adb?
You need a recovery that has insecure adb (ie you get a # sign immediately when you open adb shell). All the rogue custom recoveries have insecure adb. You could flash rogue cwm, make your fixes, then flash back your existing kernel.
 
  • Like
Reactions: gershee

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
I meant if you can't boot up. in recovery. how do you remove the init.d scripts via adb? I was doing something wrong. I opened an adb shell. went to /system/etc/init.d/ and tried to remove the scripts but I didn't have permission? :what:

rephrased:
last time I tried these scripts on aokp one or more of them broke boot for me. stuck at sgsii.
I want to try again but how can I remove a script via recovery using adb?

and kobridge, a suggestion.. why not have the build.prop tweaks just as a standalone without the erroneous settings? that way people just drop the tweak settings in the end of their current build.prop.... less hassle..
If you are tyring to on AOKP, don't take the whole portion of tweaks or build.prop. Definitely, you will need to edit something. Because these tweaks and build.prop are created based on Stock rom/kernel, these are not going to work. Some people already reported that they experienced same stuck on boot screen, we need to find out what that is first.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
If you are tyring to on AOKP, don't take the whole portion of tweaks or build.prop. Definitely, you will need to edit something. Because these tweaks and build.prop are created based on Stock rom/kernel, these are not going to work. Some people already reported that they experienced same stuck on boot screen, we need to find out what that is first.
exactly what I intend to do.
 

guirae

Senior Member
Mar 30, 2011
271
35
0
San Francisco
I record my lectures via the stock TW app. After applying the scripts last night and recording and hour of a lecture, my battery drained about 20%. Is this expected in the context of applying this script and wakelock behavior? I'm just confused because prior to the scripts I would only lose ~10% in an hour of recording.

Sent from my SGH-T989 using XDA
 

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
I record my lectures via the stock TW app. After applying the scripts last night and recording and hour of a lecture, my battery drained about 20%. Is this expected in the context of applying this script and wakelock behavior? I'm just confused because prior to the scripts I would only lose ~10% in an hour of recording.

Sent from my SGH-T989 using XDA
Could be related. Did you replace the build.prop tweak in here?
In build.prop tweak, there's some options that maximizing your camera's capability. This function will maximize the performance but will cause more battery drain.

Try again with original build.prop and see how the battery drain looks like.
 

guirae

Senior Member
Mar 30, 2011
271
35
0
San Francisco
so I have the init.d in system/etc. I ran SManager and have all 4 files on su and boot. I ran it. Did I do anything wrong? I don't get that the whole 0test file. Although I have it inside init.d, it hasnt done anything..

Sent from my SGH-T989 using XDA
 

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
so I have the init.d in system/etc. I ran SManager and have all 4 files on su and boot. I ran it. Did I do anything wrong? I don't get that the whole 0test file. Although I have it inside init.d, it hasnt done anything..

Sent from my SGH-T989 using XDA
1. In here, I did not include the 0test file. I think you are referring to another thread that I created. Anyway, 0test file is to test the init.d functionality on boot.
2. There are 4 tweak files are included in all_in_here.zip file. Three files should be for init.d and build.prop for under /system folder.
21 & 31 tweaks are doing nothing for media processing. It's only touching the CPU governor (CPU speed control). 41 file has just few video (media) related tweaks on it - hardware video accelerate & jpeg (camera) quality. There is nothing that causing battery drain on this tweak. That's why I told you that replace the build.prop with original one and see what happens.

How do I know if the scripts are running

Sent from my SPH-D710 using xda premium
This one - http://forum.xda-developers.com/showthread.php?t=1610741 Check out 'How to test'
 
Last edited:

guirae

Senior Member
Mar 30, 2011
271
35
0
San Francisco
1. In here, I did not include the 0test file. I think you are referring to another thread that I created. Anyway, 0test file is to test the init.d functionality on boot.
2. There are 4 tweak files are included in all_in_here.zip file. Three files should be for init.d and build.prop for under /system folder.
21 & 31 tweaks are doing nothing for media processing. It's only touching the CPU governor (CPU speed control). 41 file has just few video (media) related tweaks on it - hardware video accelerate & jpeg (camera) quality. There is nothing that causing battery drain on this tweak. That's why I told you that replace the build.prop with original one and see what happens.

Just want to be clear. In essence, for this tweak to perform, I need for the files to be under system/etc/init.d, click su and boot, then click run for all 4 of those files inside init.d correct? this will cause the tweaks to happen?

If this is so, im confused about how to check if they are going to be working on every boot. is it purely just seeing SManager being given permissions via su on boot? I dont understand the "How to test" part, especially when it says:

Running the init.d script from init.rc is,

(FD02)
# Run init.d scripts
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
class main
user root
group shell
oneshot

(before FD02)
# Run init.d scripts
service sysinit /system/bin/logwrapper /sbin/run-parts /system/etc/init.d
class main
user root
group shell
oneshot



Also i don't understand how to create the 0test file. it exists in system/etc/init.d but what now...

Thanks for everything!
 

kobridge

Senior Member
Jan 10, 2012
1,710
3,459
0
Jacksonville, FL
1. In here, I did not include the 0test file. I think you are referring to another thread that I created. Anyway, 0test file is to test the init.d functionality on boot.
2. There are 4 tweak files are included in all_in_here.zip file. Three files should be for init.d and build.prop for under /system folder.
21 & 31 tweaks are doing nothing for media processing. It's only touching the CPU governor (CPU speed control). 41 file has just few video (media) related tweaks on it - hardware video accelerate & jpeg (camera) quality. There is nothing that causing battery drain on this tweak. That's why I told you that replace the build.prop with original one and see what happens.

Just want to be clear. In essence, for this tweak to perform, I need for the files to be under system/etc/init.d, click su and boot, then click run for all 4 of those files inside init.d correct? this will cause the tweaks to happen?

If this is so, im confused about how to check if they are going to be working on every boot. is it purely just seeing SManager being given permissions via su on boot? I dont understand the "How to test" part, especially when it says:

Running the init.d script from init.rc is,

(FD02)
# Run init.d scripts
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
class main
user root
group shell
oneshot

(before FD02)
# Run init.d scripts
service sysinit /system/bin/logwrapper /sbin/run-parts /system/etc/init.d
class main
user root
group shell
oneshot



Also i don't understand how to create the 0test file. it exists in system/etc/init.d but what now...

Thanks for everything!
Actually you are giving me a hard time. :D

To run the init.d script, there're several things that you need to know. That's why I spent lots of time to explain every thing. If you don't understand what you need and how it works, then you need some more time until you understand what you're doing and what is required to do so. I'm sorry to say that but please research before you ask something.

I really want to help you and I'm really willing to. But there's some portion that you have to finish your homework at first.

Let me give you a homework (I'm not trying to offensive but trying to help you in here. I was just like you in 5 months ago).

1. what's the init.d script and how it works?
2. If you are using Script Manger, you need to understand how it works, and how this app make it possible to run the init.d script during the boot. Do you think, you can figure it out? What's the difference running the scripts during the boot or running the app after the boot?
 
Last edited: