Collin_ph Battery Tweak for Darch Froyo Roms - Hero CDMA Android Development

LAST UPDATE to this thread.
RC1 of Collin_ph battery tweak has been released.
Due to several changes, etc.. I'm starting a new thread here: http://forum.xda-developers.com/showthread.php?t=762283
Newest!
UPDATE - Beta 10 released 08/16/2010
Sorry about 2 updates really quick-- this latest release was to address 2 bugs that cropped up.
Description: Battery tweak is a collection of settings that enable the hero to optimize battery lifetime. I get 35+ hours on my hero with the tweak installed with the normal 691mhz settings. When on battery power, the cpu is gradually lowered (configurable) as the battery drains, and when put on power, the cpu is put into high performance mode. Most settings are configurable.
Beta 6 includes an optional LED fix if your charging LED is hanging, and some optional performance tweaks to the cfs scheduler. For more information see the documentation linked below.
Simply download the tweak and flash.
Reboot and under adb shell run batt-cfg
Note: Make sure you are root first by running su if you are going to run batt-cfg through terminal.
You may change the settings at any time by running batt-cfg again and settings will take effect without rebooting.
New verison as of 08/16
http://www.primoweb.com/froyo/collin_ph_battery_tweak_v3_beta10.zip
Documentation (Updated for Beta 10):
http://www.primoweb.com/froyo/battery_tweak_v3.html
This tweak will conflict with setCPU and OCWidget, so please disable them.
Can I say it again. Don't use set CPU, or OCWidget. You don't need them with this tweak. If you want to customize your CPU, simply run the customize utility in batt-cfg -- you can set your min/max clock speeds there. Thanks!
Feature list:
Customizable Battery Tweak with 2 presets
LED Fix for charging LEDs that are stuck on
Experimental CFS (completely fair scheduler) performance tweaks
Audio quality fix for froyo (disables stagefright)
Disk tweaks (mounts all mount points noatime,nodiratime)
Probably more I'm missing.
Edit:
If you want to try this tweak in another rom, your rom will need a /system/etc/init.local.rc file-- that's where the service is started.
Additionally, it won't do much good unless it's on a clockable kernel.
There are other prerequisites such as sh existing in /system/bin but generally speaking if it starts up, it should work. If your rom has no /system/etc/init.local.rc, you can add the file and "import" it (I believe), within the init.rc of the boot image, but it'll require a little work.

collin_ph said:
Description: Battery tweak is a collection of settings that enable the hero to optimize battery lifetime. I get 35+ hours on my hero with the tweak installed with the normal 748mhz settings. When on battery power, the cpu is gradually lowered (configurable) as the battery drains, and when put on power, the cpu is put into high performance mode. Most settings are configurable.
Simply download the tweak and flash.
Reboot and under adb shell run batt-cfg
You may change the settings at any time by running batt-cfg again and settings will take effect without rebooting.
http://www.primoweb.com/froyo/collin_ph_battery_tweak_v3_beta4.zip
Documentation:
http://www.primoweb.com/froyo/battery_tweak_v3.html
Note: I don't recommend setting the "charging" minimum speed any higher than 480mhz, as it may not charge when connected by USB (not charger).
This tweak will conflict with setCPU and OCWidget, so please disable them.
Click to expand...
Click to collapse
is there a way to get this tweak to work on a 2.1 sense rom

Papa Smurf151 said:
is there a way to get this tweak to work on a 2.1 sense rom
Click to expand...
Click to collapse
It should work with any .29 kernel that's has the same structuring as toasts/darchs, so theoreticaly, it'll work with any ROM really.

Can this be done if I'm using the darch overclock undervolt kernel for Fresh 2. 3. 3? The reason I'm asking is because my battery life is already good with darch's kernel but if I can flash this on top of what I'm using that would be great.
Sent from my HERO200 using XDA App

aerajan said:
Can this be done if I'm using the darch overclock undervolt kernel for Fresh 2. 3. 3? The reason I'm asking is because my battery life is already good with darch's kernel but if I can flash this on top of what I'm using that would be great.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
Only way to find out, try it.

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.

aerajan said:
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.
Click to expand...
Click to collapse
Go into shell and type "batt-cfg"

i have tested on my red dawn rom and it is working. Thanks for the tweak man

Thank you for this tweak. I have been using it for a few days and getting 30+ hrs. Awesome work
Sent from my HERO200 using XDA App

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.

Thanks! Configured mine to use the 748mhz setting.

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
$
Sent from my Hero CDMA using XDA App

Is there a difference between this and setting profiles in SetCPU for different battery levels?

platinumrug said:
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.
Click to expand...
Click to collapse
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)

xxproblemzxx said:
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
$
Sent from my Hero CDMA using XDA App
Click to expand...
Click to collapse
Type su in the terminal first to make it root.
Sent from my CDMA Hero running CM6 using the XDA application.

duffkitty said:
Type su in the terminal first to make it root.
Sent from my CDMA Hero running CM6 using the XDA application.
Click to expand...
Click to collapse
Ah lol totally 4got. Thanks man
Sent from my Hero CDMA using XDA App

Testing.... will post results tomorrow

black7 said:
Is there a difference between this and setting profiles in SetCPU for different battery levels?
Click to expand...
Click to collapse
I was wondering the same thing

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.

atoz350 said:
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.
Click to expand...
Click to collapse
Did you have it OC'd before?

Related

[HOWTO] Enable JIT automatically

[HOW TO] activate JIT on 2.2
PEOPLE. NO OFF TOPIC HERE!
if you dont know what JIT is it basically speeds up your phone, very recommended! more info ---> http://en.wikipedia.org/wiki/Just-in-time_compilation
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi all! i know some of you want to test JIT complier... so i did a little research and found greek forum ---> http://www.myphone.gr/forum/showthread.php?t=286161
there our friend kyrillos13 has posted a way to activate JIT. so heres guide in english how to do it:
Activation Wizard of JIT
You need to install the root explorer (find it by searching on google). After the installation will take you to leave a message superuser. Press allowed. Download the file from here http://www.multiupload.com/9HK3NP4MML Unzip and copy the system folder on your memory card. With root explorer access the bin folder, select all the files and copy them to the path / system / bin / on your mobile. Upon return to the system folder that you copied to your phone and open the folder lib. Select all the files and then copy the path / system / lib / on your mobile. Then execute the commands listed in the file folder JIT instructions to download either via the adb pc or terminal emulator through the phone. Stir in and reboot. Download from the MARKET linpack do the install and run. If you pull MFLOPS 7 + (maybe even 11+) your ok. The linpack is optional. The jit will work anyway. just if you have doubts about whether you did it right then test it with the linpack (from market)...
the commands:
(adb shell) write this IF using ADB,
su
chmod 755 /system/bin/dalvikvm
chmod 755 /system/bin/dexopt
chmod 755 /system/bin/logcat
---------------------------------------------------
automatic batch script is the best way!!
-tested on: kyrillos 3.3 and 3.0, lestatious 1.7 with fugumod 2.2 BE, odexed JPM rom+fugumod 2.2, normal JPM, normal JPF, normal JP3.
-how to enable JIT on 2.1 ---> http://forum.xda-developers.com/showpost.php?p=9701019&postcount=2457 by rulez81
-automatic batch script: http://forum.xda-developers.com/attachment.php?attachmentid=563441&d=1302230974 by moole
all credits to ARMV-DEV-TEAM!
Sent from my GT-I5800 using XDA App
Here's a packaged version of ARMV Team's files designed to enable JIT.
The zip contains a batch script which automatically pushes the files to your phone, chmods the relevant ones and then reboots your phone.
has haree changed the topic?? cuz i didnt write it like that...
Sent from my GT-I5800 using XDA App
Which task has the build.prop in /System/ ?
Everywhere you can read that you have enable Jit in this file,
but I can't see any difference if I write : dalvik.vm.execution-mode=int:jit
or if I erase this.
If I change the the heapsize, I can't see any differences too.
Can anybody tell me something about the build.prop ?
moole said:
Here's a packaged version of ARMV Team's files designed to enable JIT.
The zip contains a batch script which automatically pushes the files to your phone, chmods the relevant ones and then reboots your phone.
Click to expand...
Click to collapse
Did u tried this? impressions?
GOOD JOB
Tried JASUX links, 8,3MFLOPs instead of 2,8 - good improvement.
Using Lestat 1.7, Fugumod 2.2 no OC
Quadrant improved from 320 to 380.
Copy/Paste with Root Explorer, CHMOD with ADB.
I hope the war about "who own`s the Linux" is over now.
Anyone tried ARMV batch? Scores?
Thanx to all dev`s
Urmas1 said:
Tried JASUX links, 8,3MFLOPs instead of 2,8 - good improvement.
Using Lestat 1.7, Fugumod 2.2 no OC
Quadrant improved from 320 to 380.
Copy/Paste with Root Explorer, CHMOD with ADB.
I hope the war about "who own`s the Linux" is over now.
Anyone tried ARMV batch? Scores?
Thanx to all dev`s
Click to expand...
Click to collapse
the war is over! but what filesystem you use?
Sent from my GT-I5800 using XDA App
vonuzu said:
Did u tried this? impressions?
Click to expand...
Click to collapse
well he wouldnt post it if it wouldnt work...
Sent from my GT-I5800 using XDA App
hi friends,
I tried enabling JIT but after reboot it is stuck at bootanimation screen. it has been more that 10 mins ..shud i wait or shud i switch off and restart ?
jazux said:
has haree changed the topic?? cuz i didnt write it like that...
Sent from my GT-I5800 using XDA App
Click to expand...
Click to collapse
hi
no i did not just closed ur old thread and merged another thread related to this one deleted un wanted post here one thats all did not do any change at all
jazux said:
the war is over! but what filesystem you use?
Sent from my GT-I5800 using XDA App
Click to expand...
Click to collapse
system - ex4
data - ext4
cache - ext2
p_san_p said:
hi friends,
I tried enabling JIT but after reboot it is stuck at bootanimation screen. it has been more that 10 mins ..shud i wait or shud i switch off and restart ?
Click to expand...
Click to collapse
What build you use?
Edit: Jazux, I think you have to be more specific in first post about system demands for JIT - deodexed, rooted, base FW etc...
Urmas1 said:
Edit: Jazux, I think you have to be more specific in first post about system demands for JIT - deodexed, rooted, base FW etc...
Click to expand...
Click to collapse
Jazux it's not the dev of the mod and probably doesn't know...
I think the jit is based on a JPM release, anyway if you don't wanna brick your phones (well, softbrick!) wait for apocalypse, this is experimental as everything in this forum
Re
I tried but i got this msg...
Phone reboots and nothing
Mr.Gamer said:
Jazux it's not the dev of the mod and probably doesn't know...
I think the jit is based on a JPM release, anyway if you don't wanna brick your phones (well, softbrick!) wait for apocalypse, this is experimental as everything in this forum
Click to expand...
Click to collapse
Well, I was struggling to get JIT for three days before it came up here.
All I learned about JIT is that you have to have DEODEXED ROM and be ROOTED. This package of JIF is specific to our phones but do you have to be on JPM - I`m not sure. This may even work for Eclair. Until not tested can`t say. I`m not going to test it on Eclair or any other version and who does have Eclair anyway nowadays
If I`m wrong please correct me.
zavisa said:
I tried but i got this msg...
Phone reboots and nothing
Click to expand...
Click to collapse
You should mount your system writeable...
Code:
$ su
# mount -o remount,rw /system
zavisa said:
I tried but i got this msg...
Phone reboots and nothing
Click to expand...
Click to collapse
Is your phone rooted?
Damn, I was close to making it myself, would have probably posted it later today But anyways, great news. Now I don't have to do the work
P.S. same issue as zavisa. though on JPM, problem was probably that it wasnt deodoxed. will flash indroid now and try again
s3th.g3ck9 said:
You should mount your system writeable...
Code:
$ su
# mount -o remount,rw /system
Click to expand...
Click to collapse
or use Root Explorer to mount system before starting "enable_jit.cmd"
stubborn_d0nkey said:
Damn, I was close to making it myself, would have probably posted it later today But anyways, great news. Now I don't have to do the work
P.S. same issue as zavisa. though on JPM, problem was probably that it wasnt deodoxed. will flash indroid now and try again
Click to expand...
Click to collapse
guys do not push the file with ADB use ROOT EX transfer the files in corect place than open CMD type the comm and ENJOY

[Script] Darkness in the dark hours

hi everyone
I present to you:
Darkness in the dark hours​
this is a pack of:
- a script I made
- Gscript lite
- Screen filter(optional, but recommended)
I strongly recommend to you to read the whole post and only then apply my script!
A lot of users tried to find a way to do this, so I polished my script I used for Eternity to make it universal(hopefully )
this script made to work with rooted 2.1+ firmwares and busybox properly installed.
1. Install Gscript lite
2. To make this script revertable on the newer brand of kernels, you will need to add one line to hw_config.sh (because I just don't trust init.d scripts)
run this from adb or any terminal emulator from phone as superuser
Code:
echo "\n\n\nrm /data/noled_tmp_reverse.prop" >> /system/etc/hw_config.sh
3. in Gscript choose Add a script and name it whatever you want(e.g. NOLed) and paste these lines in it
Code:
#! /system/bin/busybox sh
# "turn off keyboard and notification LEDs" for ANY android firmware
# this script needs su access
# made by Adolf1994
# thanks for the help diimaan
# maybe final version - revertable
# requires hw_config.sh modification to be properly revertable
DIR=$(cd /sys && find | grep brightness | cut -c 3- | cut -d : -f 1 | head -n 1)
LED=/sys/$DIR
LED1=$LED:rgb1:red/brightness
LED2=$LED:rgb1:green/brightness
LED3=$LED:rgb1:blue/brightness
LED4=$LED:sled/brightness
if [ -s /data/noled_tmp_reverse.prop ]; then
chmod 00644 $LED1
chmod 00644 $LED2
chmod 00644 $LED3
chmod 00644 $LED4
rm /data/noled_tmp_reverse.prop
else
echo 0 > $LED1
echo 0 > $LED2
echo 0 > $LED3
echo 0 > $LED4
chmod 00444 $LED1
chmod 00444 $LED2
chmod 00444 $LED3
chmod 00444 $LED4
echo 1 > /data/noled_tmp_reverse.prop
fi
exit
4. tap on "Needs SU" then save
5. run the script and enjoy surfing at night without the annoying hw leds
(most likely you WILL get stderrs on 2.2+, but it's normal)
Note: if you get EMPTY stderrs, that's no problem. BUT if something is shown next to the stderr, like permission denied, then please report
optional. install Screen filter from market: https://market.android.com/details?id=com.haxor&feature=search_result
This is only for 2.1 and/or 2.2. On 2.3 I experienced a problem that's I couldn't press install in package installer activity. I nearly reinstalled the whole thing. You've been warned!
Night is over? Just run the script again and wait till the LEDs light up.
If You Don't Like LEDs At All, This Pretty Line Will Disable Them At Startup
http://forum.xda-developers.com/showpost.php?p=17514012&postcount=27
Q: Why modifying hw_config.sh?
A: Because if you reboot your phone while the leds are off, there will remain a file that normally indicates how the script should act upon running it. That one particular file should not present after boot.
Q: I'm on Wolfbreak's ROM. Won't that mess tweaks up?
A: In no way. Impossible. Unless you didn't follow steps properly.
hope you like it
and don't forget to press thanks button
can I use script manager to run this at boot?
I think it'd be fine
the script didnt work for me i went to my dolphin browser copied text pasted it saved i run it it showed up stderr twice that's it?
shahkam said:
the script didnt work for me i went to my dolphin browser copied text pasted it saved i run it it showed up stderr twice that's it?
Click to expand...
Click to collapse
i cant paste the text corectly ffs i think thats the problem can you upload the script as ".sh" so i can load it whit gscript?
shahkam said:
the script didnt work for me i went to my dolphin browser copied text pasted it saved i run it it showed up stderr twice that's it?
Click to expand...
Click to collapse
from gscript I get a bunch of stderrs, too. however, from a terminal emulator it runs fine, so no problem.
It's the most noticeable if the phone is on the charger, because you will see that the led suddenly switches off.
you can revert the script back with a simple reboot.
Sorry for being a noob, but what does this do? :$
It disables the l.e.d.s. It should be made a little clearer in op.
Is there a script to turn them back on?
Sent from my X10a using XDA App
AyDee said:
It disables the l.e.d.s. It should be made a little clearer in op.
Is there a script to turn them back on?
Sent from my X10a using XDA App
Click to expand...
Click to collapse
sorry if I wasn't clear. I'll fix it soon
and change it to revertable, too
Adolf any clue why it didnt work.for me and i kept having stderr thingy
Sent from my X10i using XDA Premium App
shahkam said:
Adolf any clue why it didnt work.for me and i kept having stderr thingy
Sent from my X10i using XDA Premium App
Click to expand...
Click to collapse
since they are empty it's ok
Huh? I think i wasnt clear i used your script and when i ran it whit gscript i got twice stderr message twice one under the other like this
Stderr
Stderr any clue why?
Sent from my X10i using XDA Premium App
shahkam said:
Huh? I think i wasnt clear i used your script and when i ran it whit gscript i got twice stderr message twice one under the other like this
Stderr
Stderr any clue why?
Sent from my X10i using XDA Premium App
Click to expand...
Click to collapse
for this script only gscript gives empty stderrs. if I run it with a terminal emulator/adb there's no stderr.
it's a problem of gscript
@Adolf or @My_Immortal
any new experiments with sd card mounting?
There was some interesting posts by one shaun in link2sd thread! he's using x10! somehow he managed to find more free space in /system than in /data!
so no need of an extra partition, you can just run the script to mount the /system as rw on boot and then link the link2sd mount point to it! I sent a PM to him about how is it working! let's see...
Ohhh but i tried terminal too pasted the script and nothing happened?
Sent from my X10i using XDA Premium App
I use this script most nights now, thanks Adulf! perhaps a mod to the script could be to set an expiry time value? (or is this not possible!)
diimaan said:
@Adolf or @My_Immortal
any new experiments with sd card mounting?
There was some interesting posts by one shaun in link2sd thread! he's using x10! somehow he managed to find more free space in /system than in /data!
so no need of an extra partition, you can just run the script to mount the /system as rw on boot and then link the link2sd mount point to it! I sent a PM to him about how is it working! let's see...
Click to expand...
Click to collapse
There are currently 190 MB free in my system partition, 219 MB in data and 11 GB in my sdcard, so I really want to use Links2SD on an ext partition in my SD, rather than anywhere else!
But it's nice that there's progress!!
My_Immortal said:
There are currently 190 MB free in my system partition, 219 MB in data and 11 GB in my sdcard, so I really want to use Links2SD on an ext partition in my SD, rather than anywhere else!
But it's nice that there's progress!!
Click to expand...
Click to collapse
190 mb? that's far less you should clean up some junk in your system then!
btw this is the msg I got from shaun! you can check how it works!
http://forum.xda-developers.com/show...&postcount=834
Should explain how to do it, just need to add commands to a start up script that is editable on your phone, that runs before the GUI is started. Dunno how I would create a universal script as you will need to edit diff files on diff phones.
If there is anything you don't understand from my post I'll try and help.
Click to expand...
Click to collapse
Brilliant this is exactly what i wanted, thanks Adolf !!
[email protected] said:
I use this script most nights now, thanks Adulf! perhaps a mod to the script could be to set an expiry time value? (or is this not possible!)
Click to expand...
Click to collapse
Adulf... hehh, funny
yyeeeeaaaaaaahhhh...no
that'd be a bit complicated.
but this is why it's revertable

[GOVERNOR][2.6.39.4] Hotplug for Nvidia Tegra

Hello again xda, today I want to present something tiny, but nontheless important (in my view) for our old TF101 ...
The first working HOTPLUG governor for this device!
Q: What the hell is 'hotplug' ?
Hotplug Governor:
The “hotplug” governor scales CPU frequency based on load, similar to
“ondemand”. It scales up to the highest frequency when “up_threshold”
is crossed and scales down one frequency at a time when “down_threshold”
is crossed. Unlike those governors, target frequencies are determined
by directly accessing the CPUfreq frequency table, instead of taking
some percentage of maximum available frequency.
The key difference in the “hotplug” governor is that it will disable
auxillary CPUs when the system is very idle, and enable them again once
the system becomes busy. This is achieved by averaging load over
multiple sampling periods; if CPUs were online or offlined based on a
single sampling period then thrashing will occur.
Click to expand...
Click to collapse
As you can see, hotplug is able to deliver you the fastest experience and the most fps in game (kernel independant), but it also allows for completely switching off one core to save battery life. In my testings, that worked very well. I also found out, that with this governor, my TF is deep-sleeping like a baby. No governor around here (not even smartassv2 ... could deliver me this performance while maintaining a decent battery life).
Tested on EOS 4.2.1 with EOS4 kernel
But try out yourself:
NOTE: This works on any 2.X kernel available (my Harmony series, ELiTE series, KatKernel series, or any other kernel except my divemaster)
Code:
1) Download a terminal emulator (if you don't have one already)
2) Download the .ko module from [URL="https://dl.dropbox.com/u/31119007/xda/hotplug-tegra-2/cpufreq_hotplug.ko"]here[/URL]
3) Remember the path you saved the module to (or preferably move it into /system/lib/modules)
4) su
5) insmod path-to-module/cpufreq_hotplug.ko
6) Switch to 'hotplug' governor with your favourite tool.
If you were too lazy to read my instructions, this is for you ..
DOWNLOAD
As always, have fun, share, and report back!
​
I have followed the instructions, do I have to run it every reboot or just this one off?
Nothing really happened when I ran it but I guess it just loads the module.
Cheers buddy
Must say thanks again for all the amazing work!
pops106 said:
I have followed the instructions, do I have to run it every reboot or just this one off?
Nothing really happened when I ran it but I guess it just loads the module.
Cheers buddy
Click to expand...
Click to collapse
Ahaha figured it out, it adds the govenor so we can then change it.
Cheers
---------- Post added at 08:41 PM ---------- Previous post was at 08:36 PM ----------
pops106 said:
Ahaha figured it out, it adds the govenor so we can then change it.
Cheers
Click to expand...
Click to collapse
wouldn't wake up after putting it to sleep, had to hold power button till it rebooted then it is gone from the options.
Soz
Running eos3 and kat69
Cheers
Good work! I was trying to do this same thing the cpusleeper app but couldnt get it to work. Definitely giving this a go.
Edit: installed fine but wont survive a reboot. Any fix for e this?
Sent from my Transformer TF101 using xda premium
Got a reboot while browsing with stock browser for five minutes.
Eos81,kat kernel
The only problem as 2 people discribe abovme is RR or Random Reboot.
Thats only problem.
sounds very promising i'll try it out and report if I get any RR's.
Getting error insmod: Can't open 'path-to-module/cpufreq_hotplug.ko'
Cd to my download folder which is where it is, am I doing something wrong?
morphuex said:
sounds very promising i'll try it out and report if I get any RR's.
Getting error insmod: Can't open 'path-to-module/cpufreq_hotplug.ko'
Cd to my download folder which is where it is, am I doing something wrong?
Click to expand...
Click to collapse
path-to-module should be the path the the module.
st0nedpenguin said:
path-to-module should be the path the the module.
Click to expand...
Click to collapse
Wow I derped that up, thx lol.
Was running fine at 1.2 decided to bump it up to 1.4 hit apply and it rebooted on me, is also didn't stick after reboot like others have said.
In here you may find how to make permanent the governor insmod.
Long story short is "add a script in /system/etc/init.d , it can be something like 91modules. . Add execution permission and it can contain the same code as before. Reboot and it should load your module at boot (be sure that the path to your module is right).
Also, you can do that in one line as root in a terminal. First, be sure that your /system is mounted as rw, not ro. If you don't know how to do that, as root, in a terminal, execute:
Code:
mount -o remount,rw /system
Then:
Code:
echo -e \#\!/system/bin/sh'\n'insmod [B]/path/to/module[/B]/cpufreq_hotplug.ko > /system/etc/init.d/91modules | chmod +x /system/etc/init.d/91modules
"
It should load automatically next time you reboot.
I created the 91modules file and done the editing and file permission in ES File Manager, but the above instructions should work flawlessly.
Don't thank me for this. Thank MapleSyrup
RaymaFX, you always amaze me!:victory:
hunterval said:
RaymaFX, you always amaze me!:victory:
Click to expand...
Click to collapse
Posts like this are keeping my work up and my releases coming.
People like you are the reason I am putting this much effort in this kinda old device .
For those who experience SOD/RR with hotplug and can confirm it's not related to anything else, please gimme a dsmg/ksmg (I recommend using 'Lumberjack' from the playstore (made by Chris Trotman, EOS founder).
*NO* logcat, that isn't any useful for me in this case ..
I do now have 2 days uptime with hotplug governor, not a single SOD/RR, pretty much usage (wifi on all the time, a little Riptide GP, web browsing, most of the time playing music) and still got 20% left with EOS4 kernel while achieving full performance while needed. This thing is deep-sleeping just perfectly.
I have placed the hotplug in the system this morning and my battery life still 99% im using it with dock and dono m8 but if theres any problem but seems my tf101 dont consume energy at all im starting to get scarry lol
Sent from my Transformer TF101 using xda app-developers app
turtlemask said:
In here you may find how to make permanent the governor insmod.
Long story short is "add a script in /system/etc/init.d , it can be something like 91modules. . Add execution permission and it can contain the same code as before. Reboot and it should load your module at boot (be sure that the path to your module is right).
Also, you can do that in one line as root in a terminal. First, be sure that your /system is mounted as rw, not ro. If you don't know how to do that, as root, in a terminal, execute:
Code:
mount -o remount,rw /system
Then:
Code:
echo -e \#\!/system/bin/sh'\n'insmod [B]/path/to/module[/B]/cpufreq_hotplug.ko > /system/etc/init.d/91modules | chmod +x /system/etc/init.d/91modules
"
It should load automatically next time you reboot.
I created the 91modules file and done the editing and file permission in ES File Manager, but the above instructions should work flawlessly.
Don't thank me for this. Thank MapleSyrup
Click to expand...
Click to collapse
I typed all this in and it wont survive uve a reboot. I placed the module in /system/lib/modules and typed that. When i see the | is that a new line or all one line?
Sent from my Transformer TF101 using xda premium
You can make that code in 2 commands, 1st is all before the | and 2nd the command after the |.
In order to work your final 91modules should look like
Code:
#!/system/bin/sh
insmod /system/lib/modules/cpufreq_hotplug.ko
In order to test if it's working you cat try to run it from the terminal (it may need "su" before)
Code:
./system/etc/init.d/91modules
If it's not complaining about not being executable, you may test to see if it's loaded with "lsmod".
If it's loaded it surely will survive the reboot.
I hope that helps you.
Looks like it created the 91modules file in init.d but when i try to set permissions using chmod +x it says bad mode. Maybe thats why it isnt working, wrong permissions.
Sent from my Transformer TF101 using xda premium
Indeed the chmod +x command doesn't work.
You may use ES file explorer to set file permissions but also you need to allow it superuser access, mount /system as writable and "up to root" and mark execute and write to the user. At the end the file should have the following permissions: rwx r-- r--
Ill give that a try and see if that does it. Thanks!
thanks
Thanks RaymanFX, this is a great addition to our device.
Also thanks to all your work, you are keeping this device alive...

Minfree settings in CM12 Roms

As there are again and again discussions concerning the minfree settings in CM12 roms, I decided to open this thread. If a moderator thinks, this is the wrong place for this thread, just move it, to where it belongs.
Obviously, since the last builds of CM12, the settings for minfrees cause some trouble. After a clean install of any rom, the minfree settings in trickstermod and in fauxclock are completely empty. In fauxclock the settings for OOM (out of memory) Score as well. Some people entered them manually, but I'm afraid, this won't help.
To really solve this, you have to do the following steps: open your file explorer, go to sys/module/lowmemorykiller/parameters. There you will find 5 files. Two of them do not have correct permissions. The first one, called adj, is for the OOM Scores. The other one, called minfree, is, you won't guess it, for the minfrees. :fingers-crossed:
As you see, both of them have only write permissions, but no read permissions. So I guess, the system will ignore these settings completely. I checked this, using cool tool from play store, very nice tool to show for example the actual free ram in your status bar. And in deed, the ram went down to 25MB, after I had opened a handful apps, and then my phone stopped working. I only could do a reboot.
Now the solution, which is quite easy: change the permissions into rw-rw-rw (666), and maybe change the group under owners into root (I'm not sure, if this is necessary, but it does make no problems, so why not).
Et voilà - if you now open trickstermod or fauxclock again, you will see the preset parameters. As you can see also, the minfrees there are really high. In another thread, there have been suggested the following settings, which are a good standard:
trickstermod 48/60/72/84/96/120
fauxclock 12288/15360/18432/21504/24576/30720
Important: In fauxclock, the minfree settings are not made in MB. You have to enter the so called "pages" for minfrees, which I can't explain exactly, what this is. In general, if you want to change minfrees in fauxclock, just take the settings in MB, you want to, and multiply by 256. This will give you the correct values.
BTW I don't think, it's a good idea, to change the OOM Scores, as long as you do not know exactly, what you're doing.
So, hopefully I could help a bit and clear some things up. But the final question to the CM devs remains:
is this a bug or is this a feature?
With me, those files were already chmod 666, owner root. I use latest liquidsmooth rom. What i did, prior reading your post, was that i set minfree in trickster, from my presets, than immedatly switched to faux, parameters were there, pressed apply, switched set on boot and rebooted. After that minfree r sticking in faux and trickster. Guess that my actions leaded to what you have described. Anyway, your way is much more convinient - at least one app less to use
I don't get it... The directory you mentioned is empty on my one s as well as on my nexus 10 both with cm12.
However my settings stick since I use fauxclock.
One more thing I don't get is in fauxclock. It says "kilobyte" explicitly in the minfree settings although you said (and it stems to be) this strange pages value....
mariachi62 said:
I don't get it... The directory you mentioned is empty on my one s as well as on my nexus 10 both with cm12.
However my settings stick since I use fauxclock.
One more thing I don't get is in fauxclock. It says "kilobyte" explicitly in the minfree settings although you said (and it stems to be) this strange pages value....
Click to expand...
Click to collapse
You have to use your file manager with root permissions. Depending on which file manager you use, this can be done differently. The inbuilt CM12 file manager can be given root permissions in settings, in Root explorer for example you have to mount the directory as r/w.
An yes, you are right, fauxclock says, the settings are in kilobyte, but this is not correct. If you succeed to open the minfree file with your file manager, you will find there exactly the values, you have entered in fauxclock.
Damnit, you're right. Solid explorer doesn't show the content of the directory.... I use it a long time and always had the feeling solid explorer shows me all files...
Cm file manager works, thanks!
mariachi62 said:
Damnit, you're right. Solid explorer doesn't show the content of the directory.... I use it a long time and always had the feeling solid explorer shows me all files...
Cm file manager works, thanks!
Click to expand...
Click to collapse
It does work with solid explorer as well. The point is, there is no option, to set root permissions manually in solid explorer. So the trick is to create a situation, where solid explorer will ask for root access. For example: long press any folder in your system root, tap properties, tap change (attributes) and now press OK, without changing anything. You will be asked for root access.
Now everything should be fine!
got a problem.
parameter file is empty.
using unofficial cm12 on htc one s with icecode kernel
waver1967 said:
got a problem.
parameter file is empty.
using unofficial cm12 on htc one s with icecode kernel
Click to expand...
Click to collapse
problem solved
For solid explorer, just try to open /data and it will ask for root permissions. I do it every time I flash my phone.
Thanks a lot man! I wasn't aware of the skewed minfree files. Was setting them in Trickster and wondering why the apps keep shutting down on me when multitasking. Great work
oll0 said:
Thanks a lot man! I wasn't aware of the skewed minfree files. Was setting them in Trickster and wondering why the apps keep shutting down on me when multitasking. Great work
Click to expand...
Click to collapse
They will still close even so...just not so obvious
Rapier said:
They will still close even so...just not so obvious
Click to expand...
Click to collapse
Uh yes obviously. However they were actually closing the instant i opened another app. Couldnt even keep two apps open at the same time, that was pretty bad.
oll0 said:
Uh yes obviously. However they were actually closing the instant i opened another app. Couldnt even keep two apps open at the same time, that was pretty bad.
Click to expand...
Click to collapse
Yes, I know what you mean. Was the same for me. Having better minfree settings that stick after a reboot helped but didn't solved the issue completely. But at least now phone is usable. I put my hopes in that Google patch they'll release with 5.0.3
Sent from nowhere over the air...
deleted
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Sylvain_44 said:
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Click to expand...
Click to collapse
If it's reverting, I guess the only way would be through an script that runs at boot time. But it's strange, the permissions should stick once set...
Sylvain_44 said:
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Click to expand...
Click to collapse
I used a file explorer with root permissions like root explorer or ES file explorer. My permissions are actually rw-rw-rw, both for adj and minfree file. I guess, this is 666? And they stick after a reboot. But honestly I am not quite sure, if I changed something else. IIRC, I might have changed the permissions for system/etc/init.d/90userinit to rwxr-xr-x. Maybe you want to check this, too.
Well, they don't stick because init.rc sets them to chmod 0220 on boot. That makes me wonder if maybe it was supposed to be like this? I wanted to change it but I don't want to screw anything up. There is a dedicated section for low memory killer in init.rc and only things there are chmod 0220 for those two files and chown for them - so basically the things that we are fixing in this thread. A bug or a feature?
jakubmi9 said:
Well, they don't stick because init.rc sets them to chmod 0220 on boot. That makes me wonder if maybe it was supposed to be like this? I wanted to change it but I don't want to screw anything up. There is a dedicated section for low memory killer in init.rc and only things there are chmod 0220 for those two files and chown for them - so basically the things that we are fixing in this thread. A bug or a feature?
Click to expand...
Click to collapse
Thanks for this hint! Indeed, this might be the other thing, that I had changed. In CM11 roms, the described permissions in init.rc are 664 - both for adj and minfree file. I am not quite sure, if this helps, but it's worth an attempt. You can change the permissions in init.rc to 644, reboot and see, if the permissions for adj and minfree are sticky now. I just did this ,and everything is fine -so you can try without risk, I guess. But I must say, I hadn't the problem before, that the permissions for adj and minfree were reset after reboot. Could be related to the changes in init.rc, but I am not sure.
A weird thing: I made a backup and tried anyway yesterday but after a reboot my init.rc restores itself to normal. I tried another time: Modified the values and saved. After reopening it's still there and it stays there but only until I reboot the phone. After reboot the permissions are not set correctly and init.rc restores itself to original state. Is there something I do not know about modifying init.rc? Because that is the first time I try to do something with it.

Secure Settings (for Tasker) with Systemless Root...

I want to use Secure Settings with Tasker to accomplish things that Tasker won't allow. My issue is that Secure Settings won't "see" that I'm rooted. I Googled this and found a solution (see attached image and this link: https://dammit.nl/p/962). But it won't work. If I do it through terminal emulator, it says /system is busy. If I go through TWRP and mount the /system, It just says the location wasn't found (for the touch command), specifically the /xbin and the /bin folders. Anyone else done this? Or found another way to make Tasker do things like change location mode (high accuracy to battery saver, or vice versa)?
Forgot to attach image. Here it is.
Ugh. This is the one without SU getting in the way...
Remount /system rw
Create two symlinks
Run Secure Settings
Grant root when asked
Done
PsiPhiDan said:
Ugh. This is the one without SU getting in the way...
Click to expand...
Click to collapse
Not sure that just touching 'su' files work. Preferred to create symlinks to actual 'su' utility (see above)

Categories

Resources