[MOD][JB][CM10.1][Build.prop] Mega BOOST - Version 1.4 [04.08.13] - Samsung Galaxy SL i9003

CM10.1 Mega BOOST​
{
"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"
}
* Better Battery
- Deep Sleep Mode
- Scans Wifi Less Frequently (Saves Battery)
* Image Quality Increased
* Streams Video Faster
* Better Touch Response
* Faster Reboot
* Instant Call
- No Delay In Receiving/Making Calls
* Faster Launcher
- No/Very Little Lag
- Forces Launcher Into Memory
* Fixes FC Issues With Some App’s
* Fixes “Black Screen” Issue After Call
- Screen Appears Almost Instantly After Pulling Phone Away From Face
* Audio & Video Quality Increased
* Signal Tweaks
* Download & Upload Speed Increased
* Dalvik VM Tweaks
* Loads App Faster
* Frees More RAM
* Overall Performance Increased
And Many More ...
Experimental Tweaks
To use experimental tweaks, simply remove "#" from the tweak you wish to use.
touch.pressure.scale=0.001
Improves Touch (Recommended)
ro.min_pointer_dur=8
Better Scrolling
ro.media.enc.hprof.vid.fps=65
Improves Media Quality
persist.sys.purgeable_assets=1
Frees up more RAM (Recommended)
persist.sys.use.dithering=1
Improves Screen Quality At The Cost Of Performance
debug.gr.swapinterval=0
Removes FPS Cap
debug.sf.nobootanimation=0
Disables Bootanimation
​
Version 1.4
Added More Experimental Tweaks
Modified Existing Tweaks
Added Performance Tweaks​
Version 1.3
Added More Tweaks
Added Experimental Tweaks​
Version 1.2
Proximity Tweaks
Dalvik VM Tweaks​
Version 1.1
Swap SDCards
More Responsiveness
Image Quality Ehnanced
Made some changes for better results​
Version 1.0
Initial Release​​​

1. Download The Latest Version
2. Go Into Recovery Mode
3. Flash the zip file
4. Clear Dalvik Cache
5. Reboot
​
Version 1.4
​
Version 1.3
​
Version 1.2
​
Version 1.1
​
Version 1.0
​​​

testing/flashing

Good job, but Android Tweaker make the same things ...

- Scans Wifi Less Frequently (Saves Battery) wifi.supplicant_scan_interval=180
Less can not? Value 300 or 600 is not effective?

Will this continue to work with Dhiru's Alpha 7
Just wanted to know if this will work with [ALPHA][ROM][4.2.2] CyanogenMod 10.1 for Samsung Galaxy SL - Alpha 7.

yogesh.p.mahajan said:
Just wanted to know if this will work with [ALPHA][ROM][4.2.2] CyanogenMod 10.1 for Samsung Galaxy SL - Alpha 7.
Click to expand...
Click to collapse
Yes!

TopDroid said:
Yes!
Click to expand...
Click to collapse
And with the brand new a8? Thank you!

Yes

Hi TopDroid.can you write specific rom can work with your build?thanks alot!

ndttung8487 said:
Hi TopDroid.can you write specific rom can work with your build?thanks alot!
Click to expand...
Click to collapse
I have tried it only on CM10.1 and will work on it only.

hi TopDroid. After flash v1.3 on A8 i saw that my phone doesn't goes too smooth as V1.2 on A7. it lags and i have to wipe dalvik cache so usual, ram memory usable is less than v1.2 on a7 too. Moreover, can you make transparent status bar or hidden status bar by cwm flash file? much appreciate and thank you.
P/S: apps and settings i use the same on A7, I did clean ddfl2 by odin, wipe and flash fresh A8 (original of Dhiru1602). Thank you.
Edit: I install fresh all apps, i do not back up and restore.

Use v1.2 if you find it better. Totally up to you!
For Hidden Status Bar - View Thread

Hi there. After i flash hidden on A8. My phone stuck at boot logo! Thanks alot for your work

NEW script for you bro
Hi @TopDroid to make your life easier
Here is a script to update the build.prob only !!!
to retain the information for each rom !!!
it works for all Roms and devices
benefit
Code:
show_progress(0.1, 0);
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("#*************************#");
ui_print("# #");
ui_print("# Mega Boost #");
ui_print("# Version 1.3 #");
ui_print("# ------------------ #");
ui_print("# #");
ui_print("# By TopDroid #");
ui_print("**************************#");
show_progress(0.100000, 0);
run_program("/sbin/busybox", "mount", "/system");
show_progress(0.100000, 40);
package_extract_file("topdroid.sh", "/tmp/topdroid.sh");
set_perm(0, 0, 0777, "/tmp/topdroid.sh");
run_program("/tmp/topdroid.sh");
delete("/tmp/topdroid.sh");
show_progress(0.100000, 70);
#set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/***");
show_progress(0.100000, 90);
#set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/***");
unmount("/system");
show_progress(0.100000, 100);
ui_print("Installation Completed *");
ui_print("Clear Dalvik cache");
ui_print("Reboot");
ui_print("");
Code:
#!/sbin/sh
busybox echo "" >> /system/build.prop
busybox echo "# TopDroid" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Faster Streaming" >> /system/build.prop
busybox echo "media.stagefright.enable-player=true" >> /system/build.prop
busybox echo "media.stagefright.enable-meta=true" >> /system/build.prop
busybox echo "media.stagefright.enable-scan=true" >> /system/build.prop
busybox echo "media.stagefright.enable-http=true" >> /system/build.prop
busybox echo "media.stagefright.enable-record=false" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Better Image & Audio Quality" >> /system/build.prop
busybox echo "ro.media.dec.jpeg.memcap=8000000" >> /system/build.prop
busybox echo "ro.media.enc.hprof.vid.bps=8000000" >> /system/build.prop
busybox echo "ro.media.enc.jpeg.quality=100" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Net Speed Tweaks" >> /system/build.prop
busybox echo "net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.hspa=4096,87380,256960,4096,163 84,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152" >> /system/build.prop
busybox echo "net.tcp.buffersize.hspda=4096,87380,256960,4096,16 384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Google DNS" >> /system/build.prop
busybox echo "net.ppp0.dns1=8.8.8.8" >> /system/build.prop
busybox echo "net.ppp0.dns2=8.8.4.4" >> /system/build.prop
busybox echo "net.dns1=8.8.8.8" >> /system/build.prop
busybox echo "net.dns2=8.8.4.4" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# No Delay In Making Call" >> /system/build.prop
busybox echo "ro.telephony.call_ring.delay=100" >> /system/build.prop
busybox echo "ring.delay=0" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Battery Tweaks" >> /system/build.prop
busybox echo "pm.sleep_mode=1" >> /system/build.prop
busybox echo "ro.ril.disable.power.collapse=0" >> /system/build.prop
busybox echo "ro.ril.fast.dormancy.rule=0" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Proximity Tweaks" >> /system/build.prop
busybox echo "ro.lge.proximity.delay=25" >> /system/build.prop
busybox echo "mot.proximity.delay=25" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# TopDroid" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Signal Tweaks" >> /system/build.prop
busybox echo "ro.ril.enable.amr.wideband=1" >> /system/build.prop
busybox echo "persist.cust.tel.eons=1" >> /system/build.prop
busybox echo "ro.config.hw_fast_dormancy=1" >> /system/build.prop
busybox echo "ro.ril.hsxpa=2" >> /system/build.prop
busybox echo "ro.ril.gprsclass=12" >> /system/build.prop
busybox echo "ro.ril.enable.dtm=1" >> /system/build.prop
busybox echo "ro.ril.hsdpa.category=8" >> /system/build.prop
busybox echo "ro.ril.enable.a53=1" >> /system/build.prop
busybox echo "ro.ril.enable.3g.prefix=1" >> /system/build.prop
busybox echo "ro.ril.htcmaskw1.bitmask=4294967295" >> /system/build.prop
busybox echo "ro.ril.htcmaskw1=14449" >> /system/build.prop
busybox echo "ro.ril.hsupa.category=6" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Better Responsiveness & Speed" >> /system/build.prop
busybox echo "windowsmgr.max_events_per_sec=260" >> /system/build.prop
busybox echo "ro.max.fling_velocity=12000" >> /system/build.prop
busybox echo "ro.min.fling_velocity=8000" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Dalvik VM Tweaks" >> /system/build.prop
busybox echo "dalvik.vm.dexopt-flags=v=n,o=v" >> /system/build.prop
busybox echo "dalvik.vm.execution-mode=int:jit" >> /system/build.prop
busybox echo "dalvik.vm.verify-bytecode=false" >> /system/build.prop
busybox echo "dalvik.vm.checkjni=false" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Fast Reboot" >> /system/build.prop
busybox echo "persist.sys.shutdown.mode=hibernate" >> /system/build.prop
busybox echo "ro.config.hw_quickpoweron=true" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "# Other Tweaks" >> /system/build.prop
busybox echo "ro.media.dec.aud.wma.enabled=1" >> /system/build.prop
busybox echo "ro.media.dec.vid.wmv.enabled=1" >> /system/build.prop
busybox echo "ro.mot.eri.losalert.delay=1000" >> /system/build.prop
busybox echo "ro.config.hwfeature_wakeupkey=0" >> /system/build.prop
busybox echo "ro.kernel.android.checkjni=0" >> /system/build.prop
busybox echo "ro.kernel.checkjni=0" >> /system/build.prop
busybox echo "persist.adb.notify=0" >> /system/build.prop
busybox echo "vm.stat_interval=1" >> /system/build.prop
busybox echo "persist.android.strictmode=0" >> /system/build.prop
busybox echo "profiler.force_disable_err_rpt=1" >> /system/build.prop
busybox echo "profiler.force_disable_ulog=1" >> /system/build.prop
busybox echo "ro.config.nocheckin=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "#" >> /system/build.prop
busybox echo "# Experimental Tweaks" >> /system/build.prop
busybox echo "#" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "#touch.presure.scale=0.001" >> /system/build.prop
busybox echo "#ro.min_pointer_dur=8" >> /system/build.prop
busybox echo "#ro.media.enc.hprof.vid.fps=65" >> /system/build.prop

what is the diferrent between Lolation's file and v1.3 of TopDroid?

ndttung8487 said:
what is the diferrent between Lolation's file and v1.3 of TopDroid?
Click to expand...
Click to collapse
lola file is just update the build.prop so it's work on All rom with 4.2.2 JB , And Topdroid file it's just replace Stock Alpha8 build.prop to new one so it's work only on A8 ..

LoLaTiOn said:
Hi @TopDroid to make your life easier
Here is a script to update the build.prob only !!!
to retain the information for each rom !!!
it works for all Roms and devices
Click to expand...
Click to collapse
Really nice script. But the reason I'm not using it is that your script will add the build.prop tweaks to the existing build.prop and mine will completely replace it. The problem with your script is that if the existing build.prop already has been tweaked, there may be a possibility of duplication and that can create problems.
I'm not being disrespectful but expressing my view.

With this tweak i face the same problem as turbo charge. Blacklist still vibrate and play ringtone even number was blocked.

10.2?

Related

[BASH SCRIPT][UPDATED] Governor Switch Scripts from the Command Line

UPDATE: Govswitch.sh has received an upgrade and it can now automagically generate an init.local.rc.new which can be used to set a governor on start up. It will also generate the chosen governor specific script and place it in the /system/bin folder. Thank you Duffkitty for the idea!
Original Post:
In the spirit of Open Source, I've written a couple of scripts that I wanted to share with the community. These are meant for advanced users familiar with the *nix command line. I didn't want to buy SetCPU (yes, I'm cheap ) so I decided to automate the process through the Bash shell language. For those interested, I've written a couple of Bash scripts that allow you to switch CPU governors via the command line. One script generates single instance scripts (one per governor) that can be used in conjunction with GScript for single click governor shortcuts. These single instance scripts are also ideal for changing the governor at boot. The other is command line only and prompts the user to choose from the available governors on the system.
I got tired of having to type it all out so I scripted the process. I just wanted to share with everyone else. I'm also planning to write a watch script that changes to the powersave governor automagically if the battery gets low.
I hope someone finds these scripts useful. Please let me know if anyone finds any errors in the scripts.
These scripts are offered under the terms of the GPLv2. Please see:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
You must have root to run these. Usage is detailed in the scripts.
Disclaimer:
You use this script at your own risk. There are no warranties or guarantees of functionality or safety implied or stated whatsoever.
If you do not know what this does, please do not use it.
Despite my harsh warning above, I've designed these scripts to be as failsafe as possible so that nothing is written if the user does not want changes or the governor being selected is already in use. I use these scripts all the time and I have tried to make them as user friendly as command line scripts can be.
Unzip the attached zip to your SD Card. It contains:
gpl-2.0.txt
Description: License file.
govscriptgen.sh
Description: This script generates a set of scripts, one per governor to '/sdcard/governors/'. If a governor is not available in the kernel, no script is generated for it. IE: You can't have ondemand on a kernel that only has interactive built in as the only governor. If you do happen to run a governor script for a governor that is not available, it will simply exit with an error message and no changes made.
Example:
Run:
Code:
bash /sdcard/govscriptgen.sh
Then:
Code:
bash /sdcard/governors/ondemand.sh
Code:
## This script is offered free for use and distribution under the terms and conditions
# in accordance with the GPLv2. For more inforation please visit:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
## Written by Alex Zaballa (8/23/2010) for use on Android OS.
#
## Description: This script is designed to facilitate CPU Governor switching from
# the Bash command line that comes with custom Android ROMs. It reads the governors
# available on the system generates a script per governor.
# This allows user selection and future automation through Bash.
# Running this script with preexisting scripts in the gen_path
# will automatically overwrite the preexisting scripts.
# If you are a Bash editor, rename/backup anything you want to keep.
#
## Usage:
# bash /yourpath/govscriptgen.sh
#
## For root users only.
#
## Disclaimer:
# You use this script at your *own risk*. There are no warranties or guarantees
# of functionality or safety implied or stated whatsoever.
# If you do not know what this does, please do not use it.
##
# User Editable: Change this variable to change the generation path.
# Please use quotes and end slash.
gen_path="/sdcard/governors/"
# What governors are available to us?
gov_list="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)"
# Create governor script folder if it does not exist.
if [ ! -e "${gen_path}" ]; then
mkdir ${gen_path}
fi
# Main loop
# Loop through the available governors.
for gov in ${gov_list}; do
# Concatenate path + filename.
script_name="${gen_path}${gov}.sh"
# Echo it all to script_name, rinse, repeat.
echo "Generating ${script_name} ..."
echo '## This script is offered free for use and distribution under the terms and conditions' > ${script_name}
echo '# in accordance with the GPLv2. For more inforation please visit:' >> ${script_name}
echo '## http://www.gnu.org/licenses/old-licenses/gpl-2.0.html' >> ${script_name}
echo '#' >> ${script_name}
echo '## Written by Alex Zaballa (8/23/2010) for use on Android OS.' >> ${script_name}
echo '#' >> ${script_name}
echo '## Description: This script is designed to facilitate CPU Governor' >> ${script_name}
echo '# switching from the Bash command line that comes with custom'>> ${script_name}
echo '# Android ROMs. The script name is generated from the available' >> ${script_name}
echo '# governors and when run, updates to the governor for which the script' >> ${script_name}
echo '# is named. If a governor is not available, it will exit safely with an error.' >> ${script_name}
echo '# These scripts can be used with GScript to create governor shortcuts.' >> ${script_name}
echo '#'
echo '## Usage:' >> ${script_name}
echo "# bash ${script_name}" >> ${script_name}
echo '#' >> ${script_name}
echo '## For root users only.' >> ${script_name}
echo '#' >> ${script_name}
echo '## Disclaimer:' >> ${script_name}
echo '# You use this script at your *own risk*. There are no warranties or guarantees' >> ${script_name}
echo '# of functionality or safety implied or stated whatsoever.' >> ${script_name}
echo '# If you do not know what this does, please do not use it.' >> ${script_name}
echo '##' >> ${script_name}
echo "" >> ${script_name}
echo "" >> ${script_name}
echo '# Set governor that the script controls. This was given at generation.' >> ${script_name}
echo -e 'gov='"\042"${gov}"\042" >> ${script_name}
echo '# What is the current system governor?' >> ${script_name}
echo -e current_gov="\042"'$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)'"\042" >> ${script_name}
echo '# What governors are available to us?' >> ${script_name}
echo -e gov_list="\042"'$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)'"\042" >> ${script_name}
echo "" >> ${script_name}
echo '# Failsafe: If the governor we are trying to set to is not available, exit safely.' >> ${script_name}
echo 'if [ "$(echo "${gov_list}" | grep -c "${gov}" )" != "0" ]; then' >> ${script_name}
echo '# Failsafe: If the governor we are trying to set to is already set, write nothing.' >> ${script_name}
echo ' if [ "${gov}" != "${current_gov}" ]; then' >> ${script_name}
echo ' echo "${gov}" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor' >> ${script_name}
echo ' current_gov="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"' >> ${script_name}
echo ' echo "Governor changed to:[${current_gov}]"' >> ${script_name}
echo ' else' >> ${script_name}
echo ' echo "Governor already set to:[${current_gov}]"' >> ${script_name}
echo ' echo "No changes made."' >> ${script_name}
echo ' fi' >> ${script_name}
echo 'else' >> ${script_name}
echo ' echo "Error: [${gov}] governor is not available on this kernel. No changes made."' >> ${script_name}
echo 'fi' >> ${script_name}
done
govswitch.sh
Description:
This script is meant for interactive terminal use (IE: use if you are staring at a command line prompt). It prompts the user for governor selection.
Example:
Run:
Code:
bash /sdcard/govswitch.sh
Code:
## This script is offered free for use and distribution under the terms and conditions
# in accordance with the GPLv2. For more inforation please visit:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
##
## Written by Alex Zaballa (8/23/2010) for use on Android OS.
##
# Description: This script is designed to facilitate CPU Governor switching from
# the Bash command line that comes with custom Android ROMs. It reads the governors
# available on the system and asks the user which they would like to use.
#
## Usage:
# bash /yourpath/govswitch.sh
#
## For root users only.
#
## Disclaimer:
# You use this script at your *own risk*. There are no warranties or guarantees
# of functionality or safety implied or stated whatsoever.
# If you do not know what this does, please do not use it.
##
# No root, no go.
if [ "$(whoami)" != "root" ]; then
echo "ERROR: You do not have sufficient privileges to run this script."
echo "Please re-run with root privileges."
exit 1
fi
# Default paths. Most of these should not change unless AOS does.
gov_path="/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
available_path="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
init_rc_path="/system/etc/init.local.rc"
bash_path="/system/xbin/bash"
# Recursive function to nag user for a sane and expected answer: (Y)(y) or (N)(n).
function yesno {
read -s -n 1 ans
case $ans in
# If the user has made a choice, update system variable and exit function and for loop.
Y|y) if [ "$2" == '/system/etc/init.local.rc' ]; then
# Do no harm. User has final say to replace 'init.local.rc'.
clear
echo "Setting system to rw permissions."
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# Backup the original init.local.rc file if one does not exist.
if [ ! -e "${init_rc_path}.bak" ]; then
echo "Generating $2.bak"
cat "${init_rc_path}" > "${init_rc_path}.bak"
fi
echo "Generating $2.new"
cat "$2" > "$2.new"
echo "$1" >> "$2.new"
else
echo "$1" > "$2"
echo "[$1] written to:"
echo "$2"
fi
break 2> /dev/null ;;
# If the user wants something else, skip current item listed.
N|n) echo "Not writing [$1]..."
if [ "$2" == '/system/etc/init.local.rc' ]; then
echo "Done."
exit 0
fi ;;
# Garbage answer in; sanity nag out. Recurse.
* ) echo "Please enter:[y/n]"
yesno "$1" "$2";;
esac
}
# What governors are available to us?
gov_list="$(cat "${available_path}")"
# Main Loop
clear
echo "Available governors:[${gov_list}]"
# Failsafe: If all answers are no, we don't change anything.
echo "Answer (n)o to every question to keep current governor."
# Loop through available options.
for gov in ${gov_list}; do
# What is our current governor?
current_gov="$(cat "${gov_path}")"
# Skip question if the current governor and our option is the same.
if [ "${gov}" != "${current_gov}" ]; then
echo "The current governor is:[${current_gov}]"
echo ""
echo "Change to:[${gov}][y/n]?"
yesno "${gov}" "${gov_path}"
fi
done
# Confirm what we've done.
current_gov="$(cat "${gov_path}")"
echo -e "\nThe current governor is:[${current_gov}]"
echo "Do you want to use this governor on startup?"
startup_script="$(echo -e '/system/bin/'"${current_gov}"'.sh')"
init_string="$(echo -e 'service gov_'"${current_gov} ${bash_path} ${startup_script}\n\t\t"'oneshot'"\n\n\n")"
yesno "${init_string}" "${init_rc_path}"
if [ ! -e "${startup_script}" ]; then
# Echo it all to startup_script.
echo "Generating ${startup_script} ..."
echo '## This script is offered free for use and distribution under the terms and conditions' > ${startup_script}
echo '# in accordance with the GPLv2. For more inforation please visit:' >> ${startup_script}
echo '## http://www.gnu.org/licenses/old-licenses/gpl-2.0.html' >> ${startup_script}
echo '#' >> ${startup_script}
echo '## Written by Alex Zaballa (8/23/2010) for use on Android OS.' >> ${startup_script}
echo '#' >> ${startup_script}
echo '## Description: This script is designed to facilitate CPU Governor' >> ${startup_script}
echo '# switching from the Bash command line that comes with custom'>> ${startup_script}
echo '# Android ROMs. The script name is generated from the available' >> ${startup_script}
echo '# governors and when run, updates to the governor for which the script' >> ${startup_script}
echo '# is named. If a governor is not available, it will exit safely with an error.' >> ${startup_script}
echo '# These scripts can be used with GScript to create governor shortcuts.' >> ${startup_script}
echo '#' >> ${startup_script}
echo '## Usage:' >> ${startup_script}
echo "# bash ${startup_script}" >> ${startup_script}
echo '#' >> ${startup_script}
echo '## For root users only.' >> ${startup_script}
echo '#' >> ${startup_script}
echo '## Disclaimer:' >> ${startup_script}
echo '# You use this script at your *own risk*. There are no warranties or guarantees' >> ${startup_script}
echo '# of functionality or safety implied or stated whatsoever.' >> ${startup_script}
echo '# If you do not know what this does, please do not use it.' >> ${startup_script}
echo '##' >> ${startup_script}
echo "" >> ${startup_script}
echo "" >> ${startup_script}
echo '# Set governor that the script controls. This was given at generation.' >> ${startup_script}
echo -e 'gov='"\042"${current_gov}"\042" >> ${startup_script}
echo '# What is the current system governor?' >> ${startup_script}
echo -e 'current_gov='"\042"'$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)'"\042" >> ${startup_script}
echo '# What governors are available to us?' >> ${startup_script}
echo -e 'gov_list='"\042"'$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)'"\042" >> ${startup_script}
echo "" >> ${startup_script}
echo '# Failsafe: If the governor we are trying to set to is not available, exit safely.' >> ${startup_script}
echo 'if [ "$(echo "${gov_list}" | grep -c "${gov}" )" != "0" ]; then' >> ${startup_script}
echo '# Failsafe: If the governor we are trying to set to is already set, write nothing.' >> ${startup_script}
echo ' if [ "${gov}" != "${current_gov}" ]; then' >> ${startup_script}
echo ' echo "${gov}" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor' >> ${startup_script}
echo ' current_gov="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"' >> ${startup_script}
echo ' echo "Governor changed to:[${current_gov}]"' >> ${startup_script}
echo ' else' >> ${startup_script}
echo ' echo "Governor already set to:[${current_gov}]"' >> ${startup_script}
echo ' echo "No changes made."' >> ${startup_script}
echo ' fi' >> ${startup_script}
echo 'else' >> ${startup_script}
echo ' echo "Error: [${gov}] governor is not available on this kernel. No changes made."' >> ${startup_script}
echo 'fi' >> ${startup_script}
fi
echo ""
echo "***"
echo "WARNING:"
echo "CHECK init.local.rc.new for correctness"
echo "BEFORE overwriting the original."
echo "***"
echo "If you need a backup of the original,"
echo "init.local.rc.bak was created at runtime."
echo "Run the following or similar command"
echo "to overwrite init.local.rc in /system/etc/:"
echo ""
echo "cat init.local.rc.bak > init.local.rc"
Thanks downloading now.
duffkitty said:
Thanks downloading now.
Click to expand...
Click to collapse
Please let me know if you have any questions.
At first I got a yesno error but ran it with sh and not bash.
Working but I can't figure out gscript it sends out stderr's. I have the lite so dunno.
I'm guessing to start at boot I would need to edit a bit =P
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
duffkitty said:
At first I got a yesno error but ran it with sh and not bash.
Working but I can't figure out gscript it sends out stderr's. I have the lite so dunno.
I'm guessing to start at boot I would need to edit a bit =P
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
Click to expand...
Click to collapse
I found this for running scripts at boot. It's a good place to start.
http://forum.xda-developers.com/showthread.php?t=690564&page=2
govscriptgen.sh
This script generates a set of scripts, one per governor. It's those scripts you would want to use at boot or in gscript. If you didn't change the location, and assuming that you could write to your SD Card, they should be located in '/sdcard/governors'. There will be one per available governor (this is dictated by the kernel configuration).
In GScript do the following:
1. Open GScript Lite.
2. Menu > Add Script
3. Name the script. Let's say Ondemand.
4. Check 'Needs SU?'
5. In the text box type (without quotes), 'bash /sdcard/governors/ondemand.sh'
6. Create a shortcut to that script and it will set the governor it is named for.
govswitch.sh
This one is for use in a terminal and prompts the user for the desired governor.
I think I figured out and was gonna post it but you already did thanks. I appreciate it.
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
Added interactive.sh to /system/bin and fixed the permissions but I added
service gov_interactive /system/bin/interactive.sh
oneshot
To init.local.rc and it doesn't start... I can run it in terminal emulator with just interactive.sh though....
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
duffkitty said:
Added interactive.sh to /system/bin and fixed the permissions but I added
service gov_interactive /system/bin/interactive.sh
oneshot
To init.local.rc and it doesn't start... I can run it in terminal emulator with just interactive.sh though....
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
Click to expand...
Click to collapse
I think it needs the interpreter in front of it. Could you try the following?
Code:
service gov_interactive /system/xbin/bash /system/bin/interactive.sh
zansatsu said:
I think it needs the interpreter in front of it. Could you try the following?
Code:
service gov_interactive /system/xbin/bash /system/bin/interactive.sh
Click to expand...
Click to collapse
That does it. I guess it doesn't automagically know it's bash =P
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
duffkitty said:
That does it. I guess it doesn't automagically know it's bash =P
Click to expand...
Click to collapse
I'm glad it worked. Yeah, Android's command line fought me most of the way until I learned to just call bash before running any scripts. I suspect it's probably because the command line on Android initializes in a relatively 'bare' state as compared to all of Linux's bells and whistles that I'm used to.
Let me know if you have any more questions.
zansatsu said:
I'm glad it worked. Yeah, Android's command line fought me most of the way until I learned to just call bash before running any scripts. I suspect it's probably because the command line on Android initializes in a relatively 'bare' state as compared to all of Linux's bells and whistles that I'm used to.
Let me know if you have any more questions.
Click to expand...
Click to collapse
Thanks for helping =) I wonder if its possible to add bsd style init scripts. I guess you don't actually need to change many services but an rc.conf file would be cool =P
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
duffkitty said:
Thanks for helping =) I wonder if its possible to add bsd style init scripts. I guess you don't actually need to change many services but an rc.conf file would be cool =P
Sent from my CM 6 Blackmodded Heroc using the XDA app. Now with uncapped kernel and battery tweaks.
Click to expand...
Click to collapse
I started on Slackware and a '/etc/rc.d/rc.local' file would be really awesome. Slackware being one of the oldest distros (if not the oldest) is very similar to BSD. I've had to configure Slack many times, but once you did it was rock-solid.
Android feels more like Ubuntu in some ways and Red Hat in others, but a very slim version of either. I can't really explain it.
Anywho. Glad I could help.
Code:
## This script is offered free for use and distribution under the terms and conditions
# in accordance with the GPLv2. For more inforation please visit:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
## Written by Alex Zaballa (9/23/2010) for use on Android OS.
#
Click to expand...
Click to collapse
How did you write this script one month in the future?
Seriously....would this script be able to change kernel voltage from command line? Say changing from undervolted to regular voltage for certain tasks (like GPS nav for example), then switch back to undervolt for other usage? Is something like that even possible? I've seen a few others ask about something like that in other threads.
chromiumleaf said:
How did you write this script one month in the future?
Click to expand...
Click to collapse
I'm just that ahead of my time! ROFL
DOH!
I corrected and reposted the zip file.
chromiumleaf said:
Seriously....would this script be able to change kernel voltage from command line? Say changing from undervolted to regular voltage for certain tasks (like GPS nav for example), then switch back to undervolt for other usage? Is something like that even possible? I've seen a few others ask about something like that in other threads.
Click to expand...
Click to collapse
If there is a command line associated with it, I can write a script that can easily handle it. I haven't looked into the specifics on changing voltages...
TBH: That thought scares the bejeezuz out of me.
zansatsu said:
If there is a command line associated with it, I can write a script that can easily handle it. I haven't looked into the specifics on changing voltages...
TBH: That thought scares the bejeezuz out of me.
Click to expand...
Click to collapse
Check out this thread for some of the initial dev conversations on undervolting: http://forum.xda-developers.com/showthread.php?t=697286 Ironically, I think some of it started from the guy who dev'd setcpu. Might have some info in it that could help you figure some things out. I'd try to sum it up for you but that stuff is just a bit over my head
Decad3nce said:
Code:
/* MSM7201A Levels 3-6 all correspond to 1.2V, level 7 corresponds to 1.325V. */
enum {
VDD_0 = 0,
VDD_1 = 1,
VDD_2 = 2,
VDD_3 = 3,
VDD_4 = 4,
VDD_5 = 5,
VDD_6 = 6,
VDD_7 = 7,
VDD_END
};
Thanks to kleranc for idea.
Click to expand...
Click to collapse
These are kernel level calls that have to be compiled into the kernel. Unless they make this available as a system variable, like the governors are, I don't think changing the voltage from the command line is possible... or even safe. The governors are routines written to control different CPU modes of operation and are designed to be fairly safe to use in instances of power management. Adjusting the voltages from the command line would prove to be too close to suicidal because Bash can't operate at the speeds necessary to monitor voltage fluctations.
Example: We hit a voltage spike, which needs to be corrected in nanoseconds (billionth of a second), Bash would brick the phone by not responding until at least 50 milliseconds (thousandth of a second) later, if ever.
Now if they had modules written that the kernel had different voltage 'modes' and built-in safeties, then I wouldn't have a problem manipulating them from the command line. As it stands, I'll leave it to people who think in ARM Assembler, C, and C++. lol
However, I am taking script ideas, so feel free to suggest anything else you might think is useful.
No Hero gets left behind!
Sent from my FROYO HERO.
Govswitch.sh has received an upgrade and it can now automagically generate an init.local.rc.new which can be used to set a governor on start up. It will also generate the chosen governor specific script and place it in the /system/bin folder. Thank you Duffkitty for the idea!
zansatsu said:
Govswitch.sh has received an upgrade and it can now automagically generate an init.local.rc.new which can be used to set a governor on start up. It will also generate the chosen governor specific script and place it in the /system/bin folder. Thank you Duffkitty for the idea!
Click to expand...
Click to collapse
Awesome I'm not longer using CM for a daily and switched to Zen-ROM but may go back when a release happens. Niche audience for the script but its very helpful
Sent from my HTC Hero using XDA App

Mod close this please

Mod please close this thread .
Thank you
Regards,
ImbaWind
Haven't download it yet but I'm just curious. Is this a "sync" followed by echoing "3" to the drop_cache file?
Sent from my Nexus S using xda premium
kοng said:
Haven't download it yet but I'm just curious. Is this a "sync" followed by echoing "3" to the drop_cache file?
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
and followed by a echo 1 to let the system continue create caches
Should the terminal emulator typing repeat in every reboot (soft reset)?
imbawind said:
Adrenaline Shot
This script act like an adrenaline shot for your phone.
It helps you to clear your system cache, get more free ram for you and gravely boost your phone's performance !
Click to expand...
Click to collapse
sync;
sleep 1
echo "3" > /proc/sys/vm/drop_caches;
echo "1" > /proc/sys/vm/drop_caches;
sleep 1
echo " ** Turbo Boosted ** ";
Is that all?
Not new. This script persists already in a lot of ROMs and tweaks.
My engine flush script included with V6 SuperCharger... it haz...
{
"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"
}
Just type "flush" in terminal
And what's up with the naming?
There is a well known Adrenaline Shot script plus there is a certain 3G TurboCharger but anyway instead of using 2 names (?) you should call it "Adrenaline Boost" or something
jolas said:
Should the terminal emulator typing repeat in every reboot (soft reset)?
Click to expand...
Click to collapse
whenever u feel lag
alexdoux25 said:
sync;
sleep 1
echo "3" > /proc/sys/vm/drop_caches;
echo "1" > /proc/sys/vm/drop_caches;
sleep 1
echo " ** Turbo Boosted ** ";
Is that all?
Not new. This script persists already in a lot of ROMs and tweaks.
Click to expand...
Click to collapse
really ?0.0
for my device this script echo 3 drop cache is indeed included in many script but none of them works
zeppelinrox said:
My engine flush script included with V6 SuperCharger... it haz...
Just type "flush" in terminal
And what's up with the naming?
There is a well known Adrenaline Shot script plus there is a certain 3G TurboCharger but anyway instead of using 2 names (?) you should call it "Adrenaline Boost" or something
Click to expand...
Click to collapse
okay I'll make changes
but I really don't know tat ur v6 can clear ram by terminal..
and isit ur script only echo 3 without echo 1 back and sync
correct me if i'm wrong
zeppelinrox said:
My engine flush script included with V6 SuperCharger... it haz...
Just type "flush" in terminal
And what's up with the naming?
There is a well known Adrenaline Shot script plus there is a certain 3G TurboCharger but anyway instead of using 2 names (?) you should call it "Adrenaline Boost" or something
Click to expand...
Click to collapse
Code:
if [ "$opt" -eq 16 ]; then
# see http://www.droidforums.net/forum/liberty-rom-d2/122733-tutorial-sysctl-you-guide-better-preformance-battery-life.html
# credit imoseyon
echo " Your device may get laggy after a day or two.."
echo ""
$sleep
echo " ...if you haven't rebooted."
echo ""
$sleep
echo " It happens when system caches keep growing..."
echo ""
$sleep
echo " ...and free RAM keeps shrinking..."
echo ""
$sleep
echo " ...and apps are starved for memory!"
echo ""
$sleep
echo ""
$sleep
echo " This Engine Flush will give you a Quick Boost!"
echo ""
$sleep
echo " The system will drop all file system caches..."
echo ""
$sleep
echo " ...which means more free RAM and no lag!"
echo ""
$sleep
echo " ...so need to reboot!"
echo ""
$sleep
echo " Credit to imoseyon for making this known!"
echo ""
$sleep
echo " Continue and drop all file system caches?"
echo ""
$sleep
echo -n " Enter Y for Yes, any key for No: "
read flush
echo ""
echo $line
case $flush in
y|Y)sync; echo 3 > /proc/sys/vm/drop_caches
echo " Engine Flush Completed!"
echo ""
$sleep
echo " ...Enjoy Your Quick Boost :)";;
*)echo " File system caches were retained...";;
esac
echo $line
echo ""
$sleep
fi
do u mean this one ?
Code:
Code:
# sync
# echo 3 > /proc/sys/vm/drop_caches
That's it. Not much to see here. The first command writes any cache data that hasn't been written to the disk out to the disk. The second command tells the kernel to drop what's cached. Not much to it. This invalidates the write cache as well as the read cache, which is why we have the sync command first.
Click to expand...
Click to collapse
Source
and from my opinion , it's better to echo 1 back to drop_caches, cause the caches which are still in use may be cleaned whenever u go task manager and clear ram
correct me if i'm wrong
imbawind said:
Code:
if [ "$opt" -eq 16 ]; then
# see http://www.droidforums.net/forum/liberty-rom-d2/122733-tutorial-sysctl-you-guide-better-preformance-battery-life.html
# credit imoseyon
echo " Your device may get laggy after a day or two.."
echo ""
$sleep
echo " ...if you haven't rebooted."
echo ""
$sleep
echo " It happens when system caches keep growing..."
echo ""
$sleep
echo " ...and free RAM keeps shrinking..."
echo ""
$sleep
echo " ...and apps are starved for memory!"
echo ""
$sleep
echo ""
$sleep
echo " This Engine Flush will give you a Quick Boost!"
echo ""
$sleep
echo " The system will drop all file system caches..."
echo ""
$sleep
echo " ...which means more free RAM and no lag!"
echo ""
$sleep
echo " ...so need to reboot!"
echo ""
$sleep
echo " Credit to imoseyon for making this known!"
echo ""
$sleep
echo " Continue and drop all file system caches?"
echo ""
$sleep
echo -n " Enter Y for Yes, any key for No: "
read flush
echo ""
echo $line
case $flush in
y|Y)sync; echo 3 > /proc/sys/vm/drop_caches
echo " Engine Flush Completed!"
echo ""
$sleep
echo " ...Enjoy Your Quick Boost :)";;
*)echo " File system caches were retained...";;
esac
echo $line
echo ""
$sleep
fi
do u mean this one ?
Click to expand...
Click to collapse
Try this one
Code:
echo " Reported \"Free\" RAM = $ramreportedfree MB"
echo ""
busybox sync; echo 3 > /proc/sys/vm/drop_caches
sleep 3
echo 1 > /proc/sys/vm/drop_caches
ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024))
ramkbytesfree=`free | awk '{ print $4 }' | sed -n 2p`
ramkbytescached=`cat /proc/meminfo | grep Cached | awk '{print $2}' | sed -n 1p`
ramfree=$(($ramkbytesfree/1024));ramcached=$(($ramkbytescached/1024));ramreportedfree=$(($ramfree + $ramcached))
echo $line
echo " ...RAM Stats AFTER Engine Flush"
Plus you ain't sleeping between the echo 3 and echo 1 - so sometimes that won't work.
zeppelinrox said:
Try this one
Code:
echo " Reported \"Free\" RAM = $ramreportedfree MB"
echo ""
busybox sync; echo 3 > /proc/sys/vm/drop_caches
sleep 3
echo 1 > /proc/sys/vm/drop_caches
ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024))
ramkbytesfree=`free | awk '{ print $4 }' | sed -n 2p`
ramkbytescached=`cat /proc/meminfo | grep Cached | awk '{print $2}' | sed -n 1p`
ramfree=$(($ramkbytesfree/1024));ramcached=$(($ramkbytescached/1024));ramreportedfree=$(($ramfree + $ramcached))
echo $line
echo " ...RAM Stats AFTER Engine Flush"
Plus you ain't sleeping between the echo 3 and echo 1 - so sometimes that won't work.
Click to expand...
Click to collapse
wow i din noticed that u hav new version , still can report ram free , awesome one of the best devs out there
thanks for your guidance
zeppelinrox said:
Try this one
Code:
echo " Reported \"Free\" RAM = $ramreportedfree MB"
echo ""
busybox sync; echo 3 > /proc/sys/vm/drop_caches
sleep 3
echo 1 > /proc/sys/vm/drop_caches
ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024))
ramkbytesfree=`free | awk '{ print $4 }' | sed -n 2p`
ramkbytescached=`cat /proc/meminfo | grep Cached | awk '{print $2}' | sed -n 1p`
ramfree=$(($ramkbytesfree/1024));ramcached=$(($ramkbytescached/1024));ramreportedfree=$(($ramfree + $ramcached))
echo $line
echo " ...RAM Stats AFTER Engine Flush"
Plus you ain't sleeping between the echo 3 and echo 1 - so sometimes that won't work.
Click to expand...
Click to collapse
the line which shows ram doesnt works
Works in my screen shot, no?
I just posted a snippet LOL
imbawind said:
wow i din noticed that u hav new version , still can report ram free , awesome one of the best devs out there
thanks for your guidance
Click to expand...
Click to collapse
Thanks I appreciate the good words

[GUIDE] Add init.d scripts support for padfone/padfone 2

First of all, if you don't know what does init.d means then you probably won't need this and I'm not responsible if your padfone explodes when running this . Seriously this is almost completely sure but your device, your responsibility.
Credits:
I gathered information from this thread from DooMLoRD http://forum.xda-developers.com/showthread.php?t=1236446 as well as from others in this forum, but i believe he was the first.
Pre-requisites:
A rooted padfone, busybox and a command-line (adb, terminal, ...)
Explanation:
We are going to use the install-recovery.sh script that recreates the recovery partition (if it has been modified) while the device boots.
The way it works is simple:
- the boot process calls install-recovery.sh while executing init.rc
- the install-recovery.sh calls sysinit script
- the sysinit script runs /system/etc/init.d/* in order
Issues:
I found that the script is called in an early state where the date is still not set (is said Jan 28 1970!!!) and only a few fs are mounted:
/system, /data, /persist, /cache
so no sdcard, no Removable ...
Howto:
you can either copy the following text to a file in your device or download the attached file and in a terminal run:
$su
#cd to the directory where the script was stored
#sh ./enable_initd.sh
Code:
#!/system/bin/sh
echo ''
echo 'This script will enable init.d'
echo ''
echo 'You will need to reboot to check if it worked'
echo ''
echo 'If the script successfully enabled init.d you will'
echo 'have a file in /data/log called init.d-log.txt'
echo 'after the device is done rebooting.'
echo 'Once checked that it is working, you can delete'
echo '/system/etc/init.d/99test and /data/log/init.d-log.txt'
echo 'Remember to always set the proper permissions in your'
echo 'scripts or they will not work.'
echo ''
if [ ! -f /system/xbin/busybox -a ! -f /system/bin/busybox ]
then
echo 'no busybox found! please re-install/update your busybox'
else
# Mount system as rw in order to prepare the paths and scripts
mount -o remount,rw /system
# Create init.d dir
if [ -d '/system/etc/init.d' ]
then
chmod 755 /system/etc/init.d
else
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
fi
# Create sysinit script if needed
if [ -f /system/bin/sysinit ]
then
echo 'sysinit exists, init.d should be enabled'
chmod 755 /system/bin/sysinit
else
touch /system/bin/sysinit
echo '#!/system/bin/sh' >> /system/bin/sysinit
echo 'export PATH=/sbin:/system/sbin:/system/bin:/system/xbin' >> /system/bin/sysinit
echo '/system/bin/logwrapper busybox run-parts /system/etc/init.d' >> /system/bin/sysinit
chmod 755 /system/bin/sysinit
fi
# Create / modify install-recovery.sh
if [ -f /system/etc/install-recovery.sh ]
then
if cat /system/etc/install-recovery.sh | egrep -i "sysinit"
then
echo 'sysinit already present in install-recovery.sh, skipping this step.'
else
cp /system/etc/install-recovery.sh /system/etc/install-recovery.sh.old
echo '' >> /system/etc/install-recovery.sh
echo '#init.d scripts integration' >> /system/etc/install-recovery.sh
echo '/system/bin/sysinit' >> /system/etc/install-recovery.sh
fi
else
touch /system/etc/install-recovery.sh
echo '#!/system/bin/sh' > /system/etc/install-recovery.sh
echo '' >> /system/etc/install-recovery.sh
echo '/system/bin/sysinit' >> /system/etc/install-recovery.sh
chmod 755 /system/etc/install-recovery.sh
fi
# Create 99test script to check if init.d works
echo '#!/system/bin/sh' > /system/etc/init.d/99test
echo '' >> /system/etc/init.d/99test
echo 'date >> /data/log/init.d-log.txt' >> /system/etc/init.d/99test
echo 'echo init.d works >> /data/log/init.d-log.txt' >> /system/etc/init.d/99test
chmod 755 /system/etc/init.d/99test
# Sync and remount system
sync
mount -o remount,ro /system
#done!
echo 'job done :)'
echo 'reboot your phone and check on'
echo '/data/log/init.d-log.txt to see if it worked'
fi
Good luck!
please make new forum request for the padfone2 here
http://forum.xda-developers.com/showthread.php?t=1660354
we can't be sure that admins look here
Sendt fra min PadFone 2 med Tapatalk2
Thanks
Very Useful! Thanks for your guide.

[SCRIPT][v1.4]Bug Reporter (ultimate debugging) -- The MUST debugging AIO tool!

Greetings
Hello everyone, I made a script to help developers solve problems and you become a more helpful user.
What does it do?
It exports to sdcard :
dmesg
last_kmsg
wakelocks
kernel version
logcat (normal and long)
radio (aka modem log)
getprop (aka build.prop)
running processes
partition info
mount info
RAM info
interrupts
boot logs from kernels like : nAa, lupus
Total maximum possible logs are 14 files.
What should I do? :cyclops:
Send files from the folder with the time-stamp you have just created or send the tar.gz'ed file to the corresponding developer to help him. Each time you run the script it creates a different folder with a unique time-stamp of the time and date you dumped the logs.
Send whatever is needed, everything is in bug_reporter folder.
Ok, how do we install this thing?
Make sure you download the latest version [ v1.4 is the latest ] which is attached below and put it in your sdcard...and that your device is rooted.
Go to CWM recovery and flash it! It does no harm, it just copies a small 6kb file in your /system/xbin. So there is no need to uninstall it later. It will accompany you until you flash a new ROM.
If you are coming from another version, just flash it over.
If you are having any problems, first attach the debug.txt from bug_reporter folder and tell me your device, kernel and ROM. The problem might be your busybox installation though.
Ok, how do we use this thing?
Make sure you have a terminal app, I use this : https://play.google.com/store/apps/details?id=jackpal.androidterm
Open a terminal app and just type :
Code:
su
bug
IT WON'T WORK PROPERLY IF NOT EXECUTED FROM /system/xbin/, SO IT MAY FAIL WITH SCRIPT MANAGER. TRY AND REPORT BACK TO ME.
That's it?
Yes. :good:
If you have any questions, feel free to ask anything. :highfive:
Any screenshots? :angel:
Yep.
{
"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 want to contribute/redistribute
Oh, please do! :victory: Spread it, mod it, rewrite it, make your own version, inform developers, tell ROM cookers to include it, do whatever you want with it, but please don't forget me...
Post any improvements or modifications for me here. :fingers-crossed:
Here is the "source code" of it:
Code:
#!/system/bin/sh
DIRECTORY="/sdcard/bug_reporter"
clear
#ROOT CHECK, FOR SCRIPT TO WORK ON ALL su VERSIONS
clear
echo "Checking root permissions..."
if [ "$(id)" != "uid=0(root) gid=0(root)" ];
then
echo " - Denied?"
echo " * Please accept superuser permission..."
echo " /!\ FIRST TYPE: su"
echo
exit
elif [ "$(id)" == "uid=0(root) gid=0(root)" ];
then
echo " - Granted! SU binary version : $(su -V)"
else
echo
echo " /!\ Some errors occured... Obviously..."
echo " * Run the script again."
echo " - Asking superuser permissions..."
echo " ( i ) If you see somewhere "root", we are OK,"
echo " else, we are NOT."
su
echo " Look at it :"
id
exit
fi
{
#CREATING THE NEST DIRECTORY
#
if [ ! -d "$DIRECTORY" ];
then
echo " - Directory not found.
echo " - Creating...
mkdir $DIRECTORY
echo " - Done!
else
echo " - Fatal error! Exiting...
exit
fi
#FOR DEBUGGING REASONS
#
echo " - SU binary version : $(su -V)"
#VACUUM
#
clear
##SETTING MAX MB
if [ ! -f $DIRECTORY/max_mb.txt ];
then
echo Logs can easily exceed over the size you can imagine.
echo So, I will ask you if you want me to delete them
echo in the future.
echo
echo "How many MB of logs do you want to keep?"
echo "(5 MB recommended)"
read keep
KEEP_KB=$(echo $(($keep*1024)) )
echo $KEEP_KB > $DIRECTORY/max_mb.txt
clear
fi
SIZE=$(du -s $DIRECTORY | cut -f1)
MAX_MB=$(cat $DIRECTORY/max_mb.txt)
MB=$(echo $(($SIZE/1024)) )
##CHECKING IF MAX MB ARE REACHED AND PROMPT
if [ "$SIZE" -ge "$MAX_MB" ];
then
echo Log files have reached the maximum size you have set.
echo Their size is around $MB MB.
echo
echo Do you want to clean all logs?
echo "(y = Yes, clean. n = No, reset max MB value)"
read clean
echo
if [ "$clean" == "y" ] || [ "$clean" == "Y" ] || [ "$clean" == "yes" ] || [ "$clean" == "YES" ];
then
rm -r $DIRECTORY
echo - Cleaned!
echo - Re-run the script to set again the max MB value.
echo - Bye!
exit
elif [ "$clean" == "n" ] || [ "$clean" == "N" ] || [ "$clean" == "no" ] || [ "$clean" == "NO" ];
then
rm $DIRECTORY/max_mb.txt
echo - Value reseted!
echo - Re-run the script to set again the max MB value.
echo - Continuing...
sleep 2
else
echo "/!\ Illegal character. Try again...";
sleep 1
exec bug
fi
fi
#PRECALCULATIONS FOR LOGCATING
#
ls dev/log > $DIRECTORY/devlog
MAIN=$(grep main $DIRECTORY/devlog)
RADIO=$(grep radio $DIRECTORY/devlog)
clear
DATETIME=$(date +%Y%m%d%H%M%S)
export DATETIME
echo " ,-------------, Everything is saved on sdcard"
echo " / [email protected] / under bug_reporter folder."
echo "/_____________/__,------,"
echo "| Bug reporter v1.4 / Remember the timestamp!"
echo "|_______________,-----' Format : yyyymmddhhmmss"
echo
echo "It exports and compresses as tarball the following :"
echo "* dmesg"
echo "* last_kmsg"
echo "* wakelocks"
echo "* kernel version"
echo "* logcat (normal and long)"
echo "* radio (aka modem log)"
echo "* getprop (aka build.prop)"
echo "* running processes"
echo "* partition info"
echo "* mount info"
echo "* RAM info"
echo "* interrupts"
echo "* boot logs from kernels like : nAa, lupus"
echo
cd $DIRECTORY
#TIMESTAMP WHICH IS THE FOLDER'S NAME WHERE THE FILES ARE SAVED ON EACH RUN
echo - report timestamp : $DATETIME
mkdir "$DATETIME"
echo - exporting...
#FOR DMESG
echo - dmesg
dmesg > $DIRECTORY/"$DATETIME"/dmesg.txt
echo - OK!
#FOR LAST_KSMG
#
echo - last_kmsg
if [ -f /proc/last_kmsg ];
then
cat /proc/last_kmsg > $DIRECTORY/"$DATETIME"/last_kmsg.txt
echo - OK!
else
echo " /!\ last_kmsg not found!";
fi
#FOR WAKELOCKS
#
echo - wakelocks
if [ -f /proc/wakelocks ];
then
cat /proc/wakelocks > $DIRECTORY/"$DATETIME"/wakelocks.txt
echo - OK!
else
echo " /!\ wakelocks not found!";
fi
#FOR KERNEL VERSION
#
echo - kernel version
if [ -f /proc/version ];
then
cat /proc/version > $DIRECTORY/"$DATETIME"/kernel.txt
uname -a >> $DIRECTORY/"$DATETIME"/kernel.txt
echo - OK!
else
echo " /!\ version not found!";
fi
#FOR LOLCATS
#
if [ "$MAIN" != "main" ] || [ "$RADIO" != "radio" ];
then
echo " /!\ main and radio logging aborted!";
echo "* I can't logcat properly, loggers may be disabled."
echo "- Your ROM's dev must have disabled it via a script."
echo " OR"
echo "- Loggers are disabled from kernel."
else
##MAIN
echo - logcat
logcat -d > $DIRECTORY/"$DATETIME"/logcat.txt
echo - OK!
echo - long logcat
logcat -v long -d > $DIRECTORY/"$DATETIME"/long_logcat.txt
echo - OK!
##RADIO
echo - radio
logcat -b radio -v time -d > $DIRECTORY/"$DATETIME"/radio.txt
echo - OK!
fi
#FOR GETPROP
#
echo - getprop
getprop > $DIRECTORY/"$DATETIME"/getprop.txt
echo - OK!
#FOR RUNNING PROCESSES
#
echo - processes
ps > $DIRECTORY/"$DATETIME"/processes.txt
echo - OK!
#FOR PARTITION INFO
#
echo - partition info
df > $DIRECTORY/"$DATETIME"/partitions.txt
echo - OK!
#FOR MOUNTS
#
echo - mount info
mount > $DIRECTORY/"$DATETIME"/mounts.txt
echo - OK!
#FOR RAM
#
echo - RAM info
free > $DIRECTORY/"$DATETIME"/ram.txt
echo - OK!
#FOR INTERRUPTS
#
echo - interrupts
cat /proc/interrupts > $DIRECTORY/"$DATETIME"/interrupts.txt
echo - OK!
##----DEVIDER FOR SPECIAL LOGS----##
#BOOT LOG FOR nAa KERNELS AND DERIVATIVES
#
if [ -f "/boot.txt" ];
then
echo " ( i ) Oh, I found a boot log too!"
echo "- That's found on some nAa kernels, backing it up."
cat /boot.txt > $DIRECTORY/"$DATETIME"/boot.txt
echo - OK!
fi
#BOOT LOG FOR lupus KERNELS AND DERIVATIVES
#
if [ -f "/tmp/lupus.log" ];
then
echo " ( i ) Oh, I found a boot log too!"
echo "- That's found on some lupus kernels, backing it up."
cat /tmp/lupus.log > $DIRECTORY/"$DATETIME"/boot.txt
echo - OK!
fi
##----###----##
#CLEANING UP UNEEDED FILES FOR USER
#
echo - Cleaning up...
##CLEANING LAST TARBALL
rm *.tar.gz 2>&1 | >$DIRECTORY/devlog
##devlog IS A FILE OF PRECALCULATIONS FOR LOGCAT
if [ -f "$DIRECTORY/devlog" ];
then
rm $DIRECTORY/devlog
fi
#COMPRESSING FOR EASY SENDING
#
echo - Compressing logs...
echo - Done!
echo " ( i ) Send "$DATETIME".tar.gz to developer(s)!"
tar -zcf "$DATETIME".tar.gz "$DATETIME"
echo - Exiting...
#ADVERTISING THE SCRIPT
#
echo "http://forum.xda-developers.com/showthread.php?p=41107818" > $DIRECTORY/"$DATETIME"/"I used bug_reporter script.txt"
#DEBUGING MY SCRIPT
#
} 2>&1 | tee $DIRECTORY/debug.txt
exit
CHANGELOG
Code:
[B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR]
- alternative root check
- now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first
- added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel
- avoided potential bug with radio logging
- added some more info about kernel version logging (with [B]uname -a[/B] command)
- code clean up and more easier to follow
- faster? (it takes 1 second for me)
[B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR]
- corrected root check
- added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it
- corrected and re-ordered some text
- optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish)
- added build.prop backup with getprop command, it will help devs understand more info about your situation
- added some sort of advertisement of the script, so that it'll become popular
- added compression of the last logging folder, so that you can easily send it to dev(s)
- added more info on the script, made more presentable and explanatory for those who are willing to modify it
[B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR]
- finally fixed logcat exporting, now it will work for sure, fully tested
- cleaned up the script a lot and made it simplier for reading
- added radio (aka modem log), wakelocks and kernel version logging
- fixed terminal output logging for debugging better
[B]v1.1[/B] [I][COLOR="Gray"]it won't logcat, but everything else works[/COLOR][/I]
- fixed wrong logcat exporting, now when it's disabled, you'll know it
- added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB)
- small bugfixes
- root check, in order to be sure we collect logs as root
- terminal output logging for debugging reasons
[B]v1.0 beta[/B] [I][COLOR="Gray"]works, but has many errors, it may even fail to flash.[/COLOR][/I]
- initial release
Thank you very much, this script will help a lot of people, including me
Sent from my R800i using xda premium
Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions?
zadrozny91 said:
Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions?
Click to expand...
Click to collapse
It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html
But I am telling you to flash the fixed zip, it'll work.
leajian said:
It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html
But I am telling you to flash the fixed zip, it'll work.
Click to expand...
Click to collapse
nice concept ,,but there are some problems
after taking log
both lastkmsg and logcat file show nothing(empty files)
long logcat shows this: 9 com.android.settings
only dmesg is correctly extracted
UPDATE!
Code:
[B]v1.1[/B]
- fixed wrong logcat exporting, now when it's disabled, you'll know it
- added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB)
- small bugfixes
- root check, in order to be sure we collect logs as root
- terminal output logging for debugging reasons
Thanks man, I was going to write something similar until I found this.
I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem.
Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget.
defiant07 said:
Thanks man, I was going to write something similar until I found this.
I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem.
Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget.
Click to expand...
Click to collapse
Indeed, logcating won't work no matter what. It's a bug. I am aware of it. I'll fix it today I guess along with some code cleanup and considering your suggestion.
Sent from my MT11i using xda premium
Code:
[B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR]
- finally fixed logcat exporting, now it will work for sure, fully tested
- cleaned up the script a lot and made it simplier for reading
- added radio (aka modem log), wakelocks and kernel version logging
- fixed terminal output logging for debugging better
Also v1.0 beta re-added in case you want it.
Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root
Sent from my Nexus 7 using Tapatalk HD
cybojenix said:
Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
:victory: Yeah, do whatever you want with it!
About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example.
Anyway, probably won't need this check on other unix systems... You'll need to start the script with
Code:
sudo -i
and remove any
Code:
su -c
in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me.
EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later.
leajian said:
:victory: Yeah, do whatever you want with it!
About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example.
Anyway, probably won't need this check on other unix systems... You'll need to start the script with
Code:
sudo -i
and remove any
Code:
su -c
in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me.
EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later.
Click to expand...
Click to collapse
I mean set up a script to run from a pc to debug android. Let's you run it on non rooted devices (parts of it anyway)
It's quicker than getting a user to push and run via the android terminal (which not everyone has)
Easier to run via an adb interface which can be supplied, and implement an update script everyone is running the same version
Btw won't need help check my signature for the root scripts
Sent from my Nexus 7 using Tapatalk HD
UPDATE! The tool is now in a super stable state of development.
Code:
[B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR]
- corrected root check
- added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it
- corrected and re-ordered some text
- optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish)
- added build.prop backup with getprop command, it will help devs understand more info about your situation
- added some sort of advertisement of the script, so that it'll become popular
- added compression of the last logging folder, so that you can easily send it to dev(s)
- added more info on the script, made more presentable and explanatory for those who are willing to modify it
can i get permission for adding your script in my cm-10.1 for LG-P350 ?
PecanCM said:
can i get permission for adding your script in my cm-10.1 for LG-P350 ?
Click to expand...
Click to collapse
Says in the post you can. Just credit
Sent from my Nexus 7 using Tapatalk HD
Just sharing. I use this:
bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"`
You may want to incorporate it in some way.
Sent from my GT-I9100 using xda premium
RovG said:
Just sharing. I use this:
bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"`
You may want to incorporate it in some way.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thanks, I'll have it in mind, the reason why I didn't do this before is that I wanted it to be simple and not so informative.
In next update I might add some colors too!
Anyway here is an update... :fingers-crossed:
Code:
[B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR]
- alternative root check
- now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first
- added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel
- avoided potential bug with radio logging
- added some more info about kernel version logging (with [B]uname -a[/B] command)
- code clean up and more easier to follow
- faster? (it takes 1 second for me)

[Tweak][Guide] Init.d Tweaks

Init.d Tweaks
(Needs ROM (Kernel) With init.d Access And Busybox, Open Empty File In Text Editor (Notepad ++ Or Similar), Insert Tweak You Want In Header,Save in /system/etc/init.d and name it Lomething Like 73tweaks)
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,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
Code:
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. 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
13. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
14. GPS.conf
(create or edit your /system/etc/gps.conf with a text editor)
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
Warning: Using these tweaks may brick your device. Use it with caution.
:good::good::good:
How can I know that my ROM / kernel support Init.d or not??
AK205 said:
How can I know that my ROM / kernel support Init.d or not??
Click to expand...
Click to collapse
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Build.prop tweaks by @bravonova
bravonova said:
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Click to expand...
Click to collapse
I make and init.d script and i copy your custom values to my init.d script. However, on net speed tweaks, the tcp_rmem and tcp_wmem didn't change the value at all even i edited it. Any help?
Should it be in text file or script file?
So we create a different text document containing each code for each tweak?? Not all In one document in the init.d folder??
Nice write up, bro. Thanks. Will have to try.
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Tweaks good for one person or situation are not necessarily optimal for every case in general .
Medyredy said:
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Click to expand...
Click to collapse
Can you help please?
Hello, I'm a newbie here. I wish to overclock my stock kernal, So it can be done through tweak? or I have to compile new overclock kernal from stock kernal source? Their's already a overclocked kernal for my device but its for cm11 and i want to use it on 4.1.2 JB stock ROM. Is their any simple way out?
Your help will be appreciated. Thanks .
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
rony raj said:
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
Click to expand...
Click to collapse
Thanks for suggesting new Cm12 kernal.
As of cm11, X264 encoding is important for me, plus their were some other minor bugs in that build. Though i agree its the best build compiled rom for Trend.
I will myself start some project after June~July.
What happened to your device though? You are among the few members who are guiding peoples on threads related to this device and i really appreciate it.

Categories

Resources