▒▄█▀▄░ █▀▄ █▀▀▄ █▀▀ █▄░█ ▄▀▄ █░░ ▀ █▄░█ █▀▀░░▒▐█▀█▒▐█▀█▒█▒█░░▒▐█▀█ ▄▀▄ █▄░█ ▀█▀ █▀▀▄ ▄▀▄ █░
▐█▄▄▐█ █░█ █▐█▀ █▀▀ █░▀█ █▀█ █░▄ █ █░▀█ █▀▀░░▒▐█░░▒▐█▄█▒█▒█░░▒▐█░░ █░█ █░▀█ ░█░ █▐█▀ █░█ █░▄
▐█░▒▐█ ▀▀░ ▀░▀▀ ▀▀▀ ▀░░▀ ▀░▀ ▀▀▀ ▀ ▀░░▀ ▀▀▀░░▒▐█▄█▒▐█░░▒▀▄▀░░▒▐█▄█ ░▀░ ▀░░▀ ░▀░ ▀░▀▀ ░▀░ ▀▀▀
Rules Your CPU A Breeze !
*CF-ROOT ONLY !
DISCLAIMER: I take no responsible if you brick your phone
To Devs:
You have agreed to this if you're going to use any parts of my work:
Code:
If you are taking any of my work as reference, please add credit and maybe a link of my thread would be nice.
Pm me and tell me about your project.
Provide 'do & don't' and warnings about issues that Adrenaline Boost could cause to end user's device.
If you're using my file, please do not edit my #comment or add any main function unrelated system outputs.
If you're using main function related code of my files, please add '#NAME_OF_MY_FILE by ImbaWind' on top of your file and maybe more precisely, which part of it.
[Description]
One Script To Rule Your CPU , Why SetCPU If You Have Installed This Script ?!
Why This Script ?!
Handy Script UI !
Easy To Use !!
No App Needed !!!
Zero Ram Usage !!!!
Few kb Space Needed ONLY !!!!!
More Tweaks Than Others!!!!!!
More Functions Than Others!!!!!!!
100% FREE !!!!!!!!
Functions :
1. Change Cpu Governors
----a) Set Cpu Governor Setting On Boot !
----b) Drop Cache When Phone Boots !
2. Change Cpu Max Frequency (b84 only)
----a)Set Clock Frequency On Boot ! [NEW]
3. Change Cpu Min Frequency (b84 only)
4. Adrenaline Boost™ [NEW*]
What you need :
Terminal
Root access (Superuser)
Busybox
Clockworkmod
CF-ROOT
How to install:
1. Download the latest version of .zip file attached below and put into your sdcard
2. Reboot into CWM
3. Go 'mounts and storage' > 'mount /system'
4. Go 'install zip from sdcard' > 'choose zip from sdcard' > locate 'Adrenaline CPU Control_BETA3.2.zip'
5. reboot system now
How to use:
Go terminal emulator and type :
Code:
su
clock
New function: Adrenaline Boost™
What is this?
-It's actually option 4 [drop cache] from previous build and I have pulled it out and add more command to clear more ram, now it shows your free ram too!
When and why should I use this?
-You will notice that your ram will increase everyday and task manager are NOT able to clear it and your phone are damn lag and you have to reboot, this is because the android os works everyday and creates system caches itself.
-Adrenaline™ Boost will help you to clear those caches for you and give back you smooth performance!!
-For more information, go here.
How to use this ?
Go terminal emulator and type :
Code:
su
boost
Then exit terminal and go task manager clear ram , you will see the magic !
And your phone will smooth as butter
**This Script Are ABLE To Overclock If You Are Using CF-ROOT B84!**
Currently Available Governor:
Code:
conservative
ondemand
smartass
smartassV2 [b84 only]
interactive
interactiveX
powersave
performance
userspace
Screenshots
Before : 245670 ~ 825600
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Selecting Governor
Insert Governor
Change Max Frequency From 825600 to 844800
As you can see , the max frequency changed
My script is working
PROOF: Set CPU shows exactly what setting I have in CPU Script
Adrenaline Boost™
Before Memory Free : 44.1172 MB
After Memory Free : 95.9102 MB
Memory Freed : 51.793 MB
Known Issue :
-Loop back to 'Current Governor : xxxxxx: when selecting exit option after choosing a governor, have no idea what causes it =(
How to uninstall ?
Reboot cwm, mount /system and install THIS from sdcard.
-------THINGS TO DO IN NEXT VERSION-------
1) More Governor Tweaks
*) Bug Fixes [If got any]
Credits
-Special thank to ketut.kumajaya for CF-Root and his guidance
-pikachu (I learn to create flashable-zip using his cwm package as guide)
-Google for Android OS
-matmutant from X10 Mini for his script's first line (You are running from ***to *** , Current Governor is ***)
-Those who have helped/tried to help me
-droidphile for his awesome ref
For those who want to include this into your ROM, please give proper credits and a link directs to this thread, thanks
I may use HOURS for an update but if you like my work,
please consider to use only one SECOUND to hit the THANKS button
It will make me happy and motivate me to update more often and add more features
Rate this thread ✯ ✯ ✯ ✯ ✯ and share it to your friends too!
If you found this script S'UCKS and think that this script is just crap , please comment to tell me why ;D
I'm willing to accept your view and make my script better =]
Any Feedback Please =D
If you want to mod this script for others kernel use , or include this in your rom
PLEASE SEND A PM TO ME , AND POST A LINK DIRECT TO HERE
[For devs and experts]
Loop back to 'Current Governor : xxxxxx: when selecting [Exit] option after choosing a governor, have no idea what causes it =S
Any help please =D
[Change Log]
Alpha 1 > 12/1/2012 <
1st release
Alpha 1.1 > 12/1/2012 <
Fix a minor bug , doesn't matter if your phone are rooted properly
Alpha 2 > 15/1/2012 <
Made flashable zip but the files are set as wrong permission
Added command to copy file to init.d , but the script does't work [Will be able to set on boot when it's done]
Alpha 2.1 > 23/1/2012 <
Found a minor bug , causes "end of file" error
Alpha 2.2 > 24/1/2012 <
Fixed a 'End Of File' error
BETA 1 > 26/1/2012 <
Added Set On Boot Function !
Added Clear Ram During Boot
BETA 2 > 30/1/2012 <
CPU Freq Are Now Able To Set On Boot !!
BETA 2.1 > 30/1/2012 <
Fixed some minor bugs
Add only b84 can access option 3 , 4 and smartassV2 governor
BETA 2.2 > 6/2/2012 <
Fixed a minor bug when changing governor
Beta 3 > 25/2/2012 <
Major Update
Fully Flashable zip
New Function : Adrenaline Boost
More Governor Tweaks
Bug Fixes
Beta 3.1 > 14/3/2012 <
Updated Adrenaline™ Boost, now shows your free ram
Beta 3.2 > 3/4/2012 <
Updated to Adrenaline™ Boost V3
Try 'touch'?
Code:
touch /system/init.d/nameofscripthere
echo "interactiveX" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Dunno if that's correct, do some experiment
Touch is used to create a plain file when there's no file available on /path/to/file
KcLKcL said:
Try 'touch'?
Code:
touch /system/init.d/nameofscripthere
echo "interactiveX" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Dunno if that's correct, do some experiment
Touch is used to create a plain file when there's no file available on /path/to/file
Click to expand...
Click to collapse
thanks for your reply
i'll try it tomorrow
don't work , I extracted it and put in system bin changed permission and rebooted and went to terminal and
su
clock
didn't work..
should I flash it?
Sent from my GT-S5830 using xda premium
dylan_ace said:
don't work , I extracted it and put in system bin changed permission and rebooted and went to terminal and
su
clock
didn't work..
should I flash it?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
move the file inside the .zip not the folder
check ur perm
dun rename the file otherwise wont work
dont flash it , it's not a flashable file
the Alpha folder from the extract?
Sent from my GT-S5830 using xda premium
dylan_ace said:
the Alpha folder from the extract?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
the file is called : 'clock'
if u edit the file by notepad u will see those code are same as my 1st post code
if it's same , move the 'clock' file to /system/bin
Does it only set the CPU frequencies based on the Kernels limitations? ie. CF-Root 3.7-b83 max frequency is 902MHz with OC'ing apps, am I to expect this to be the same....
I already have it, lol
saigetshu said:
I already have it, lol
Click to expand...
Click to collapse
then why dont u share? LOL
-SGA- said:
Does it only set the CPU frequencies based on the Kernels limitations? ie. CF-Root 3.7-b83 max frequency is 902MHz with OC'ing apps, am I to expect this to be the same....
Click to expand...
Click to collapse
this script doesn't overclock , it just let u choose those freq and governors that are already INCLUDED in ur kernel
imbawind said:
DISCLAIMER: I take no responsible if you brick your phone
I have made a script to change governors , max cpu freq and min cpu freq , SetCPU is not needed once this script is completely done
What you need :
Terminal
Root access (Superuser)
Clockworkmod
How to use:
1.Download the .zip file(flashable) and flash via recovery
2.Check Permission :
/system/bin/clock => rwxrwxrwx
3. Open Terminal
4.Type
Code:
su
clock
** Do NOT Rename The File
Functions
1. Change Governors
2. Change Max Frequency
3. Change Min Frequency
4. Drop System Cache
5. Reboot
**This Script doesn't overclock , you need a modified overclock-able kernel to overclock.** [Script error if u set the freq over 800mhz because I haven't make correspond file yet , will complete this once <set on boot> is done]
After selected option 4 go task manager , hit clear ram and see the ram usage
Code:
#!/system/bin/bash
# Cpu Freq Script
# Alpha 2
if [ -f "/system/xbin/su" ]; then
busybox mount -o remount,rw -t rootfs /
echo "Remounted RW !"
else
echo "ERROR : Failed To mount RW !"
echo -n " Please Enter Key To Exit... “;
read enterKey
exit 0
fi
speed=1
sleep="sleep $speed"
# Current Max Clock Speed
cur_max_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
CUR_MAX=`cat $cur_max_file`
# Current Min Clock Speed
cur_min_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
CUR_MIN=`cat $cur_min_file`
# Current Governor
scal_gov_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
CUR_GOV=`cat $scal_gov_file`
# Available Governor
avail_gov_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
AVAIL_GOV=`cat $avail_gov_file`
# Available Frequencies
avail_freq_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
AVAIL_FREQ=`cat $avail_freq_file`
# ECHO Tell Current Clock Speed
echo -e " You're running from \033[1;32m $CUR_MIN \033[0;36m to \033[1;32m $CUR_MAX \033[0;36m Hz"
echo -e "Current governor is \033[1;32m $CUR_GOV \033[0;36m"
echo ""
echo ""
$sleep
# ECHO Show Available Governor
echo " Available Governor: "
echo "$AVAIL_GOV"
echo ""
$sleep
# ECHO Show Available Freq
echo " Available Frequencies: "
echo "$AVAIL_FREQ"
echo ""
$sleep
echo " [ Options ] "
echo " 1. Change CPU Governor Profile "
echo " 2. Change Maximum Processor Frequency "
echo " 3. Change Minimum Processor Frequency "
echo " 4. Drop System Caches "
echo " 5. Reboot "
echo " 6. Exit "
echo ""
$sleep
echo -n " Please Enter Option [1 - 6] : "
read opt
echo ""
$sleep
case $opt in
1) echo " [Option 1] Change CPU Governor Profile "
echo ""
echo ""
echo -e " Current Governor: $CUR_GOV"
echo ""
$sleep
echo " Available Governors: "
echo "$AVAIL_GOV"
echo ""
$sleep
echo " Insert your desired governor: "
echo -n " Your Governor: ";read GOV
echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo " Complete "
NEW_GOV_FILE=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
NEW_GOV=$NEW_GOV_FILE
rm -f /system/etc/init.d/smartass
rm -f /system/etc/init.d/interactiveX
rm -f /system/etc/init.d/interactive
rm -f /system/etc/init.d/conservative
rm -f /system/etc/init.d/userspace
rm -f /system/etc/init.d/powersave
rm -f /system/etc/init.d/performance
rm -f /system/etc/init.d/ondemand
cp /system/etc/clock/governors/$GOV /system/etc/init.d;
chmod 777 /system/etc/init.d/$GOV
echo ""
echo ""
$sleep
echo -e " Current Governor: $NEW_GOV"
echo ""
echo ""
$sleep
echo -n " Press Enter Key To Continue... ";
read enterKey
opt=0
clock;;
2) echo " [Option 2] Change Maximum Processor Frequency "
echo ""
echo ""
$sleep
echo -e " Current Maximum Frequency: $CUR_MAX "
echo ""
$sleep
echo " Available Frequency: "
echo "$AVAIL_FREQ "
echo ""
echo ""
$sleep
echo -n " Insert Your Frequency: ";read HFREQ
echo $HFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo " Changed Successfully "
NEW_CUR_MAX=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
NEW_MAX=$NEW_CUR_MAX
echo ""
echo ""
rm -f /system/etc/init.d/122880
rm -f /system/etc/init.d/245760
rm -f /system/etc/init.d/320000
rm -f /system/etc/init.d/480000
rm -f /system/etc/init.d/800000
cp /system/etc/clock/max_freq/$HFREQ /system/etc/init.d;
chmod 777 /system/etc/init.d/$HFREQ
$sleep
echo -e " Current Processor Maximum Frequency: $NEW_MAX "
echo ""
echo ""
$sleep
echo -n " Press Enter Key To Continue... ";
read enterKey
opt=0
clock;;
3) echo " [Option 3] Change Minimum Processor Frequency "
echo ""
$sleep
echo -e " Current Minimum CPU Frequency: $CUR_MIN "
echo ""
$sleep
echo " Available Frequency: "
echo "$AVAIL_FREQ "
echo ""
echo ""
$sleep
echo -n " Insert Your Frequency: ";read LFREQ
echo $LFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo " Changed Successfully "
NEW_MIN_FILE=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`
NEW_MIN=$NEW_MIN_FILE
echo ""
echo ""
$sleep
echo -e " Current Processor Minimum Frequency: $NEW_MIN "
echo ""
echo ""
$sleep
echo -n " Press Enter Key To Continue... ";
read enterKey
opt=0
clock;;
4) echo "3" > /proc/sys/vm/drop_caches
echo "1" > /proc/sys/vm/drop_caches
echo " Ram Dropped "
echo ""
echo ""
$sleep
echo -n " Press Enter Key To Continue... ";
read enterKey
opt=0
clock;;
5) echo " Rebooting... "
$sleep
reboot;;
6) echo " Exit "
$sleep
exit 0;;
*) echo " Invalid Option "
echo ""
$sleep
echo " Please try again "
echo ""
$sleep
echo -n " Please Enter Key To Continue... ";
read enterKey
opt=0
clock;;
esac
Click to expand...
Click to collapse
Updated to Alpha 2 , Experts needed
On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .
ketut.kumajaya said:
On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .
Click to expand...
Click to collapse
imbawind , listen to him .
He is the kernel expert around here .
if ketut says this then might need to modify that init script itself
EmoBoiix3 said:
imbawind , listen to him .
He is the kernel expert around here .
Click to expand...
Click to collapse
yea, I know, thanks
ketut.kumajaya said:
On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .
Click to expand...
Click to collapse
Can I delete that file or delete all the words inside?
I saw
Code:
if [ $(propget $TWEAK_GOVERNOR_CONSERVATIVE] = "enabled" ]; then
echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Isit mean that if there is a line in build.prop called
Code:
TWEAK_GOVERNOR_CONSERVATIVE=enabled
then init.cfroot.post_boot.sh will set the governor to conservative?
If I create a file with these setting :
Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE enabled
Will it enable the 'conservative'?
Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE enabled
and
Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE=enabled
both not working , any idea?
or can i just delete those words which interrupt my init.d script inside the init.cfroot.post_boot.sh?
Galaxy Ace have a very limited property. Use my propset/propget script to store/restore your own settings, like I have done on CF-Root and Darktremor apps2sd. Now or later setprop will make your brain hot with some strange issue (bluetooth, GPS, wifi, etc).
ketut.kumajaya said:
Galaxy Ace have a very limited property. Use my propset/propget script to store/restore your own settings, like I have done on CF-Root and Darktremor apps2sd. Now or later setprop will make your brain hot with some strange issue (bluetooth, GPS, wifi, etc).
Click to expand...
Click to collapse
what are these "propset/propget/setprop“ mean?
Related
I am running sparks mod 1.6.4 compcache 32% hack.
I want to change the swappiness to 60.
How would I go about doing this?
Don't do it, it's much too high. I would suggest something around 10-20, i.e. type in terminal:
su
echo 10 > /proc/sys/vm/swappiness
Sent from my Gingerbread on Sapphire using XDA App
Why so low? Just seeking some wisdom.
Thanks.\
Also is this a permanent change or do i have to do this every boot?
This is not a permanent change, you have to apply this every time you reboot your phone. If you want it permanent, you should include it into the /system/bin/compcache script.
Swappiness defines, when data will be put into the swapfile. 100 means, all inactive data can be put into the swap, 0 means, that cached data will be removed first before using the swap. Disadvantage when too much data is within swap: the system speed goes down ... so you have to find a good compromize.
AndDiSa said:
This is not a permanent change, you have to apply this every time you reboot your phone. If you want it permanent, you should include it into the /system/bin/compcache script.
Swappiness defines, when data will be put into the swapfile. 100 means, all inactive data can be put into the swap, 0 means, that cached data will be removed first before using the swap. Disadvantage when too much data is within swap: the system speed goes down ... so you have to find a good compromize.
Click to expand...
Click to collapse
ok so i edited the file and pushed it.
now compcache is not starting and when i type it in the terminal it says permission denied.
Any help?
should i try inputting the command you first gave me into compcache?
After the modification, the compcache file should look something like
...
start)
echo 3 > /proc/sys/vm/drop_caches
modprobe $MODULE
rzscontrol $DEV --disksize_kb=32576 --init
swapon $DEV
echo 10 > /proc/sys/vm/swappiness
;;
...
this is what i have
#!/system/bin/sh
#
# Compcache manager
# [email protected] (cyanogen)
#
DEV=/dev/block/ramzswap0
MODULE=ramzswap
MODULES_DIR=/system/modules/lib/modules/`uname -r`
case "$1" in
start)
echo 3 > /proc/sys/vm/drop_caches
echo 30 > /proc/sys/vm/swappiness
modprobe $MODULE
rzscontrol $DEV --disksize_kb=$2 --init
swapon $DEV
;;
stop)
swapoff $DEV >/dev/null 2>&1
rmmod $MODULE >/dev/null 2>&1
;;
stats)
rzscontrol $DEV --stats
;;
*)
echo "Usage: $0 {start <size>|stop|stats}"
exit 1
esac
exit 0
I cant seem to get it to work.
this is the original too.
it just keeps saying permission denied
You are running the script as root, i.e
> su
# /system/bin/compcache start
to start the script manually?
Before modifing the script, you have to remount /system to set it read-write, otherwise it's read only!
try to fix the permission
Hi to all guys i'm developing a new rom and i'd like to put an executable script in it. I'm not very goot at bash,but you can help me. Here it is:
Code:
Welcome to openOptimus modding script!
echo Choose an option:
echo 1.Change boot animation
echo 2.Disable/enable Stagefright player
echo 3.Enable/disable Hardware acceleration
echo 4.Check Wi-Fi Tx-Power
read -p "Change boot animation" choice
read -p "Disable/enable Stagefright player" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Check Wi-Fi Tx-Power" choice
if test "$choice" == "1"
then
goto bootanim
fi
if test "$choice" == "2"
then
goto stagefright
fi
if test "$choice" == "3"
then
goto hwacc
fi
if test "$choice" == "4"
then
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
fi
:bootanim
echo *********************************************************
echo * Boot animation changer *
echo *********************************************************
echo Please choose one:
echo 1.Megatron boot animation
echo 2.Android particles
echo 3.CyanogenMod 7
echo 4.Coin
read -p "Megatron boot animation" bootchoice
read -p "Android particles" bootchoice
read -p "CyanogenMod 7" bootchoice
read -p "Coin" bootchoice
if test "$bootchoice" == "1"
then
busybox cp /sdcard/openOptimus_resources/Megatron/bootanimation.zip /data/local
echo Boot animation copied.
if test "$bootchoice" == "2"
then
busybox cp /sdcard/openOptimus_resources/Particles/bootanimation.zip /data/local
echo Boot animation copied.
if test "$bootchoice" == "3"
then
busybox cp /sdcard/openOptimus_resources/CM7/bootanimation.zip /data/local
echo Boot animation copied.
fi
if test "$bootchoice" == "4"
then
busybox cp /sdcard/openOptimus_resources/Coin/bootanimation.zip /data/local
echo Boot animation copied.
fi
:stagefright
Stagefright player enabler/disabler
echo Please choose an option:
echo 1.Enable Stagefright player
echo 2.Disable stagefright player
read -p "Enable Stagefright player" stagefright
read -p "Disable stagefright player" stagefright
if test "$stagefright" == "1"
then
busybox cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player enabled.
fi
if test "$stagefright" == "2"
then
busybox cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player disabled.
fi
:hwacc
echo
echo Hardware acceleration enabler/disabler
echo WARNING:This disables/enables Hwacc,but enables stagefright
echo
echo Please choose an option:
echo 1.Enable Hardware acceleration
echo 2.Disable Hardware acceleration
read -p "Enable Hardware acceleration" hwacc
read -p "Disable Hardware acceleration" hwacc
if test "$hwacc" == "1"
then
busybox cp /sdcard/openOptimus_resources/Hwacc1/build.prop /system
echo Hardware acceleration enabled.
fi
if test "$hwacc" == "2"
then
busybox cp /sdcard/openOptimus_resources/Hwacc2/build.prop /system
echo Hardware acceleration disabled.
fi
It's all ok? Please answer me,in my last three topics nobody answered me.
Uhh, what exactly is the problem?
The only problem I see in this is that you use multiple build.prop files for enabling/disable stagefright and hardware acceleration.
My suggestion is you use sed, a stream editor. This way, you won't need copying files from the folder and may actually make the code easier to read.
This is how I use sed. It creates a backup of the file, searches for the string to be replaced, and then replaces it.
Code:
sed -i.bak 's/ro.media.enc.jpeg.quality=90/ro.media.enc.jpeg.quality=100/g' /system/build.prop
If you plan on doing this, read more about sed. I've kinda forgotten the syntax since I made this 15 days ago and never really used it again. And yes, that's how fast I forget stuff
Thanks kpbotbot ur da man of xda. So,there are no syntax problems in the script except the build.prop? Maybe i can use setprop to disable/enable hwacc/stagefright. I read about setprop in franciscofranco's tweaks topic. Can i use it?
@kpbotbot ..i wanted to look at sed and your example just made it very easy
Lol no I'm not.
I'm not entirely sure how bash handles input. I haven't given scripting much time yet despite the fact that I've been on linux for quite some time xD The logic is in the script though. Have you tested it?
Regarding the franciscofranco's scripts, of course you can use them
I'm trying it with setprop. BTW,i don't wanna piss you off guys but take a look in Optimus One General. Take a look at "APKManager not working" It's very important.
I don't have any idea what in the world is wrong with APKManager since I don't use or plan on using it. What do you need it for anyway?
By the way, had a look at bash scripting. Why does this have 4 read lines?
Code:
read -p "Change boot animation" choice
read -p "Disable/enable Stagefright player" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Check Wi-Fi Tx-Power" choice
I've had a quick look on your script. First of all DON'T USE GOTO's!!!
You have two "read -p "Enable/disable Hardware acceleration" choice".
Code:
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
Why do you have iwconfig wlan0 lying there? If you don't have Wi-Fi on it will just simply output an error saying it's not on...
Use functions instead.
Try a little tutorial here (http://tldp.org/LDP/abs/html/functions.html) about functions. I didn't recommend using this a few minutes ago for some reason. Anyway, you may need to make a major rewrite to your script, but better readability and flow make it easier to maintain and trace errors.
I'm not sure if there are any other (or better) ways of doing this. Have a look at ruigui's script
kpbotbot said:
Use functions instead.
Try a little tutorial here (http://tldp.org/LDP/abs/html/functions.html) about functions. I didn't recommend using this a few minutes ago for some reason. Anyway, you may need to make a major rewrite to your script, but better readability and flow make it easier to maintain and trace errors.
I'm not sure if there are any other (or better) ways of doing this. Have a look at ruigui's script
Click to expand...
Click to collapse
I agree, functions would be better than the way you're doing atm.
Yea now i'm gonna take a look at ruigui's script.
Dudes i wanna ask you some:
When i cook my rom and change framework i get bootloop. This doesn't happen if i cook rom w/ original framework,or if i flash a zip that contains that particular framework.
And,i downloaded black mms apk from void and ringnofade. When i put 'em in my rom they force close! Why? Do i need to change classes.dex?
.
EDIT:I taked a look at ruigui's script,but this didn't help me. Please fix my script.
Thanks guys.
I don't know most of bash's syntax, so you do it
Here's how you should do it:
Create the functions. 1 for bootanim changer, 1 for enabling of hardware acceleration, 1 for SF, and 1 for the other one I forgot
Make the choosing part (the one with the reads)
Call appropriate function depending on choice
If you come to think of it this is actually easier than gotos.
ciaox said:
Dudes i wanna ask you some:
* When i cook my rom and change framework i get bootloop. This doesn't happen if i cook rom w/ original framework,or if i flash a zip that contains that particular framework.
Click to expand...
Click to collapse
Because you're not supposed to replace framework-res.apk because on the first boot, android checks signatures. It will get into a bootloop when it fails on that. (Experts please follow this up. I'm not sure).
Just replace the stuff inside the framework-res.apk with the stuff in the themed framework so as not to break signing. Just open framework-res.apk with an archiving tool and drag stuff onto it replacing the previous stuff. DO NOT EXTRACT
At least that's how I avoid bootloops. Try asking paolo how he did some of the stuff
EDIT: Also, do not resign framework-res.apk. You shouldn't sign it with a testkey xD
ciaox said:
EDIT:I taked a look at ruigui's script,but this didn't help me. Please fix my script.
Click to expand...
Click to collapse
We ain't gonna fix your script. If you come here with valuable questions after you did your research, then we can help and answer, if you come here asking for us to fix "your" work, sorry dude, ain't going to happen.
And about gotos, anyone that programmed anything in his/her life will know that gotos = problems and possible security holes.
@ciaox Got bored xD Made a script.
Try to look at mine. The code is straightforward so no need to explain them - http://forum.xda-developers.com/showpost.php?p=12510469&postcount=144
Don't use this as base though. Just look at the functions and how to call them. Then, make yours
franciscofranco said:
We ain't gonna fix your script. If you come here with valuable questions after you did your research, then we can help and answer, if you come here asking for us to fix "your" work, sorry dude, ain't going to happen.
And about gotos, anyone that programmed anything in his/her life will know that gotos = problems and possible security holes.
Click to expand...
Click to collapse
Man i'm sorry about dis,i will take a look at kpbotbot's script. Many thanks to everyone. Please keep thread open cuz i'm gonna need you guys..
oh man i get this. I can now call functions,i will let u know
Many thanks
[OT] I wanna integrate dspmanager in my rom but it doesn't work,and if i put libaudioflinger.so from cm7 by mik i can't hear anything. [/OT]
Yeah guys just rewrited my script! Now it must be ok! Check it out,i think it's OK.
Code:
#!/system/bin/sh
##########################################################################
# openOptimus tweaks v2 beta #
# Script created by ciaox. only for openOptimus ROM. #
# Copyright (c) ciaox 2011. #
##########################################################################
hwon(){
cp /sdcard/openOptimus_resources/Hwacc1/build.prop /system
echo Hardware acceleration enabled.
fi
}
hwoff(){
cp /sdcard/openOptimus_resources/Hwacc2/build.prop /system
echo Hardware acceleration disabled.
fi
}
sfon(){
cp /sdcard/openOptimus_resources/Stagefright1/build.prop /system
echo Stagefright player enabled.
fi
}
sfoff(){
cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player disabled.
fi
}
megatron(){
cp /sdcard/openOptimus_resources/Megatron/bootanimation.zip /data/local
echo Boot animation copied.
}
particles(){
cp /sdcard/openOptimus_resources/Particles/bootanimation.zip /data/local
echo Boot animation copied.
}
cyan7(){
cp /sdcard/openOptimus_resources/CM7/bootanimation.zip /data/local
echo Boot animation copied.
}
coin(){
cp /sdcard/openOptimus_resources/Coin/bootanimation.zip /data/local
echo Boot animation copied.
}
boot(){
echo *********************************************************
echo * Boot animation changer *
echo *********************************************************
echo Please choose one:
echo 1.Megatron boot animation
echo 2.Android particles
echo 3.CyanogenMod 7
echo 4.Coin
read megatron
read particles
read cyan7
read coin
if test "$megatron" == "1"
then megatron
fi
if test "$particles" == "2"
then particles
fi
if test "$cyan7" == "3"
then cyan7
fi
if test "$coin" == "4"
then coin
fi
}
tx(){
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
fi
}
sf(){
echo *********************************************************
echo *stagefright player enabler/disabler *
echo *********************************************************
echo Please choose an option:
echo 1.Enable Stagefright player
echo 2.Disable stagefright player
read sfon
read sfoff
if test "$sfon" == "1"
then sfon
fi
if test "$sfoff" == "2"
then sfoff
fi
}
sf(){
echo *********************************************************
echo * Hardware acceleration enabler/disabler *
echo *********************************************************
echo WARNING:This disables/enables Hwacc,but enables stagefright
echo
echo Please choose an option:
echo 1.Enable Hardware acceleration
echo 2.Disable Hardware acceleration
read hwon
read hwoff
if test "$hwon" == "1"
then hwon
fi
}
if test "$hwoff" == "2"
then hwoff
fi
}
echo *********************************************************
echo * Welcome to openOptimus modding script! *
echo *********************************************************
echo Choose an option:
echo 1.Change boot animation
echo 2.Disable/enable Stagefright player
echo 3.Enable/disable Hardware acceleration
echo 4.Check Wi-Fi Tx-Power
read boot
read sf
read hw
read tx
if test "$boot" == "1"
then boot
fi
if test "$sf" == "2"
then sf
fi
if test "$hw" == "3"
then hw
fi
if test "$tx" == "4"
then tx
you called you hardware acceleration disabler/enabler as "sf" instead of "hw".
I think you should call a case loop instead of this:
Code:
read boot
read sf
read hw
read tx
if test "$boot" == "1"
then boot
fi
if test "$sf" == "2"
then sf
fi. . . . . . .
which should be something like this:
Code:
read $option
case $option in
1)
boot
;;
2)
sf
;;
3)
hw
;;
4)
tx
;;
esac
or something like that. btw, what happens after you're finished with one tweak, let's say disabling/enabling stagefright? I think you should call you main menu as another function and just call it at the bottom of you script. not an expert, just giving some inputs.
Code:
hwon(){
cp /sdcard/openOptimus_resources/Hwacc1/build.prop /system
echo Hardware acceleration enabled.
fi
}
hwoff(){
cp /sdcard/openOptimus_resources/Hwacc2/build.prop /system
echo Hardware acceleration disabled.
fi
}
sfon(){
cp /sdcard/openOptimus_resources/Stagefright1/build.prop /system
echo Stagefright player enabled.
fi
}
sfoff(){
cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player disabled.
fi
}
What happened to setprop? Using multiple build.prop files will make it even more complicated. And if someone made modifications to their build.prop files then used this, they would lose their changes.
kpbotbot said:
Code:
hwon(){
cp /sdcard/openOptimus_resources/Hwacc1/build.prop /system
echo Hardware acceleration enabled.
fi
}
hwoff(){
cp /sdcard/openOptimus_resources/Hwacc2/build.prop /system
echo Hardware acceleration disabled.
fi
}
sfon(){
cp /sdcard/openOptimus_resources/Stagefright1/build.prop /system
echo Stagefright player enabled.
fi
}
sfoff(){
cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player disabled.
fi
}
What happened to setprop? Using multiple build.prop files will make it even more complicated. And if someone made modifications to their build.prop files then used this, they would lose their changes.
Click to expand...
Click to collapse
Oh yeah forgot this..will update script. Thx to ungaze for the tip i'm gonna add a main_menu function. And i will use case.
Ok i rewrited script again:
Code:
#!/system/bin/bash
##########################################################################
# openOptimus tweaks v2 beta 2 #
# Script created by ciaox. only for openOptimus ROM. #
# Copyright (c) ciaox 2011. #
##########################################################################
exit(){
echo Goodbye! And hope u will enjoy openOptimus (:
fi
}
hwon(){
setprop debug.sf.hw=1
echo Hardware acceleration enabled.
fi
}
hwoff(){
setprop debug.sf.hw=0
echo Hardware acceleration disabled.
fi
}
sfon(){
setprop media.stagefright.enable-player=true
setprop media.stagefright.enable-meta=true
setprop media.stagefright.enable-scan=true
setprop media.stagefright.enable-http=true
echo Stagefright player enabled.
fi
}
sfoff(){
setprop media.stagefright.enable-player=false
setprop media.stagefright.enable-meta=false
setprop media.stagefright.enable-scan=false
setprop media.stagefright.enable-http=false
echo Stagefright player disabled.
fi
}
megatron(){
cp /sdcard/openOptimus_resources/Megatron/bootanimation.zip /data/local
echo Boot animation copied.
}
particles(){
cp /sdcard/openOptimus_resources/Particles/bootanimation.zip /data/local
echo Boot animation copied.
}
cyan7(){
cp /sdcard/openOptimus_resources/CM7/bootanimation.zip /data/local
echo Boot animation copied.
}
coin(){
cp /sdcard/openOptimus_resources/Coin/bootanimation.zip /data/local
echo Boot animation copied.
}
boot(){
echo *********************************************************
echo * Boot animation changer *
echo *********************************************************
echo Please choose one:
echo 1.Megatron boot animation
echo 2.Android particles
echo 3.CyanogenMod 7
echo 4.Coin
read megatron
read particles
read cyan7
read coin
if test "$megatron" == "1"
then megatron
fi
if test "$particles" == "2"
then particles
fi
if test "$cyan7" == "3"
then cyan7
fi
if test "$coin" == "4"
then coin
fi
}
tx(){
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
fi
}
sf(){
echo *********************************************************
echo *stagefright player enabler/disabler *
echo *********************************************************
echo Please choose an option:
echo 1.Enable Stagefright player
echo 2.Disable stagefright player
read sfon
read sfoff
if test "$sfon" == "1"
then sfon
fi
if test "$sfoff" == "2"
then sfoff
fi
}
sf(){
echo *********************************************************
echo * Hardware acceleration enabler/disabler *
echo *********************************************************
echo
echo Please choose an option:
echo 1.Enable Hardware acceleration
echo 2.Disable Hardware acceleration
read hwon
read hwoff
if test "$hwon" == "1"
then hwon
fi
}
if test "$hwoff" == "2"
then hwoff
fi
}
main_menu(){
echo *********************************************************
echo * Welcome to openOptimus modding script! *
echo *********************************************************
echo Choose an option:
echo 1.Change boot animation
echo 2.Disable/enable Stagefright player
echo 3.Enable/disable Hardware acceleration
echo 4.Check Wi-Fi Tx-Power
echo 5.Exit
read boot
read sf
read hw
read tx
read exit
if test "$boot" == "1"
then boot
fi
if test "$sf" == "2"
then sf
fi
if test "$hw" == "3"
then hw
fi
if test "$tx" == "4"
then tx
fi
}
if test "$exit" == "5"
then exit
fi
}
Edit: For some strange reason it suddenly works after posting this topic.. :') Delete please
Ok so this is the deal, I'm currently working on broodKernel v1.2 (yes not 1.1 but 1.2) and I've noticed that sysctl.conf isn't loaded in any way, I tried loading it with "sysctl -p" and also with su -c "sysctl -p", both tried it in the kernel itself and in init.d scripts, for some reason it doesn't load on boot, but when I load it myself with "su -c "sysctl -p" it works correctly :silly:
mode is: 644, also tried to chown it to system and/or root, both didn't work. then I question myself. is my init.d method correct? Is it running in root mode? I use this:
Code:
service initd /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
oneshot
doesn't it need a "user root" at the bottom?, I feel kinda like this emoticon ":silly:" to ask such question, but I really don't know why it's not running correctly, anyhow the sysctl values from the latest thunderbolt seem so unrealistic?:
Code:
vm.dirty_expire_centisecs = 3000
vm.dirty_writeback_centisecs = 500
But ok that's the thunderbolt settings, also I'm not sure if this really improves the system, I've noticed that the first few benchmarks score pretty high but then suddenly the sdcard read/write speed gets screwed by something.
Anyway, here are the scripts (so far):
/system/etc/init.d/00broodkernel:
Code:
#!/system/bin/sh
# Created by broodplank1337
# broodKernel v1.2
# =================================== #
# broodKernel v1.2 Configuration File #
# =================================== #
# =================================== #
# >>> Available Settings <<< #
# =================================== #
#
# - Set I/O Scheduler
# - Set SDCARD Readahead
# - Enable/Disable Error Reporting
# - Enable/Disable sysctl.conf file
# - See 01screenstatescaling for (advanced) CPU Settings / Tweaks
#
# =================================== #
# =================================== #
#
# >>> I/O Scheduler <<<
#
SCHEDULER="noop"; # noop/cfq
#
# =================================== #
#
# >>> Set SDCard Read Ahead <<<
#
SDCARDREADAHEAD="1024"; # 128/256/512/1024/2048/3072/4096
#
# =================================== #
#
# >>> Google Error Reporting <<<
#
ERRORREPORTING="disabled"; # enabled/disabled
#
# =================================== #
#
# >>> Sysctl.conf Support <<<
#
SYSCTLSUPPORT="enabled"; # enabled/disabled
#
# =================================== #
# Execute Settings:
echo $SCHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SCHEDULER > /sys/block/mmcblk1/queue/scheduler
# Error Reporting
if [[ "$ERRORREPORTING" == "enabled" ]]
then
setprop profiler.force_disable_err_rpt 0
setprop profiler.force_disable_ulog 0
setprop ro.config.nocheckin 0
else
setprop profiler.force_disable_err_rpt 1
setprop profiler.force_disable_ulog 1
setprop ro.config.nocheckin 1
fi;
# Sysctl.conf
if [[ "$SYSCTLSUPPORT" == "enabled" ]]
then
sysctl -p
else
busybox mv /system/etc/sysctl.conf /system/etc/sysctl.conf.disabled
fi;
# Readahead
echo $SDCARDREADAHEAD > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "256" > /sys/devices/virtual/bdi/179:32/read_ahead_kb;
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb;
/system/etc/init.d/01screenstatescaling: (really like this one )
Code:
#!/system/bin/sh
# Credits to pikachu01 and FloHimself for governor tweaks / screenstatescaling script
# Edited by broodplank1337 to fit broodKernel v1.2
# Mount
mount -o remount rw /system
# =====================================================================================
# >>> broodKernel v1.2 CPU Configuration File / Screenstatescaling Script >>> #
# =====================================================================================
# >>> Notes <<<
#
# - This script manages the cpu settings for awake and sleep state.
# - Be sure not to set the max frequency lower then the min frequency.
# - Please only use existing governors to prevent boot problems.
# - Additional governor tweaks can be enabled for a better battery life,
# the governor tweaks may lower performance (only theoretical, like cpu score in Antutu)
# - You can choose to use this file only for CPU Settings,
# this will modify the /system/etc/init.qcom.post_boot.sh file to not set a governor,
# when enabled and 01screenstatescaling is absent, your system will not boot properly
# settings can be restored by place this line:
# =====================================================================================
# >>> Basic CPU Settings <<< # Please only use the values below as settings
# =====================================================================================
# Awake CPU Settings
AWAKE_GOVERNOR="ondemand"; # ondemand/performance/conservative/userspace
MIN_SPEED_AWAKE="245760"; # 122880/245760/368640
MAX_SPEED_AWAKE="1401600"; # 768000/806400/1024000/1200000/1401600
# Sleep CPU Settings
SLEEP_GOVERNOR="ondemand"; # ondemand/conservative/powersave
MIN_SPEED_SLEEP="122880"; # 122880/245760/368640
MAX_SPEED_SLEEP="245760"; # 122880/245760/368640
# Governor Tweaks
ENABLE_ONDEMAND_TWEAKS="no"; # yes/no
ENABLE_CONSERVATIVE_TWEAKS="no"; # yes/no
# =====================================================================================
# =====================================================================================
# >>> Advanced CPU Settings << # Use at own risk, don't change if inexperienced.
# =====================================================================================
# Use 01screenstatescaling as primary CPU Management script
DISABLE_POSTBOOT_CPU="no"; # yes/no (only enable if you know what you're doing!)
# =====================================================================================
# Execute Settings
# Disable Postboot CPU Management
if [[ "$DISABLE_POSTBOOT_CPU" == "no" ]]
then
if [ -e /system/etc/init.qcom.post_boot.sh.bak ]; then
busybox cp -f /system/etc/init.qcom.post_boot.sh.bak /system/etc/init.qcom.post_boot.sh
else
sleep 1
fi;
else
if [ -e /system/etc/init.qcom.post_boot.sh.bak ]; then
sleep 1
else
busybox cp -f /system/etc/init.qcom.post_boot.sh /system/etc/init.qcom.post_boot.sh.bak
sed '33d' /system/etc/init.qcom.post_boot.sh > /sdcard/temp.sh # Remove line that sets governor
busybox mv -f /sdcard/temp.sh /system/etc/init.qcom.post_boot.sh
chmod 644 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
fi;
fi;
# Ondemand Tweaks
if [[ "$ENABLE_ONDEMAND_TWEAKS" == "yes" ]]
then
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold ]; then
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo "5" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/down_differential;
#echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/io_is_busy;
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_down_factor;
echo "100000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
fi;
if [ -e /sys/devices/system/cpu/cpufreq/ondemand/up_threshold ]; then
echo "95" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold;
echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential;
#echo "0" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy;
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor;
echo "100000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate;
fi;
else
sleep 1
fi;
# Conservative Tweaks
if [[ "$ENABLE_CONVERVATIVE_TWEAKS" == "yes" ]]
then
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold ]; then
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold;
echo "90" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/down_threshold; # 35 # 12 # 30 (higher will lead to noticable lags) # 35 # screen off: # 50 ## 35
echo "20" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/freq_step; # more aggressive ramping up (50) # screen off: # 10
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_down_factor;
echo "100000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate;
fi;
if [ -e /sys/devices/system/cpu/cpufreq/conservative/up_threshold ]; then
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold;
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold; # 35 # 12 # 30 (higher will lead to noticable lags) # 35 # screen off: # 50 ## 35
echo "20" > /sys/devices/system/cpu/cpufreq/conservative/freq_step; # more aggressive ramping up (50) # screen off: # 10
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor;
echo "100000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate;
fi;
else
sleep 1
fi;
# Screenstatescaling loop
(while [ 1 ];
do
# ==============================================================
# settings for while the screen is on / usage
# ==============================================================
AWAKE=`cat /sys/power/wait_for_fb_wake`;
if [ $AWAKE = "awake" ]; then
sleep 2
log -p i -t screenstate_scaling "State: Awake, switching CPU governor to -> $AWAKE_GOVERNOR"
echo $AWAKE_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $MIN_SPEED_AWAKE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $MAX_SPEED_AWAKE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
fi;
# ==============================================================
# settings for while the screen is off
# ==============================================================
SLEEPING=`cat /sys/power/wait_for_fb_sleep`;
if [ $SLEEPING = "sleeping" ]; then
sleep 2
log -p i -t screenstate_scaling "State: Sleeping, switching CPU governor to -> $SLEEP_GOVERNOR"
echo $SLEEP_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $MIN_SPEED_SLEEP > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $MAX_SPEED_SLEEP > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
fi;
done &);
/system/etc/sysctl.conf:
Code:
vm.page-cluster = 3
vm.laptop_mode = 0
vm.dirty_expire_centisecs = 3000
vm.dirty_writeback_centisecs = 500
vm.dirty_background_ratio = 40
vm.dirty_ratio = 80
vm.vfs_cache_pressure = 10
vm.overcommit_memory = 1
vm.oom_kill_allocating_task = 0
vm.min_free_kbytes = 4096
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_dsack = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_moderate_rcvbuf = 1
kernel.sem = "500 512000 100 2048"
kernel.shmmax = 268435456
kernel.msgmni = 1024
I found a script that adds boot audio. In it there is a line calling stagefright, stagefright either doesn't exist on my ROM and I have no clue as to add it. Here is the script in question which I don't know the original author however lithid from http://forum.cyanogenmod.org did some work on it and was close to creating a updater-script. Please Help Me as I know some scripting but not a lot
PS I was advised to ask this question to the devs by a cyanogenmod.org mod named bassmadrigal
Code:
#!/system/bin/sh
#I just made this into a script this was from a post on XDA by spiicytuna
#http://forum.xda-developers.com/showpost.php?p=8274824&postcount=2
#Please give the credit to him not me.
echo "preparing system..."
#Setting up the system for read/write access
mount -o remount,rw /system
#linking busybox mkdir (broken in rc2)
rm /system/bin/mkdir
ln -s /system/xbin/mkdir /system/bin/mkdir
mkdir -p /data/local/boot
echo "checking for previous bootsound installation..."
if [ -e /system/bin/bootsound ];
then
echo "bootsound already enabled, exiting.."
mount -o remount,ro /system
exit
fi
if [ "`ls /sbin|grep -q recovery;echo $?`" = "0" ];
then
mount -a > /dev/null
recoverymode=y
else
mount -o rw,remount /system
recoverymode=n
fi
echo "preparing startup scripts..."
#This is to create the needed scripts in init.local.rc
echo '' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo '###Bootsound - Safe to Delete: Start ###' >> /system/etc/init.local.rc
echo "" >> /system/etc/init.local.rc
echo 'service bootsound /system/bin/bootsound' >> /system/etc/init.local.rc
echo ' user media' >> /system/etc/init.local.rc
echo ' group audio' >> /system/etc/init.local.rc
echo ' disabled' >> /system/etc/init.local.rc
echo ' oneshot' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo 'on property:init.svc.bootanim=running # to correct timin' >> /system/etc/init.local.rc
echo ' start bootsound' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo 'on property:dev.bootcomplete=1' >> /system/etc/init.local.rc
echo ' stop bootsound' >> /system/etc/init.local.rc
echo '### Bootsound - Safe to Delete: End ###' >> /system/etc/init.local.rc
echo "creating script for bootsound in /system/bin..."
echo '#Now creating the bootsound script'
touch /system/bin/bootsound
echo '#!/system/bin/sh' >> /system/bin/bootsound
echo '' >> /system/bin/bootsound
echo 'bprop=/system/build.prop' >> /system/bin/bootsound
echo '' >> /system/bin/bootsound
echo 'play=$(cat $bprop | egrep -c -i -o ro.config.play.bootsound=1)' >> /system/bin/bootsound
echo 'if [ "$play" = "1" ]; then' >> /system/bin/bootsound
echo ' stagefright -a -o /system/media/android_audio.mp3' >> /system/bin/bootsound #this is the line that breaks the code
echo 'fi' >> /system/bin/bootsound
echo 'exit 0' >> /system/bin/bootsound
#Changing some permissions
chmod 777 /system/bin/bootsound
chown root:shell /system/bin/bootsound
echo '' >> /system/build.pro
echo 'ro.config.play.bootsound=1' >> /system/build.prop
echo 'media.stagefright.enable-player=true' >> /system/build.prop
echo 'media.stagefright.enable-meta=true' >> /system/build.prop
echo 'media.stagefright.enable-scan=true' >> /system/build.prop
echo 'media.stagefright.enable-http=true' >> /system/build.prop
#removed self-destruct, script checks for previous install
sleep 1
mount -o ro,remount /system
echo "done."
exit
ethan_hines said:
I found a script that adds boot audio. In it there is a line calling stagefright, stagefright either doesn't exist on my ROM and I have no clue as to add it. Here is the script in question which I don't know the original author however lithid from http://forum.cyanogenmod.org did some work on it and was close to creating a updater-script. Please Help Me as I know some scripting but not a lot
PS I was advised to ask this question to the devs by a cyanogenmod.org mod named bassmadrigal
Click to expand...
Click to collapse
Not sure if this works , but I will eventually try it , but not now , on my free time.
stagefright indeed is not included , my phone too doesn't have stagefright , if you go to youtube and search for android developement tutorials by "thenewboston" . you'll find 200 videos series , just watch the first 20 ones and you'll learn to use Media which replaces stagefright...I didn't try it yet.
It includes
Our_Player and Media Player and the directory of the song....check it out and give us heads ups!
thethiny said:
Not sure if this works , but I will eventually try it , but not now , on my free time.
stagefright indeed is not included , my phone too doesn't have stagefright , if you go to youtube and search for android developement tutorials by "thenewboston" . you'll find 200 videos series , just watch the first 20 ones and you'll learn to use Media which replaces stagefright...I didn't try it yet.
It includes
Our_Player and Media Player and the directory of the song....check it out and give us heads ups!
Click to expand...
Click to collapse
I appreciate the info, I took a look at his tutorials esp the ones involving animation, he really knows his stuff. I am not a Java programmer by any means and to be honest I find it quite tedious, it's like trying to teach a baby (this case the Dalvik VM) to do basic stuff like draw a green ball took like 20 lines of code!
What I need to know essentially is, do I have to use JAVA to get this to work now? In the past ie ICS and lower, there wasn't a problem with Custom Boot Audio, now with JB it seems it has disappeared from the radar.
I know the binary /system/bin/bootanimation (is this written in JAVA?, is there a source code for this bin?) is called at boot time by init.rc in the following manner:
Code:
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
/system/bin/bootanimation (at least from what I gather) looks in /system/media for bootanimation.zip (zipped in store mode) decompresses it , looks at desc.txt for the code and displays the animation png by png.
In some desc.txt there is an s line, example:
Code:
# mobility
p 1 0 SOUND
s transdroid.mp3
which is SUPPOSED TO call a custom boot audio from /system/media (.mp3?) at the same time. This appears not to work. So logicaly I think the binary needs some tweaking. Can you offer any suggestions?
As you can see I have spent ALLOT of time mulling over why this,one would think, simple task: display a series of images and play audio at boot time I mean how hard can that be?
I am not trying to be a pest I just need to know WHY this doesn't work in JB (CM10.1)
Finally got a new battery after over a year of not using my Droid 4.
Flashed latest CM13 nightly, 1.4ghz OC. Everything seems slow.
My 512mb ram single core $19 cheapo runs smoother.
Anything I do has a half-second or so delay, clean install with nothing running in the background.
Ideally I would just go back to some minimal 2.3.7 ROM, but compatiblity for new programs is getting iffy.
So, as of 2016, what has the smoothest ROM to do date been?
azkay said:
Finally got a new battery after over a year of not using my Droid 4.
Flashed latest CM13 nightly, 1.4ghz OC. Everything seems slow.
My 512mb ram single core $19 cheapo runs smoother.
Anything I do has a half-second or so delay, clean install with nothing running in the background.
Ideally I would just go back to some minimal 2.3.7 ROM, but compatiblity for new programs is getting iffy.
So, as of 2016, what has the smoothest ROM to do date been?
Click to expand...
Click to collapse
I'm running very, very debloated, overclocked stock JB 4.1.2 with Greenify and ram manager and it works pretty well. Even most of new games and emulators rund good.
Cyanogenmod 11 is quite good. One thing I noticed is that the virtual ROM slots are extremely slow, due to the loopback devices.
One way to go is to install the ROM to the virtual ROM slots to test if they are working correctly and then install it into stock slot for real use.
Up, same question here
I use cm11 or cm12 (i find cm13 extremely slow) But with the following tweaks made from my daily experience feel free to try it
Add those lines on boot
swapoff /dev/block/zram0
echo 1 > /sys/block/zram0/reset
#
# setting zram size to 140 mb
echo 396286400 > /sys/block/zram0/disksize
#
# making zram swapable
mkswap /dev/block/zram0
#
# starting swap on zram
swapon /dev/block/zram0
sysctl -w vm.overcommit_ratio=2
sysctl -w vm.swappiness=100
sysctl -w vm.vfs_cache_pressure=70
swapoff /dev/block/zram0
swapon /dev/block/zram0
echo "0" > /sys/kernel/mm/ksm/run
chmod 755 /sys/kernel/dyn_fsync/Dyn_fsync_active
echo "1" > /sys/kernel/dyn_fsync/Dyn_fsync_active
#----------------------------------I/O------------------------------------
A=`ls -d /sys/block/mmcblk1` ;
B=`ls -d /sys/block/mmcblk0` ;
C=`ls -d /sys/block/mmcblk0/mmcblk0boot0` ;
D=`ls -d /sys/block/mmcblk0/mmcblk0boot1` ;
E=`ls -d /sys/block/mmcblk1/mmcblk0boot0` ;
F=`ls -d /sys/block/mmcblk1/mmcblk0boot1` ;
for i in $A $B $C $D $E $F;
do
chmod 755 $i/queue/scheduler
echo "sioplus" > $i/queue/scheduler
echo "16" > $i/queue/iosched/fifo_batch;
echo "1048576" > $i/queue/iosched/back_seek_max;
echo "128" > $i/queue/nr_requests;
echo "1" > $i/queue/add_random;
echo "1" > $i/queue/iosched/back_seek_penalty;
echo "1" > $i/queue/rq_affinity;
echo "3" > $i/queue/iosched/writes_starved;
echo "16" > $i/queue/iosched/quantum;
echo "0" > $i/queue/rotational
echo "1" > $i/queue/iostats
echo "500" > $i/queue/iosched/read_expire;
echo "3000" > $i/queue/iosched/write_expire;
#---------------------------ReadAhead------------------------------
echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb #SD CARD
done
G=`ls -d /sys/class/bdi/7:0` ;
H=`ls -d /sys/class/bdi/7:1` ;
I=`ls -d /sys/class/bdi/7:2` ;
J=`ls -d /sys/class/bdi/7:3` ;
L=`ls -d /sys/class/bdi/7:4` ;
M=`ls -d /sys/class/bdi/default` ;
N=`ls -d /sys/class/bdi/7:5` ;
O=`ls -d /sys/class/bdi/7:6` ;
P=`ls -d /sys/class/bdi/7:7` ;
for i in $G $H $I $J $L $M $N $O $P;
do
chmod 755 $i/read_ahead_kb
echo "512" > $i/read_ahead_kb
echo "512" > /sys/class/bdi/default/read_ahead_kb
done
echo "512" > /sys/class/bdi/253:0/read_ahead_kb
#----------------------------------I/O--FOR SD AND INTERNAL----------------------------------
AA=`ls -d /sys/block/mmcblk1` ;
BB=`ls -d /sys/block/mmcblk0` ;
for i in $AA $BB;
do
chmod 755 $i/queue/scheduler
echo "sioplus" > $i/queue/scheduler
echo "0" > $i/queue/rotational
echo "16" > $i/queue/iosched/quantum;
echo "1048576" > $i/queue/iosched/back_seek_max;
echo "1" > $i/queue/rq_affinity;
echo "1" > $i/queue/iosched/back_seek_penalty;
echo "256" > $i/queue/nr_requests;
echo "1" > $i/queue/add_random;
echo "16" > $i/queue/iosched/fifo_batch;
echo "3" > $i/queue/iosched/writes_starved;
#echo "1" > $i/queue/iosched/quantum;
echo "1" > $i/queue/iostats
echo "500" > $i/queue/iosched/read_expire;
echo "3000" > $i/queue/iosched/write_expire;
done
sysctl -w kernel.panic_on_oops=0
#sysctl -w vm.min_free_kbytes=3774
sysctl -w vm.vfs_cache_pressure=70
sysctl -w vm.swappiness=100
sysctl -w vm.drop_caches=0
sysctl -w vm.min_free_kbytes=3774
sysctl -w vm.page-cluster=3
#setsd speeds
chmod 666 /sys/block/mmcblk0/queue/read_ahead_kb
echo "512" > /sys/block/mmcblk0/queue/read_ahead_kb
chmod 666 /sys/block/mmcblk1/queue/read_ahead_kb
echo "512" > /sys/block/mmcblk1/queue/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
######sd card
chmod 666 /sys/devices/virtual/bdi/179:24/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:16/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:16/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:8/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:8/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:32/read_ahead_kb
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo "1300000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo "1200000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 2 > /sys/devices/system/cpu/cpufreq/interactive/boost
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 70 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 300000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 60 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chmod 666 /sys/module/lowmemorykiller/parameters/minfree
echo '7936,16384,37120,57088,58880,65536' > /sys/module/lowmemorykiller/parameters/minfree
giannhs_n said:
I use cm11 or cm12 (i find cm13 extremely slow) But with the following tweaks made from my daily experience feel free to try it
Add those lines on boot
Click to expand...
Click to collapse
Thank you man, this script made my droid 4 a whole lot more responsive and it does not reboot every few hours anymore.
Quite a few commands in that script don't work, probably due to different paths (sio plus as io scheduler and stock rom boot slot), but those that work, really seem to help a lot.
Oh and you should update the comment in that script about the zram size.
Milp said:
Thank you man, this script made my droid 4 a whole lot more responsive and it does not reboot every few hours anymore.
Quite a few commands in that script don't work, probably due to different paths (sio plus as io scheduler and stock rom boot slot), but those that work, really seem to help a lot.
Oh and you should update the comment in that script about the zram size.
Click to expand...
Click to collapse
Was testing on different Kernels that's why the paths are wrong.. Please replace the sio plus with cfq or bfq (i forgot to change that)
I am glad that those tweaks help you
Regards john
What about this one? Mentor's ROM http://forum.xda-developers.com/showthread.php?t=2122709
That's what I found on my used Droid 4... should I give it a try?
giannhs_n said:
Was testing on different Kernels that's why the paths are wrong.. Please replace the sio plus with cfq or bfq (i forgot to change that)
I am glad that those tweaks help you
Regards john
Click to expand...
Click to collapse
why replace sio plus? I used bfq before, but when i googled for sio plus i only found people saying that sio plus was the best of them all.
Milp said:
why replace sio plus? I used bfq before, but when i googled for sio plus i only found people saying that sio plus was the best of them all.
Click to expand...
Click to collapse
If your kernel support sio plus, of course use it.. else cfq or bfq is a good alternative
giannhs_n said:
I use cm11 or cm12 (i find cm13 extremely slow) But with the following tweaks made from my daily experience feel free to try it
Add those lines on boot
swapoff /dev/block/zram0
echo 1 > /sys/block/zram0/reset
#
# setting zram size to 140 mb
echo 396286400 > /sys/block/zram0/disksize
#
# making zram swapable
mkswap /dev/block/zram0
#
# starting swap on zram
swapon /dev/block/zram0
sysctl -w vm.overcommit_ratio=2
sysctl -w vm.swappiness=100
sysctl -w vm.vfs_cache_pressure=70
swapoff /dev/block/zram0
swapon /dev/block/zram0
echo "0" > /sys/kernel/mm/ksm/run
chmod 755 /sys/kernel/dyn_fsync/Dyn_fsync_active
echo "1" > /sys/kernel/dyn_fsync/Dyn_fsync_active
#----------------------------------I/O------------------------------------
A=`ls -d /sys/block/mmcblk1` ;
B=`ls -d /sys/block/mmcblk0` ;
C=`ls -d /sys/block/mmcblk0/mmcblk0boot0` ;
D=`ls -d /sys/block/mmcblk0/mmcblk0boot1` ;
E=`ls -d /sys/block/mmcblk1/mmcblk0boot0` ;
F=`ls -d /sys/block/mmcblk1/mmcblk0boot1` ;
for i in $A $B $C $D $E $F;
do
chmod 755 $i/queue/scheduler
echo "sioplus" > $i/queue/scheduler
echo "16" > $i/queue/iosched/fifo_batch;
echo "1048576" > $i/queue/iosched/back_seek_max;
echo "128" > $i/queue/nr_requests;
echo "1" > $i/queue/add_random;
echo "1" > $i/queue/iosched/back_seek_penalty;
echo "1" > $i/queue/rq_affinity;
echo "3" > $i/queue/iosched/writes_starved;
echo "16" > $i/queue/iosched/quantum;
echo "0" > $i/queue/rotational
echo "1" > $i/queue/iostats
echo "500" > $i/queue/iosched/read_expire;
echo "3000" > $i/queue/iosched/write_expire;
#---------------------------ReadAhead------------------------------
echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb #SD CARD
done
G=`ls -d /sys/class/bdi/7:0` ;
H=`ls -d /sys/class/bdi/7:1` ;
I=`ls -d /sys/class/bdi/7:2` ;
J=`ls -d /sys/class/bdi/7:3` ;
L=`ls -d /sys/class/bdi/7:4` ;
M=`ls -d /sys/class/bdi/default` ;
N=`ls -d /sys/class/bdi/7:5` ;
O=`ls -d /sys/class/bdi/7:6` ;
P=`ls -d /sys/class/bdi/7:7` ;
for i in $G $H $I $J $L $M $N $O $P;
do
chmod 755 $i/read_ahead_kb
echo "512" > $i/read_ahead_kb
echo "512" > /sys/class/bdi/default/read_ahead_kb
done
echo "512" > /sys/class/bdi/253:0/read_ahead_kb
#----------------------------------I/O--FOR SD AND INTERNAL----------------------------------
AA=`ls -d /sys/block/mmcblk1` ;
BB=`ls -d /sys/block/mmcblk0` ;
for i in $AA $BB;
do
chmod 755 $i/queue/scheduler
echo "sioplus" > $i/queue/scheduler
echo "0" > $i/queue/rotational
echo "16" > $i/queue/iosched/quantum;
echo "1048576" > $i/queue/iosched/back_seek_max;
echo "1" > $i/queue/rq_affinity;
echo "1" > $i/queue/iosched/back_seek_penalty;
echo "256" > $i/queue/nr_requests;
echo "1" > $i/queue/add_random;
echo "16" > $i/queue/iosched/fifo_batch;
echo "3" > $i/queue/iosched/writes_starved;
#echo "1" > $i/queue/iosched/quantum;
echo "1" > $i/queue/iostats
echo "500" > $i/queue/iosched/read_expire;
echo "3000" > $i/queue/iosched/write_expire;
done
sysctl -w kernel.panic_on_oops=0
#sysctl -w vm.min_free_kbytes=3774
sysctl -w vm.vfs_cache_pressure=70
sysctl -w vm.swappiness=100
sysctl -w vm.drop_caches=0
sysctl -w vm.min_free_kbytes=3774
sysctl -w vm.page-cluster=3
#setsd speeds
chmod 666 /sys/block/mmcblk0/queue/read_ahead_kb
echo "512" > /sys/block/mmcblk0/queue/read_ahead_kb
chmod 666 /sys/block/mmcblk1/queue/read_ahead_kb
echo "512" > /sys/block/mmcblk1/queue/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
######sd card
chmod 666 /sys/devices/virtual/bdi/179:24/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:16/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:16/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:8/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:8/read_ahead_kb
chmod 666 /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo "512" > /sys/devices/virtual/bdi/179:32/read_ahead_kb
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo "1300000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo "1200000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 2 > /sys/devices/system/cpu/cpufreq/interactive/boost
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 70 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 300000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 60 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chmod 666 /sys/module/lowmemorykiller/parameters/minfree
echo '7936,16384,37120,57088,58880,65536' > /sys/module/lowmemorykiller/parameters/minfree
Click to expand...
Click to collapse
What am I supposed to do with these lines? And can somebody please explain what they are doing specifically?
I was trying to find a way to enable zram to cope with the small amount of memory. swap ram is an alternative, but i heard zram is faster and not stressing the storage like swap ram would.