5,600,664 Members 36,418 Now Online
XDA Developers Android and Mobile Development Forum

Control your Ascend P6 through Init.d

Tip us?
 
HSD-Pilot
Old
(Last edited by HSD-Pilot; 26th January 2014 at 10:57 AM.) Reason: Update (26.01.2014) - Significant Performance-Update, Minfree Supercharged
#1  
HSD-Pilot's Avatar
Recognized Contributor - OP
Thanks Meter 1892
Posts: 3,198
Join Date: Jan 2012
Location: NRW
Prompt Control your Ascend P6 through Init.d

Control your Ascend P6 through Init.d


In this Thread i will provide you Guys an small Init.d Package, that will let you control the important stuff on your Device without using Third Party Applications. I created this Zip for private use, but i like to share it with you.
This is mainly for advanced Users, so if you're not confirmed with Scripts etc., please DON'T touch the Scripts!
I only tested on Stock Firmware!

I take no Credits for the Tweaks contained in the Zip. They goes out to all the Tweakers here @ xDa!

Click image for larger version

Name:	Screenshot_2013-12-22-15-15-58.png
Views:	1086
Size:	80.8 KB
ID:	2468492Click image for larger version

Name:	Screenshot_2013-12-22-15-16-09.png
Views:	967
Size:	83.5 KB
ID:	2468493


Installation

! PLEASE MAKE AN NANDROID IN RECOVERY, BEVORE YOU FLASH THE ZIP !
! YOU'LL FLASH THIS @ YOUR OWN RISK !

I suggest you Guys to use TWRP by Surdu Petru, because it has Init.d Support by default.

Reboot in Recovery
Backup your Rom
Flash the Ascend_P6_Init.d_Control.zip
Wipe Cache & Dalvik Cache
Reboot



The Logger

I added an Logging System into the Zip, that will check and show you, if the Tweaks applied sucessfully and give you an positive (+) or negative (-) output. That way you don't have to check them manually.
You'll find it in /data/00_init.d_control_log

Click image for larger version

Name:	Screenshot_2013-12-22-15-14-53.png
Views:	897
Size:	146.1 KB
ID:	2468491

It should give you an Output like this
(Which also is an Overview about the Stuff you can handle with this ZIP)

 

>>> SetPerm
+ Init.d Permissions set to 755
@ 01-22-2014 00:55:36

>>> FileSystem
+ EXT4 Partitions present
+ Cache Partition optimized
+ Cust Partition optimized
+ Data Partition optimized
+ System Partition optimized
+ Remount Done
Please check the Remount.log! If this Script works, you'll see most of your Mounts being Noatime
+ Logger removed
+ File System cleaned
@ 01-22-2014 00:55:39

>>> SQLite -48 Hour Delay-
+ Wifi Sleep is active
+ SQLite Database VACUUM and REINDEX finished
Check the Sqlit.log to see, if SQLite was successful
@ 01-22-2014 00:57:13

>>> DarkyZipalign & Zipalign -48 Hour Delay-
+ DarkyZipalign applied
Check the DarkyZipalign.log to see, if everything was aligned
+ Zipalign finished
Check the Zipalign.log to see, if everything was completed
@ 01-22-2014 00:57:39

>>> Entropy
+ Haveged Binary is active
+ Entropy is active
@ 01-22-2014 00:57:40

>>> Alternative Scheduler & Governor by Surdu_Petru
+ SIO Scheduler present
+ SIOPLUS Scheduler present
+ VR Scheduler present
+ ZEN Scheduler present
+ MINMAX Governor present
@ 01-22-2014 00:57:41

>>> CPUconfig
+ Governor is set to k3hotplug
+ I/O Scheduler is set to zen
+ I/O Settings active
+ SD Cache is set to 2048 kb
+ MIN Frequency is set to 200000 mhz
+ MAX Frequency is set to 1500000 mhz
+ CPU Frequency locked @ 0
+ MIN CORES set to 1
+ MAX CORES set to 4
+ Active Cores locked @ 0
+ MIN GPU Frequency is set to 58000
+ MAX GPU Frequency is set to 480000
+ GPU Frequency locked @ 0
+ MIN DDR Frequency is set to 58000
+ MAX DDR Frequency is set to 450000
+ DDR Frequency locked @ 0
@ 01-22-2014 00:57:54

>>> SCREEN ON / OFF Profile
+ Screen On / Off Profile active
@ 01-22-2014 00:57:54

>>> Kernel
+ Kernel Values applied
+ VM Values applied
@ 01-22-2014 00:57:56

>>> Lowmemorykiller
+ Minfree Adj Values applied
+ Minfree Cost Values applied
+ Minfree Debug_Level Values applied
+ Minfree Values applied
@ 01-22-2014 00:57:57



The CPU Script

Probaply the most interessting Script 4 us is the 60CPUconfig - Script. It will let you:

Set CPU Governor
Set I/O Scheduler
Set SDCache
Set MIN/MAX CPU Frequencys
Lock active CPU Frequency
Set MIN/MAX abvailable Cores
Lock active Cores
Set MIN/MAX GPU Frequencys
Lock active GPU Frequency
Set MIN/MAX DDR Frequencys
Lock active DDR Frequency
Set Screen ON / OFF Profiles


I tried to keep it easy to handle, so all you have to do, is to set your Values on Top (one time for Screen On & one time for Screen Off)!

 

#---------------------------------------------#
# Configure your SCREEN ON Values #
#---------------------------------------------#

# Set Scaling Governor
# k3hotplug minmax ondemand performance

GOVERNOR=k3hotplug

#---------------------------------------------#

# Set I/O Scheduler
# cfq deadline noop sio sioplus vr zen

SCHEDULER=cfq

#---------------------------------------------#

# SDCache
# 128 256 512 1024 2048 4096

READ_AHEAD_KB=2048

#---------------------------------------------#

# Set MIN/MAX CPU Frequency
# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000

CPU_MIN=200000
CPU_MAX=1500000


#---------------------------------------------#

# Lock CPU Frequency
# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000
# Stock 0

CPU_FREQ=0

#---------------------------------------------#

# Set MIN/MAX available Cores
# 1-4

CORE_MIN=1
CORE_MAX=4


#---------------------------------------------#

# Lock active CPU Cores
# 0 - 4
# Stock 0

CORE_LOCK=0

#---------------------------------------------#

# Set MIN/MAX GPU Frequency
# 58000 120000 240000 360000 480000

GPU_MIN=58000
GPU_MAX=480000


#---------------------------------------------#

# Lock GPU Frequency
# 58000 120000 240000 360000 480000
# Stock 0

GPU_FREQ=0

#---------------------------------------------#

# Set MIN/MAX DDR Frequency
# 58000 120000 360000 450000

DDR_MIN=58000
DDR_MAX=450000


#---------------------------------------------#

# Lock DDR Frequency
# 58000 120000 360000 450000
# Stock 0

DDR_FREQ=0


#---------------------------------------------#
# Configure your SCREEN OFF Values #
#---------------------------------------------#

# Set Scaling Governor
# k3hotplug minmax ondemand performance

SLEEP_GOVERNOR=ondemand

#---------------------------------------------#

# Set I/O Scheduler
# cfq deadline noop sio sioplus vr zen

SLEEP_SCHEDULER=noop

#---------------------------------------------#

# Set MIN/MAX CPU Frequency
# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000

SLEEP_CPU_MIN=200000
SLEEP_CPU_MAX=600000


#---------------------------------------------#

# Lock CPU Frequency
# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000
# Stock 0

SLEEP_CPU_FREQ=0

#---------------------------------------------#

# Set Min/Max available Cores
# 1-4

SLEEP_CORE_MIN=1
SLEEP_CORE_MAX=1


#---------------------------------------------#

# Lock active CPU Cores
# 0 - 4
# Stock 0

SLEEP_CORE_LOCK=0

#---------------------------------------------#


# Set MIN/MAX GPU Frequency
# 58000 120000 240000 360000 480000

SLEEP_GPU_MIN=58000
SLEEP_GPU_MAX=120000


#---------------------------------------------#

# Lock GPU Frequency
# 58000 120000 240000 360000 480000
# Stock 0

SLEEP_GPU_FREQ=0

#---------------------------------------------#

# Set MIN/MAX DDR Frequency
# 58000 120000 360000 450000

SLEEP_DDR_MIN=58000
SLEEP_DDR_MAX=120000


#---------------------------------------------#

# Lock DDR Frequency
# 58000 120000 360000 450000
# Stock 0

SLEEP_DDR_FREQ=0


If you're not sure, that your Values are stable, let your modified Script run through SManager without the on Boot option for at least 24 Hours. After that you can add it back into the /system/etc/init.d - Folder.
I'll take care about the right Permissions, if you forgot to set them.


Uninstallation

The Zip contains an Uninstaller, so to get back to Stock you simply have to type this commands in the included Terminal Emulator

su [enter]
uninstall [enter]

and confirm your choice.

With v1.1 i added 3 CPU Profiles, that can be applied with the Terminal Emulator.
Simply type

su [enter]
battery, game or default[enter]


to switch between them. Of course you can edit them, to fit your needs. You'll find them in

/system/bin/


Alright, that's it for now. I'll edit this Post as soon as i got more Time.
Feel free to play around with the Scripts / Values and share your experience with us.
If you notice any Errors, let me know.


DOWNLOAD [ Official Huawei FW ]

DOWNLOAD [ Official Huawei FW + HA P6 Custom Kernel ]

DOWNLOAD [CM10 ]


The Following 7 Users Say Thank You to HSD-Pilot For This Useful Post: [ Click to Expand ]
 
nudi
Old
#2  
Junior Member
Thanks Meter 5
Posts: 21
Join Date: Jul 2008
Hallo HSD-Pilot,

I install yesterday the one for the CLEANROM_V1 from Petru.
Now the Software run very smooth. The Systemstart is very fast now!
But i have no possibility to start in to the Twrp-Recovery.
Need help.
 
HSD-Pilot
Old
#3  
HSD-Pilot's Avatar
Recognized Contributor - OP
Thanks Meter 1892
Posts: 3,198
Join Date: Jan 2012
Location: NRW
Clean Rom replaces the Stock Recovery with TWRP. So to boot into Recovery you have to hold both Vol. Keys while Power on your Device. Just like you usually flash Stock Firmwares out of the dload Folder.

Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
The Following User Says Thank You to HSD-Pilot For This Useful Post: [ Click to Expand ]
 
nudi
Old
(Last edited by nudi; 22nd December 2013 at 07:21 PM.)
#4  
Junior Member
Thanks Meter 5
Posts: 21
Join Date: Jul 2008
Quote:
Originally Posted by HSD-Pilot View Post
Clean Rom replaces the Stock Recovery with TWRP. So to boot into Recovery you have to hold both Vol. Keys while Power on your Device. Just like you usually flash Stock Firmwares out of the dload Folder.

Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
No! After Script install it don't do it.
But i have a solution.
Install ROM Manager v.5.5.3.4. Of course it is primay for cwm but there is the option "reboot into recovery system".
This function is a way to start into twrp.
 
HSD-Pilot
Old
#5  
HSD-Pilot's Avatar
Recognized Contributor - OP
Thanks Meter 1892
Posts: 3,198
Join Date: Jan 2012
Location: NRW
The Zip shouldn't effect the Recovery Partition, so TWRP should boot. There's nothing contained, that touches the Recovery. You tried to uninstall the Pack (su > uninstall) ?


Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
The Following User Says Thank You to HSD-Pilot For This Useful Post: [ Click to Expand ]
 
benna
Old
#6  
benna's Avatar
Senior Member
Thanks Meter 23
Posts: 315
Join Date: Jun 2012
so I see it setsbthe freeq of the cpu. what willbhapen if I use setcpu now?
can you please provide us the coding of the scripts? I would like to paste them manualy in my inid.t folder. please
 
HSD-Pilot
Old
#7  
HSD-Pilot's Avatar
Recognized Contributor - OP
Thanks Meter 1892
Posts: 3,198
Join Date: Jan 2012
Location: NRW
Quote:
Originally Posted by benna View Post
so I see it setsbthe freeq of the cpu. what willbhapen if I use setcpu now?
can you please provide us the coding of the scripts? I would like to paste them manualy in my inid.t folder. please
SetCPU usually kicks in after the init. d Scripts, so it will overwrite the Values.
The Zip contains an Script called 80SetCPU, this will do the same like the App.

 

#!/system/bin/sh

LOG_FILE=/data/00_init.d_control_log/01Init.d_Control.log
echo ">>> SetCPU" | tee -a $LOG_FILE;

#---------------------------------------------#
# Configure your Values #
#---------------------------------------------#

# Set Scaling Governor
# k3hotplug minmax ondemand performance

GOVERNOR="k3hotplug"

#---------------------------------------------#

# Set IO Scheduler
# cfq deadline noop sio sioplus vr zen

SCHEDULER="zen"

#---------------------------------------------#

# Set Min & Max Frequency
# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000

CPU_MIN=200000
CPU_MAX=1500000


#---------------------------------------------#
# Apply Configuration #
#---------------------------------------------#

#Set CPU Governor

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor; else
echo "- Unable to set CPU Governor. File NOT found!" | tee -a $LOG_FILE;
fi;
if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ]; then
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor;
fi;
if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor ]; then
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor;
fi;
if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor ]; then
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor;
fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor=$GOVERNOR ]; then
echo "+ $GOVERNOR Governor is running" | tee -a $LOG_FILE; else
echo "- $GOVERNOR Governor is NOT running" | tee -a $LOG_FILE;
fi;

#---------------------------------------------#

# Set Scheduler

dm=/sys/block/dm-*
loop=/sys/block/loop*
mmc=/sys/block/mmc*
mtd=/sys/block/mtd*
nbd=/sys/block/nbd*
ram=/sys/block/ram*
zram=/sys/block/zram*

for a in $dm $loop $mmc $mtd $nbd $ram $zram; do
if [ -e ${a}/queue ]; then
echo $SCHEDULER >> ${a}/queue/scheduler;
fi; done

sleep 1

if [ /sys/block/mmcblk0/queue/scheduler=$SCHEDULER ]; then
echo "+ $SCHEDULER Scheduler is running" | tee -a $LOG_FILE; else
echo "- $SCHEDULER Scheduler is NOT running" | tee -a $LOG_FILE;
fi;

#---------------------------------------------#

# Set MIN/MAX Frequency

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ]; then
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq; else
echo "- Unable to set MIN Frequency. File NOT found!" | tee -a $LOG_FILE;
fi;
if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq ]; then
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq;
fi;
if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq ]; then
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq;
fi;
if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq ]; then
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq;
fi;

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq ]; then
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq; else
echo "- Unable to set MAX Frequency. File NOT found!" | tee -a $LOG_FILE;
fi;
if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq ]; then
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq;
fi;
if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq ]; then
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq;
fi;
if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq ]; then
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq;
fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq=$CPU_MIN ]; then
echo "+ MIN Frequency is set to $CPU_MIN mhz" | tee -a $LOG_FILE; else
echo "- MIN Frequency is NOT set to $CPU_MIN mhz" | tee -a $LOG_FILE;
fi;
if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq=$CPU_MAX ]; then
echo "+ MAX Frequency is set to $CPU_MAX mhz" | tee -a $LOG_FILE; else
echo "- MAX Frequency is NOT set to $CPU_MAX mhz" | tee -a $LOG_FILE;
fi;

#---------------------------------------------#

echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;


Just set your Values on top and reboot :thumbup:

Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
HUAWEIAscendP6 Old
#8  
Guest
Thanks Meter
Posts: n/a
Works flawlessly!!!

HUAWEIAscendP6
The Following User Says Thank You to For This Useful Post: [ Click to Expand ]
 
HSD-Pilot
Old
#9  
HSD-Pilot's Avatar
Recognized Contributor - OP
Thanks Meter 1892
Posts: 3,198
Join Date: Jan 2012
Location: NRW
Uploaded an small Update

- cleaned some scripts
- added CPU / GPU LOCK Script
- rearranged the Build.prop Tweaks
- replaced Bootanimation (Nexus)

Use the uninstaller to revert back to Stock! It will handle everything 4 ya (incl. restore Stock Bootanimation).

Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
The Following User Says Thank You to HSD-Pilot For This Useful Post: [ Click to Expand ]
 
nARDOs
Old
#10  
Senior Member
Thanks Meter 27
Posts: 330
Join Date: Apr 2013
Quote:
Originally Posted by HSD-Pilot View Post
Uploaded an small Update

- cleaned some scripts
- added CPU / GPU LOCK Script
- rearranged the Build.prop Tweaks
- replaced Bootanimation (Nexus)

Use the uninstaller to revert back to Stock! It will handle everything 4 ya (incl. restore Stock Bootanimation).

Gesendet von meinem HUAWEI P6-U06 mit Tapatalk
hi

which app works best with this script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes