GUIDE - Set cpu frequecies on MP-decision - Moto G General

I made a script to set frequencies on mp-decision frequency server.
Code:
#!/system/bin/sh
# available frequencies
# 300000
# 384000
# 600000
# 787200
# 998400
# 1094400
# 1190400
# mp-decision frequency setting
sleep 10
#min freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#max freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1190400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Copy this script to a file called 98mp-decisionfreq
To set frequency on boot, copy the file 98mp-decisionfreq to /system/etc/init.d/ and set permission to rwxr-xr-x. I use es-explorer to do this.
You can run this any time in terminal to change settings.
This script wil set cpufreq and change file permissions to read only (444) so it wil no be automatically overwritten, 644 is to set write acces to the file so that you can run the script again.
to remove frequency settings, delete the file 98mp-decisionfreq from init.d folder and reboot.
I have tested this on omnirom and it works for me. you can make it flashable zip wit zipme.

Related

[TOOL] Script CPU Monitor/Logging - what are my Tegra cores doing?

Hello fellow iconians. I have created a down and dirty shell script to log CPU percentage and clock speed to a text file during different activities so I could see what those tegra 2 cores were doing. Now that overclocking has come to our Iconias, folks are wondering "What are my CPU cores doing?" This script is simple and fairly easy to use. If you don't like it, feel free to change it, but please share your improvements in this thread so we can all benefit.
Click thanks if you find this useful.
Requirements: root access, busybox 1.18 or higher, and a terminal app
To use:
Copy the script file to a folder where you can assign execute permissions (i.e. /system)
Assign exec permissions to the script: $ chmod 777 getcpucurrinfo.sh
Run the script: $ ./getcpucurrinfo.sh
View the output from the terminal: $ cat /sdcard/getcpucurrinfo.txt
Delete the text log to get a clean start (it appends): $ rm /sdcard/getcpucurrinfo.txt
The output will look like this:
Code:
***Start logging to /sdcard/getcpucurrinfo.txt Mon Jun 27 23:17:27 EDT 2011
CPU0: 15% @ 1400000 MHz || CPU1: 06% @ 1400000 MHz
CPU0: 19% @ 1000000 MHz || CPU1: 07% @ 1000000 MHz
CPU0: 15% @ 1000000 MHz || CPU1: 05% @ 1000000 MHz
CPU0: 12% @ 1400000 MHz || CPU1: 05% @ 1400000 MHz
CPU0: 07% @ 1400000 MHz || CPU1: 03% @ 1400000 MHz
CPU0: 09% @ 1000000 MHz || CPU1: 07% @ 1000000 MHz
CPU0: 17% @ 1000000 MHz || CPU1: 09% @ 1000000 MHz
CPU0: 11% @ 1000000 MHz || CPU1: 06% @ 1000000 MHz
CPU0: 18% @ 1400000 MHz || CPU1: 10% @ 1400000 MHz
View attachment getcpucurrinfo.sh.zip (just the script, not recovery flash-able!):
MD5 (getcpucurrinfo.sh) = bb6a7219a904412307899adf14eadd56
Code:
#!/system/bin/bash
# getcpucurrinfo.sh
#
# What are my Android dual CPUs doing?
#
# _motley 2011
# based on a script posted by paul colby http://colby.id.au/node/39
# free to distribute and modify for your use, but please give credit.
#
# logs cpu info to /sdcard/getcpucurrinfo.txt
#
# Usage: $ ./getcpucurrinfo.sh
# Then check results: $ cat /sdcard/getcpucurrinfo.txt
#
# To install:
# 1-copy script file to a folder where you can assign execute permissions (i.e. /system)
# 2-assign exec permissions ( $ chmod 777 /system/getcpucurrinfo.txt )
# 3-requires bash and busybox 1.18 or higher
echo "Started logging to /sdcard/getcpucurrinfo.txt...press ctl+c to stop"
echo ***Start logging to /sdcard/getcpucurrinfo.txt `date` >> /sdcard/getcpucurrinfo.txt
PREV_TOTAL=0
PREV_IDLE=0
PREV_TOTAL1=0
PREV_IDLE1=0
while true; do
CPU=(`cat /proc/stat | grep '^cpu0 '`) # Get the total CPU statistics.
CPU1=(`cat /proc/stat | grep '^cpu1 '`)
unset CPU[0] # Discard the "cpu" prefix.
IDLE=${CPU[4]} # Get the idle CPU time.
unset CPU1[0] # Discard the "cpu" prefix.
IDLE1=${CPU1[4]} # Get the idle CPU time.
# Calculate the total CPU time.
TOTAL=0
for VALUE in "${CPU[@]}"; do
let "TOTAL=$TOTAL+$VALUE"
done
TOTAL1=0
for VALUE1 in "${CPU1[@]}"; do
let "TOTAL1=$TOTAL1+$VALUE1"
done
# Calculate the CPU usage since we last checked.
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
let "DIFF_IDLE1=$IDLE1-$PREV_IDLE1"
let "DIFF_TOTAL1=$TOTAL1-$PREV_TOTAL1"
let "DIFF_USAGE1=(1000*($DIFF_TOTAL1-$DIFF_IDLE1)/$DIFF_TOTAL1+5)/10"
# Output to text file
echo "CPU0: `printf "%02d" $DIFF_USAGE`% @ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` MHz || CPU1: `printf "%02d" $DIFF_USAGE1`% @ `cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq` MHz" >> /sdcard/getcpucurrinfo.txt
# Remember the total and idle CPU times for the next check.
PREV_TOTAL="$TOTAL"
PREV_IDLE="$IDLE"
PREV_TOTAL1="$TOTAL1"
PREV_IDLE1="$IDLE1"
# Wait before checking again.
sleep 1
done

Build.prop / scripts

Originally by knzo, I have tried many on my phone and thought I should share with my fellow streakers...
On my ROMs adventure I've been collecting some tweaks and scripts and seems to me it's now time to share it. While some values in terms of optimization might fluctuate from device to device, I've found these pretty consistent throughout many.
Build.prop
(edit your /system/build.prop with a file manager with root access)
Careful for already existing settings. In this case, just change the values.
1. Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=48m
4. Render UI with GPU
Code:
debug.sf.hw=1
5. Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
7. Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
9. Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
13. Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
Code:
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
18. Miscellaneous flags
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
19. Specifics to some LG devices
Code:
persist.service.pcsync.enable=0
persist.service.lgospd.enable=0
user.feature.flex=true
user.feature.lgdrm=false
user.feature.lgresource=false
user.feature.lgpoweroff=false
user.feature.ls_event=false
user.feature.ls_normal=false
user.feature.sui=false
Init.d
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
1. strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. internet speed tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3. vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
5. battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Auto-zipalign on boot
(needs zipalign bin)
Code:
[url]http://forum.xda-developers.com/showthread.php?t=860586[/url]
13. Loopy Smoothness tweak
Code:
[url]http://forum.xda-developers.com/showthread.php?t=1137554[/url]
[url]http://forum.xda-developers.com/showthread.php?t=1205744[/url]
14. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
15. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
16. OOM groupings and priorities tweaks - SuperCharger
Code:
[url]http://forum.xda-developers.com/showthread.php?t=991276[/url]
GPS.conf
(create or edit your /system/etc/gps.conf with a file manager with root access)
For improving GPS lock time and signal.
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Other tweaks or guidelines
1. Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
Code:
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
2. Use CyanogenMOD's APN list file - it's one of the most complete.
Code:
It's located in /system/etc/apns-conf.xml
3. Use UOT kitchen for basic theming on your device.
Code:
http://uot.dakra.lt/
4. Use Google's dns servers
Code:
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
5. Update Superuser and su binary to latest version (3.0 beta)
Code:
http://goo-inside.me/superuser/
6. Disable sync feature in sqlite
(author: ownhere - needs a source for your device so you can compile the /system/lib/libsqlite.so)
Code:
Patch file here: http://forum.xda-developers.com/showthread.php?t=903507
7. Do not use task killers.
Alright, I think this is it for now.
If you have any other tweaks or better values, you can PM me and I'll include them.
Edit: took out quote for easier copy-paste ability.
Sent from my Dell Streak using xda premium
nice awesome tweak values there
i'll try it soon
thanks for the tips my friend
WOW!!! Nice going! keep them coming.
scripts
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
gazza35 said:
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
Click to expand...
Click to collapse
System.prop is something completely differenr...the build.prop file is in the system folder.
Sent from my Dell Streak using xda premium
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
chuuw33 said:
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
Click to expand...
Click to collapse
Which rom are you using? I know many gb roms have had wifi reconnection problems...
Sent from my Dell Streak using xda premium
backcover sensor
Is there any way to stop dell streak to shut down when remove back cover?
Its a kernel hack, unfortunately. DJSteve's Streakdroid and DSC are the only ones I know of that have this.
beginner said:
Is there any way to stop dell streak to shut down when remove back cover?
Click to expand...
Click to collapse
Just answered in this thread..its a lever under the plate... http://forum.xda-developers.com/showthread.php?t=1393650
Sent from my Dell Streak using xda premium
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Wow, blast from the past! You're
gianmaxfactor said:
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Click to expand...
Click to collapse
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
smnc said:
Wow, blast from the past! You're
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
Click to expand...
Click to collapse
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
gianmaxfactor said:
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
Click to expand...
Click to collapse
I'll assume we have a language barrier here and that you weren't being intentionally disrespectful.
1) You posted in a thread that has been dead for 11 years+, for a specific device that has been out of production for just as long. Expecting any response should have been a long-shot, but expecting a non-device-specific response is just odd. The only reason I saw your post was because by sheer dumb luck, I happened to have notifications turned on for this thread from way back then.
2) While read_ahead_kb may be a "generic setting", storage device paths such as /sys/devices/virtual/bdi/179:0/ are not. Different Android/Linux/Unix devices, and even differnt builds for the same device may arrange storage devices in different configurations, so finding out the path for the internal storage on a Dell Streak 5 running Android Gingerbread will likely not apply to whatever device you're working on.
3) The actual read-ahead cache size from a 12-year-old device is not likely to be useful on a modern device as storage technology and speeds have changed dramatically since then.
Perhaps if you posted in a general channel, or one specific to your device, someone might be able to give you more useful information fort whatever your project is.
Hopefully that helps you.

Easiest way to oc without SetCPU?

I have only had my Xoom for a few days so its a new learning curve atm
I have the US MZ604 OTA ICS installed and Rogue 2.0.2 "Kuma" Kernel
After i have decided my stable clocks
whats the easiest way to add these and to undervolt
without any external apps
on my phone its a simple case of adding lines to
/etc/initqcom.post_boot.sh
like so
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 30 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/down_differential
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 672000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
What's your aversion to SetCPU?
It makes it really easy to OC/UV.
Sent from my Xoom using xda premium
If you want to know what files to modify take a look through the EOS gerrit review site and look for what files they tweak for overclocking the xoom. If you're just trying to save a buck you can get setcpu for free on xda. There is no reason not to use an app to test frequencies before making changes to boot options that can boot loop your device.
I dont like having processes running that are un needed
if im going to be running at 1.5ghz 24/7
why not have it set from the get go to 1.5ghz
instead of having a background process do it post boot
d3athsd00r said:
What's your aversion to SetCPU?
It makes it really easy to OC/UV.
Sent from my Xoom using xda premium
Click to expand...
Click to collapse
ShonkUK said:
I dont like having processes running that are un needed
if im going to be running at 1.5ghz 24/7
why not have it set from the get go to 1.5ghz
instead of having a background process do it post boot
Click to expand...
Click to collapse
Unless you're using setcpu profiles (which I don't reccomend), there should be no constant process running.
It runs as a background process on every boot if oc on boot is enabled
I have been having a sniff around the firmware it seems to be
/init.stingray.rc
# Power Management Settings
#write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
# timer 20ms, min sample 80ms, go max at 80%
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 80000
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 80
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# No need to continuously scan w1 bus
write /sys/devices/w1\ bus\ master/w1_master_search 1
# Disable charging LED
write /sys/class/gpio/gpio168/value 1
its in the boot.img..
i will setup something in init.d
echo 1504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1504000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
is the command
umm init.d is broken on kuma 2.02 doh
here's how to fix it for anyone who wants to do this
To fix rogue_XM-kernel-2.0.2-kuma init.d support
extract sysinit from rogue_XM-kernel-2.0.2-kuma.zip to c:\
adb remount rw
adb push c:\sysinit /system/bin/
adb shell
chmod 755 /system/bin/sysinit
chgrp 2000 /system/bin/sysinit
any script you put in /system/etc/init.d/01oc for example
will run on boot
here's my 01oc file
#!/system/bin/sh
# overclock that *****
echo 1504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1504000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# enable charging light while device is on
chmod 777 /sys/devices/virtual/gpio/gpio168/value
echo 0 > /sys/devices/virtual/gpio/gpio168/value
# sd card write access
umount /mnt/external1
mount -t vfat -o fmask=0000,dmask=0000,rw /dev/block/platform/sdhci-tegra.2/mmcblk0p1 /mnt/external1
then
adb remount rw
adb push c:\01oc /system/etc/init.d/
adb shell
chmod 755 /system/etc/init.d/01oc
I thought when you said "easiest", you mean easy. Not how to do it by the hard way.
You should be asking how to do without third-party applications.
Hardcoding the OC is a bad idea. If something goes wrong, you can get locked out of your device, or have to fiddle through recovery to fix it. That's where a tool that runs at startup can save your bacon and also make thing "easiest" (which is what you are after), as it will automatically revert to default clock if the last shutdown wasn't done cleanly.
Well its not really hard is it
its a 3 line script for init.d
if it wasnt for the fact that init.d was broken on kuma
and i had to find out the method of oc
it would have been done in two mins
navossoc said:
I thought when you said "easiest", you mean easy. Not how to do it by the hard way.
You should be asking how to do without third-party applications.
Click to expand...
Click to collapse

[MOD][GUIDE]tweak collections for build.prop/init.d

1 i DIDNT made this all tweaks ... Credit goes to their Developers...
I am not responsible for your bricked phone/sd if u pointed on me i will laugh at u
Forever king Tweaks....​
Build.prop tweaks​
1 VM Heapsize; higher the RAM
Code:
dalvik.vm.heapsize=48m
2 Good JPG quality
Code:
ro.media.enc.jpeg.quality=100
3 Render UI with GPU
Code:
debug.sf.hw=1
4 Best Scrolling
Code:
windowsmgr.max_events_per_sec=150
5 Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6 battery Saving
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
7 Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
8 Increase touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
9 Awesome photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
10 Network tweaks
Code:
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
11 Internet fast tweaks
Code:
net.tcp.buffersize.default=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.wifi=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.umts=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.gprs=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.edge=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.hspa=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.hsdpa=6144,87380,1048576,6144,87380,1048576
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576
12 Fix some application issues (FC)
ro.kernel.android.checkjni=0
13 Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
14 Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
15 faster streaming
Code:
media.stagefright.enable-meta=true
media.stagefright.enable-record=false
16 Miscellaneous Tweaks for performance
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
17 Use Google DNS
Code:
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
Init.d tweaks​
(needs ROM with init.d access and busybox, open empty file, insert header "#!/system/bin/sh" and put these there, save in /system/etc/init.d and name it something like tweak1)
1 strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2 internet speed hack tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3 kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
4 vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
5 battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6 removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
7 increases cache size and increases speed
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8 SD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9 Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
10 Ondemand governor
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11 Governor Best: Minmax , SavagedZen , Smoothass , Smartass, Interactive
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12 Move dalvik-cache to cache partition
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
13 Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Other tweaks (not build.prop,init.d)​
1 v6 supercharger
Code:
http://forum.xda-developers.com/attachment.php?attachmentid=591730&d=1305000576
Credit- zeppelinrox
2 Use CyanogenMOD's APN list file (fully , for every operator)
Its in system>etc
3 Use uot kitchen for Theming your rom
Code:
http://uot.dakra.lt/
4 Never use Task killer............
please hit thanks and comment if you like this guide....if using in Rom proper credits to this guide!

Minfree script to /etc/init.d

Please script to /etc/init.d to set the minfree. I don't want any application, I want the script to autostart.
The script will be ok? I'm not asking about the value.
Code:
#!/system/bin/sh
#Created by hinxnz
#Set Minfree and Adj values
bb=$(find /system/ -name 'swapon')
if [ -n "$bb" ] && [ -e "$bb" ] ; then
bb=${bb%/*}
cd $bb
./busybox chmod 664 /sys/module/lowmemorykiller/parameters/minfree
./busybox echo "0,1,2,5,7,16" > /sys/module/lowmemorykiller/parameters/adj
./busybox chmod 444 /sys/module/lowmemorykiller/parameters/adj
./busybox chmod 664 /sys/module/lowmemorykiller/parameters/minfree
./busybox echo "9933,10728,14950,17510,20019,31385" > /sys/module/lowmemorykiller/parameters/minfree
./busybox chmod 444 /sys/module/lowmemorykiller/parameters/minfree
fi
Tell someone? The above and below are not working:
Code:
echo "0,1,2,5,7,15" > /sys/module/lowmemorykiller/parameters/adj
echo "5120,7680,11520,15360,20480,25600" > /sys/module/lowmemorykiller/parameters/minfree
This is the Nexus 7 2013 forum. I think you want this thread.
I know that this forum Nexus 7 2013. To him I need a script.
WSZR said:
I know that this forum Nexus 7 2013. To him I need a script.
Click to expand...
Click to collapse
Does the kernel you are using support init.d? What kernel?
If you have a kernel that supports it, is the perms set so it can execute? is it getting executed at all at startup?, maybe have it echo a value into a file to make sure it is getting executed. Does it execute and work if you run it manually?
I use ElementalX, supports init.d. BusyBox installed. In the terminal script "echo" works. Changing "minfree" in applications "Kernel Tweaker" works.
I can't verify startup. I tried the script from entering text into a blank file, not be made.
Code:
echo test > /data/data/file
In "init.d" is script to configure the kernel and perhaps to perform.
{
"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"
}
I don't know how to manage permissions in "init.d". File with the script I gave full permissions. A postscript of permissions must be before the script?
The script is executed:
Code:
#!/system/bin/sh
chmod 664 /data/data/file
echo test > /data/data/file
chmod 444 /data/data/file
I'll try to convert to "minfree".
WSZR said:
I use ElementalX, supports init.d. BusyBox installed. In the terminal script "echo" works. Changing "minfree" in applications "Kernel Tweaker" works.
I can't verify startup. I tried the script from entering text into a blank file, not be made.
Code:
echo test > /data/data/file
In "init.d" is script to configure the kernel and perhaps to perform.
I don't know how to manage permissions in "init.d". File with the script I gave full permissions. A postscript of permissions must be before the script?
Click to expand...
Click to collapse
I use the same kernel.
The script for minfree that you try to run from init.d, did you set the perms to 777 on it? It sounds like you have, but I am just making sure.
Have you tried appending the lines (from your post #2 above), to /etc/init.d/99elementalx to see if they get executed?
Something else to try:
Backup 99elementalx first, then try placing these lines in 99elementalx at the bottom, just above "exit 0". (This assumes you have the binary busybox in /system/xbin (you should, it's the proper place for it for this device), or a path that is in your $PATH environment.)
Code:
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "0,1,2,5,7,16" > /sys/module/lowmemorykiller/parameters/adj
chmod 444 /sys/module/lowmemorykiller/parameters/adj
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "9933,10728,14950,17510,20019,31385" > /sys/module/lowmemorykiller/parameters/minfree
chmod 444 /sys/module/lowmemorykiller/parameters/minfree
#test to see if executed
echo test > /sdcard/minfreetest.txt
Reboot, and see if there is the word test in /sdcard/minfreetest.txt.
If so, cat your minfree and adj files and see if they have your desired values.
mdamaged said:
I use the same kernel.
The script for minfree that you try to run from init.d, did you set the perms to 777 on it? It sounds like you have, but I am just making sure.
Have you tried appending the lines (from your post #2 above), to /etc/init.d/99elementalx to see if they get executed?
Something else to try:
Backup 99elementalx first, then try placing these lines in 99elementalx at the bottom, just above "exit 0". (This assumes you have the binary busybox in /system/xbin (you should, it's the proper place for it for this device), or a path that is in your $PATH environment.)
Code:
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "0,1,2,5,7,16" > /sys/module/lowmemorykiller/parameters/adj
chmod 444 /sys/module/lowmemorykiller/parameters/adj
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "9933,10728,14950,17510,20019,31385" > /sys/module/lowmemorykiller/parameters/minfree
chmod 444 /sys/module/lowmemorykiller/parameters/minfree
#test to see if executed
echo test /sdcard/minfreetest.txt
Reboot, and see if there is the word test in /sdcard/minfreetest.txt.
If so, cat your minfree and adj files and see if they have your desired values.
Click to expand...
Click to collapse
When added to 99elementalx script works.
Strange that in a separate file does not work, even though other scripts are running.
Thanks for your help.
WSZR said:
When added to 99elementalx script works.
Strange that in a separate file does not work, even though other scripts are running.
Thanks for your help.
Click to expand...
Click to collapse
Well try this.
Comment out those lines from 99elementalx and create a new file /etc/init.d/98minfree
Put the contents in it below:
Code:
#!/system/bin/sh
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "0,1,2,5,7,16" > /sys/module/lowmemorykiller/parameters/adj
chmod 444 /sys/module/lowmemorykiller/parameters/adj
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
echo "9933,10728,14950,17510,20019,31385" > /sys/module/lowmemorykiller/parameters/minfree
chmod 444 /sys/module/lowmemorykiller/parameters/minfree
#test to see if executed
echo newtest > /sdcard/minfreetest.txt
save it as /etc/init.d/98minfree ...then chmod it 777 (rwxrwxrwx), then reboot, and see if it worked.
If you have to leave it in 99elementalx to make it work, it will get wiped the next time you flash the kernel again. Alternatively, you can just forget init.d, and use tasker to execute the commands.

Categories

Resources