Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Init.d scripts

OP stevehkim

30th January 2012, 07:11 PM   |  #1  
OP Senior Member
Thanks Meter: 752
 
2,791 posts
Join Date:Joined: Oct 2011
More
Here are the init.d scripts that I have been using for Siyah. Please note that 95% of the scripts were done by Pikachu's thunderbolt scripts and I have modified then to my liking. Thanks to Pikachu for the hard work he has put in for the developement of our devices. For those that will use these scripts please use them with caution! I am not responsible for any damage done to your phone! You are free to use these as you wish, adjust them to your liking. The s70darkyzipalign, s98cfs, s98systemtweak should be universal for all setups and you do not need to adjust these init.d scripts. The one you need to be aware of is the s98bolt1 and screenstate_scaling script. The s98bolt1 script has cpu freq. steps set at max 1504 min 100. Scaling @ max 1304 min 200. The voltages for these steps are pretty aggressive and may not work for your device so please PLEASE adjust them accordingly. This script will also set ondemand/sio as default. You can replace those as you wish. GPU is set for 40, 133, 267mhz. (Andreilux's settings, Thanks Andrei) Sched_mc and AFTR have been enabled for some extra power saving.

Screenstate_scaling have been modified to set as Ondemand as wake governer and Powersave as sleep governer. You can adjust these as well. The scripts are pretty self explantory and you can adjust these values using root explorer and using the menu in root explorer to "open in text editor". Or you can you wordpad or notepad++ on your pc and adjust them. Save the scripts to your phone. Using root explorer copy the init.d scripts to /etc/init.d. Paste in this directory and set permissions as rwx,rwx,rwx and reboot.

I am sure I missed some things as I'm kind of in a hurry. Please pm me if you have any questions or need help. I have used this setup for quite some time now without any problems. Battery life has been amazing without sacrificing performance. Oh please do not use VC to save boot settings as these will clash. Everything in the init.d scripts will do the same as VC as long as you adjust them accordingly. Good luck and happy flashing/modding!
P.S. After downloading the file remove the .txt extension in the files before using. Thanks!

Here is the link to the Originator and Creator of these awesome scripts. Thanks Pikachu!

http://forum.xda-developers.com/show...php?p=18285859

Attached Files
File Type: txt S70darky_zipalign.txt - [Click for QR Code] (1.4 KB, 1155 views)
File Type: txt s98bolt1.txt - [Click for QR Code] (1.9 KB, 982 views)
File Type: txt S98CFS.txt - [Click for QR Code] (503 Bytes, 712 views)
File Type: txt S98screenstate_scaling.txt - [Click for QR Code] (34.1 KB, 892 views)
File Type: txt S98system_tweak.txt - [Click for QR Code] (33.0 KB, 1513 views)
Last edited by stevehkim; 1st February 2012 at 04:14 PM.
The Following 7 Users Say Thank You to stevehkim For This Useful Post: [ View ]
30th January 2012, 07:33 PM   |  #2  
Senior Member
Flag OKC
Thanks Meter: 138
 
415 posts
Join Date:Joined: May 2011
More
I just want to make sure before I utilize these. I need to use a file manager to place these in /etc/unit.d folder without the .txt correct?

Should I remove the existing scripts as well?

Edit: do these scripts completely take the place of voltage control and setcpu? I wanted to get all of my questions out of the way
Last edited by moustro; 30th January 2012 at 07:37 PM.
30th January 2012, 07:40 PM   |  #3  
Alucardis666's Avatar
Senior Member
Miramar
Thanks Meter: 229
 
1,951 posts
Join Date:Joined: Jul 2009
More
These seem awesome. Can't wait to try them out :)
30th January 2012, 07:44 PM   |  #4  
OP Senior Member
Thanks Meter: 752
 
2,791 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by moustro

I just want to make sure before I utilize these. I need to use a file manager to place these in /etc/unit.d folder without the .txt correct?

Should I remove the existing scripts as well?

Edit: do these scripts completely take the place of voltage control and setcpu? I wanted to get all of my questions out of the way

Everything you posted is correct. Please keep in mind the voltage settings are a little extreme. If you think or know your phone can handle the UV then just drop them in without modifying. But if you're not sure add +25 mv to each step.
30th January 2012, 07:48 PM   |  #5  
OP Senior Member
Thanks Meter: 752
 
2,791 posts
Join Date:Joined: Oct 2011
More
I almost gaurantee your phone will sleep like a baby. And fly like the wind when in use.
30th January 2012, 08:03 PM   |  #6  
Member
Flag São Paulo
Thanks Meter: 9
 
80 posts
Join Date:Joined: Jan 2012
More
Thanks for the scripts!

I've also found an interesting script at 9100 Siyah Kernel topic ( http://forum.xda-developers.com/show...3838&page=1813 )

I got sleep of death by using below script so you may want to check voltages setting before using it.

Code:
#!/system/bin/sh

# ******************
# 1°) I/O Schedulers
# ******************

# Set i/o scheduler (Valid values are: noop, deadline, cfq, bfq, sio, vr, anticipatory)
echo bfq > /sys/block/mmcblk0/queue/scheduler;


# ************************************************
# 2°) Scaling Governor & Smooth Scaling Parameters
# ************************************************

# Set scaling governor, according to available governors in your kernel
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;

# Smooth scaling parameters to control any governor jumping to higher frequency directly.
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_target;
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_offset;
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_step;


# ****************************************************************
# 3°) Deepsleep Levels
#     cpulevel = 4 (100Mhz - 800Mhz, default), 5 (100Mhz - 500Mhz)
#     buslevel = 0 (400MHz, default), 1 (266MHz), 2 (133MHz)
# ****************************************************************

# Set deep sleep frequency & bus speed: 
echo 5 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_cpulevel;
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_buslevel;


# ****************************
# 4°) CPU Frequency & Voltages
# ****************************

# Set frequency steps according to the number of steps in your kernel.
echo "1600 1400 1200 1000 800 500 200 100" > /sys/devices/system/cpu/cpu0/cpufreq/freq_table;

# Set voltages for frequency steps. Changes possible at +/-25mV steps
echo "1350 1275 1150 1050 950 900 850 800" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table;

# Sets global scaling min&max frequencies as 100 and 1000 mhz
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;


# ************************************
# 5°) GPU Clock, Voltages & Thresholds
# ************************************

# Set GPU clocks (Valid values are: 100 114 133 160 200 267 300 400 )
echo "40 133 267" > /sys/class/misc/gpu_clock_control/gpu_control;

# Set GPU Up and Down thresholds
echo "90% 25% 90% 45%" > /sys/class/misc/gpu_clock_control/gpu_control;

# Set GPU voltages (Changes possible at +/-50mV ie at 50000 steps)
echo "850000 900000 950000" > /sys/class/misc/gpu_voltage_control/gpu_control;


# ======================================================
# 6°) Hot Plug Thresholds, Sampling Interval & Frequency
# ======================================================

# Set second core kick-in threshold for screen-on state
echo 35 > /sys/module/pm_hotplug/parameters/loadl;
echo 80 > /sys/module/pm_hotplug/parameters/loadh;

# Set second core kick-in threshold for screen-off state
echo 90 > /sys/module/pm_hotplug/parameters/loadl_scroff;
echo 100 > /sys/module/pm_hotplug/parameters/loadh_scroff;

# Set hot plug sampling intervals for screen-on state
echo 400 > /sys/module/pm_hotplug/parameters/rate;
echo 400 > /sys/module/pm_hotplug/parameters/rate_cpuon;

# Set hot plug sampling intervals for screen-off state 
echo 1000 > /sys/module/pm_hotplug/parameters/rate_scroff;

# Set frequency below which second core will not be turned on, regardless of thresholds.
echo 524288 > /sys/module/pm_hotplug/parameters/freq_cpu1on;


# ===================
# 7°) Bus Frequencies
# ===================

# Set bus frequencies for highest-to-lowest cpu frequencies and enable static bus frequency scaling
#echo "0 0 0 1 1 2 2 2" > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static;
#echo enabled > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static;


# ====================================
# 8°) Schedule Multi Core & Idle Modes
# ====================================

# Enable sched_mc
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings;

# Enable AFTR
echo 3 > /sys/module/cpuidle/parameters/enable_mask;


# =============================
# 9°) Brightness Curve Settings
# =============================

# Brightness settings (Possible values for min_bl = 0 to 255 | min_gamma = 0 to 24 | max_gamma = 0 to 24)
echo 20 > /sys/class/misc/brightness_curve/min_bl;
echo 1 > /sys/class/misc/brightness_curve/min_gamma;
echo 24 > /sys/class/misc/brightness_curve/max_gamma;

# =================================
# 10°) Touch Sensitivity Parameters
# =================================

# Set touch sensitivity (Possible values are between 40 to 80. Lower value = higher sensitivity)
echo 40 > /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold;

# ===================
# 11°) Charge Current
# ===================

# Set AC, Misc & USB charge current (Do not set Ac & Misc more than 1000mA or Usb more than 450)
echo "950 950 450" > /sys/devices/virtual/misc/charge_current/charge_current;

# =======================================
# 12°) Switch Hotplug/DualCore/SingleCore
# =======================================

# Set Dynamic hotplug mode
echo on > /sys/devices/virtual/misc/second_core/hotplug_on;
echo on > /sys/devices/virtual/misc/second_core/second_core_on;


# ===================
# 13°) Disable logger
# ===================

if [ ! -d /data/.siyah ];
then
  mkdir /data/.siyah;
  chmod 777 /data/.siyah;
fi;
touch /data/.siyah/disable-logger;


# ====================
# 14°) Graphic tunings
# ====================

setprop debug.sf.hw 1;  # HARDWARE RENDERING (GPU) 
setprop video.accelerate.hw 1;
setprop debug.performance.tuning 1;
Last edited by Bethrezen1453; 30th January 2012 at 08:05 PM.
30th January 2012, 10:14 PM   |  #7  
OP Senior Member
Thanks Meter: 752
 
2,791 posts
Join Date:Joined: Oct 2011
More
# Set deep sleep frequency & bus speed:
echo 5 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_cpulevel;
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_buslevel;

See the echo 5, change that to 4. And your SOD's will be gone!!
30th January 2012, 10:48 PM   |  #8  
Senior Member
Flag OKC
Thanks Meter: 138
 
415 posts
Join Date:Joined: May 2011
More
Steve you are the man! Thank you for bundling these scripts all in one place. Everything is smooth and my phone is sleeping like a baby so far.
30th January 2012, 11:07 PM   |  #9  
Senior Member
Flag NJ
Thanks Meter: 102
 
472 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by moustro

Steve you are the man! Thank you for bundling these scripts all in one place. Everything is smooth and my phone is sleeping like a baby so far.

What ROM are you using?

Can these scripts be used on Unnamed?
30th January 2012, 11:32 PM   |  #10  
Senior Member
Thanks Meter: 89
 
932 posts
Join Date:Joined: Aug 2009
Unit.d generator in the i9100 forum works great for this.

Must script manager be used to give these scripts root access to work?

Sent from my i777.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes