Sie sind auf Seite 1von 9

Here are some intructions/tips about how to play with the kernel. Terminal is needed.

If you want to change the values,it needs su permission. If you get 'Permisson denied',you need su permisson. You can cd to the folder first,then do echos. Force using Mali HW EGL driver: Goto /system/lig/egl Delete/rename libGLES_android.so Edit egl.cfg,only keep "0 0 mali" this line. Save and reboot. Remember to backup these files. If it cannot boot,use TWRP file manager to recover changes. Lagness is free now(even use Hotplug + Powersaving) (BTW i haven't enabled Force GPU Rendering) ( Boot time ) CoCore-E boots faster than stock normally. Quote: Stock: 8000ms - 8500ms CoCore-E: 7800ms - 8000ms How to check boottime? Quote: cat /d/boottime/summary * TWRP kernel boottime is longer(around 8000ms).Because of that big ramdisk! ( Bootanimation ) Put bootanimation.zip in /system/media/. Recommend you changing the permission to 0666. If there is no bootanimation.zip,kernel will show you Samsung's. ( CPU governors ) Quote: Performance,OnDemand(default),Powersave, Userspace,Conservation,Interactive,PegasusQ,HotPlu g, Nightmare,OnDemandQ,AbyssPlug, Smartassv2, Zzmoove * OnDemand has been patched cpu idle detection * PegasusQ is taken from SiyahKernel (new version) * Personaly,I use PegasusQ/OnDemand(Q)/HotPlug * To be honest,most of custom governors are based on ondemand/interactive * OndemandQ is a new governor.It will hotplug cpu when screen turns off only. * If you mind the battery life time,choose HotPlug.It hotplugs cpu frequently. * Interactive updated to linux-android-3.4 [Thanks!Aditya!] * Zzmoove is new version(0.3),i havent tested fully. ( IO schedulers ) Quote: SIO(2012),VR,BFQ(v5r1),CFQ,NOOP,ZEN,ROW(v4),Deadli ne * Please choose them by yourself * Personaly.i use SIO.

( Deepest sleep state ) Stock deepest is 3.Now it is 4 by default. Deepest supported is 5. To change: Quote: echo 5 > /d/cpuidle/deepest_state * PegasusQ(hotplug governors) works badly with 5 * OnDemand works well with 5 * Please note that it wont increase the using time but standby time. To check the cpuidle state: Quote: cat /d/cpuidle/stats ( zRAM SWAP ) [zRAM] zRAM is optimized for Android. It is not lazy anymore. Using zRAM will take a little CPU,because it needs to compress/decompress memory . Setup disksize first: (example: 96mb= 9610241024) Quote: echo 100663296 > /sys/block/zram0/disksize * Lager size more RAM will be compressed. Enable: Code: mkswap /dev/block/zram0 swapon /dev/block/zram0 To check how many does it use: Quote: cat /sys/block/zram0/num_reads cat /sys/block/zram0/num_writes * You can get other info in its sysfs [SWAP] Format/resize your SdCard via computer first. Enable: Quote: mkswap /dev/block/mmcblk1p1 swapon /dev/block/mmcblk1p1 ( Init.d script ) Please install busybox in system first I recommend you install busybox via apps Create a new folder named 'init.d' in /system/etc Set the permisson of init.d foler to 0777(rwxrwxrwx) (at least has read and exec permission) Set the owner to 0.0 (root root) Put some scripts (any name you like) in init.d folder with permisson 0777 (rwxrw xrwx) (at least has read and exec permission) Scripts with right permisson will be runned when system boots.

( Charger control ) Please note that this control can damage your battery/phone. If your battery/phone damaged,read the top of #1 post. Lower current makes the charging longer,but protects battery. Too high current can burn your battery! I recommend you that dont set the max limited current over 900mA. To change the AC max limited current: (range: 100 - 1100) (default: 600) Quote: echo xxx > /sys/module/abb_charger/parameters/max_ac_current To change the USB max limited current: (range: 50 - 1100) (default: 500) Quote: echo xxx > /sys/module/abb_charger/parameters/max_usb_current * Your values wont be applied immediately.They will be applied when plug charger . * I recommend you input some values like 300,350,600... * The value(s) that is not in range will be reverted to stock default value(s). * Increase USB current properly can implement USB fast charging To get the charging current: When you plug charger: Quote: dmesg | grep -i ab8500-charger ( Charge cycle control ) To increase the recharge times: (Default: 3) Quote: echo 5 > /sys/module/abb_chargalg/parameters/recharge_cycle * 5 is recommended.If you want more recharging. * This probably can make phone charge deeper,do it once a month if you want. ( Real charged notification ) Well,please let me call it notification. To be honest,it needs to check manually. Quote: cat /sys/module/abb_chargalg/parameters/eoc_status * You can use Rootexplorer to view this file. * When it says "First full charging reached",then the UI should show you charged 100% But it is not the real full charged. * When it says it is the real full charged,you can unplug the charger. * When you are charging and do a reboot will reset the counter. * According to my experiments,it needs 1-2 hours to charge to real full. ( Sound control ) Please note that listening to too high volume music over 1 hour can damage your ears. Or makes your speaker/headset overload. (5.0+) Sound control has been enhanced.Please read it carefully. Switch to sound control folder: cd /sys/mo*/snd_soc*/p* Use RootExplorer to view this folder,you will see a lot files.

Sound hacks wont take effects immediately.It depends on powering on/off ab8500 a soc. Stop music for 5s to let ab8500 asoc shut down fully,then turn on music. You need to enable XXXXX_con first,then tweak the XXXXX_bit. After enabling XXXXX_con,it will be applied when codec powers on or it wont. How do i check whether it has shuted down or not? dmesg | grep codec If you get "Disable ab850x",it has been powered off. I will explain how to calculate the binay values below. If we echo 0000 to something,system will consider it as 0. But that doesnt matter. '(default)' means that is my default setting in sound control. [AnaGain3] (Headset audio path): Ana stands for 'analong'.This is analong gain. To enable control: Quote: echo 1 > anagain3_con To tweak volume: [volume 0(default, +31dB) > 34 > 68(stock) > 85 > 87] Quote: echo 0 > anagain3_bit * Most values(except 0,34,68,85) will make the volume lost balance. * If you hear too much noise with 0,34 is recommended. * It is nice to use 0 with large speakers(audio output) [HsXDigGain] (Headset Digital Gain) HsL means left channel.HsR is the right. To enable control: Quote: echo 1 > hsldiggain_con echo 1 > hsrdiggain_con To tweak: * 0000: +8 dB gain (default) * 0001: +7 dB gain * ....: -1 dB step * 0111: +1 dB gain * 1000: 0 dB gain * 1001 to 1111: -inf dB gain (mute) Quote: echo 0000 > hsldiggain_bit echo 0000 > hsrdiggain_bit * If you use +31 dB AnaGain3 + +8 dB DigGain,the result will higher than +39dB! * Be careful,when the volume is too high,codec will power off automatically. * Experience the differences between digital gain and analong gain by yourself. [HsLowPow] (Headset low power mode) This lowpow mode is enabled by driver normally. If you want high performance audio instead of LPA(low power audio), You can disable it. To enable control: Quote: echo 1 > hslowpow_con To tweak: * 0: Normal Operation (default) * 1: Hs drivers in Low Power Quote: echo 0 > hslowpow_bit

[HsDacLowPow] (Headset DAC low power mode) DAC is Digital-to-Analong Converter. This lowpow mode is enabled by driver normally. To enable control: Quote: echo 1 > hsdaclowpow_con To tweak: * 00: Normal Operation (default) * 01: Hs DAC drivers in Low Power * 10: Hs DAC in Low Power * 11: Hs DAC and Hs DAC drivers in Low Power Quote: echo 00 > hsdaclowpow_bit [HsHP] (Headset high pass filter) This high pass filter is enabled by driver normally. If you want more low freq sound,disable it. To enable control: Quote: echo 1 > hshp_con To tweak: * 0: Headset high pass filter disabled (defualt) * 1: Headset high pass filter enabled (offset cancellation enabled) Quote: echo 0 > hshp_bit [ClassDDithHPGain] ClassD is a kind of amplifier. According to the documents,our ClassDs only relate to Handsfree(speaker). To enable control: Quote: echo 1 > classdhp_con To tweak: * Gain control for the high pass component of dithering filter * 0000: Minimum gain * ....: * 1010: Maximum gain (default) Quote: echo 1010 > classdhp_bit [ClassDDithWGain] * Gain control for the white component of dithering filter * 0000: Minimum gain * ......: * 1010: Maximum gain Quote: echo 1 > classdwg_con echo 1010 > classdwg_con [ClassDHiVol] This is a gain of speaker.But +2dB only. echo 1 > classdhivol_con Say 1(default) to enable: Quote: echo 1 > classdhivolhfl_bit echo 1 > classdhivolhfr_bit * In fact,our speaker is right channel only! [MicXGain] doesnt work...I will add more in the future. How to calculate the binary values? We use HsXDigGain as example. The gain step is "+1". In binary: So the values will like these:

0+1 = 1 | 0001: +7 dB 1+1 = 10 | 0010: +6 dB 10+1 = 11 | 0011: +5 dB 11+1 = 100 | 0100: +4 dB ..... | ...... [Experts!]: This method can work on any ab850x codec platform! Quote: cd /d/asoc/U*/ab* Play music,reduce the volume. Now we are going to edit the codec registers. Quote: echo REG VAL > codec_reg E.G: AnaGain3: Quote: echo 0x16 0x00 > codec_reg HsDigGain: (left/right channel) Quote: echo 0x4F 0x00 > codec_reg echo 0x50 0x00 > codec_reg Disable all lowpow mode: Quote: echo 0x04 0x00 > codec_reg * These hacks will restore when codec power off. ( Touch Booster control ) What is touch booster? It can jump the cpufreqs(in fact,not only cpufreqs) to high value when you touch to improve the experience of touching. Disabling this can save some power. To disable: (default: enable) Quote: echo 0 > /sys/module/mxt224e/parameters/touch_boost To change the boost freq: (default: 800000) (Vaild: 200000,400000,800000,1000000 ) Quote: echo xxxxxx > /sys/module/mxt224e/parameters/touch_boost_freq ( Touch Sensitivity control ) If you play some games like Temple Run,higher sensitivity might help. To change: (stock: 22) (default: 17) (range: >0) Quote: echo xx > /sys/module/mxt224e/parameters/threshold_batt * Lower value,higher sensitivity. * Turn on/off screen to apply the changes * Parameter "threshold" to check the changes * When charging,the threshold will be forced replace by threshold_chrg * With high sensitivity,your touches can be applied even screen coveres somethin g. ( Fsync control ) To disable fsync: (0=disable 1=enable) Quote: echo 0 > /sys/module/sync/parameters/fsync

* Disabling fsync can improve io performace, but it can make the data which hasnt been written lose when a sudden poweroff co mes. * Disabling fsync or enabling dyn_fsync will make param driver fail to store dat a That means your "reboot recovery" will be failed. To enable dynamic fsync: Quote: echo 0 > /sys/module/sync/parameters/fsync Quote: echo 1 > /sys/module/sync/parameters/fsync_dyn * Dynamic fsync will sync all buffers when screen turns off, * If there is a heavy io load,the screen might stick for seconds. * This is an experiment feature. ( Mali GPU ) Mali debug level Disabling can speed up a bit Quote: echo 0 > /sys/module/mali/parameters/mali_debug_level * Higher level,more messages will be printed in dmesg,system will slow down Mali L2 max reads control: (Stock:28kb,Default:48kb(max)) Quote: echo xx > /sys/module/mali/parameters/mali_l2_max_reads * Some values will slow down graphics * If not sure,keep default Mali PM sampling rate: (Default: 1000ms) Quote: echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate Mali PP scheduler tweaks: (Default: disable) Quote: echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs * Enabling this,Some places will over ahead,choose by your self Mali Utilization sampling rate: (Stock:500ms,Default:1000ms) How often report a mali utilization. Quote: echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate * Keep this default if unsure. Mali Utilization control (Default: low_to_high 192 high_to_low 64) This probably will relate to the smoothness. Our driver will report a mali utilization frequently. This utilization(range: 0~255) means the load of mali. If utilization is bigger than low_to_high,driver will request higher hardware pe rformance(highest APE/DDR OPP). If utilization is smaller than high_to_low,the driver will store the requested O PP(uses low OPP). OPP can be understood as freq simply. To check mali utilization values: Quote: echo 5 > /sys/module/mali/parameters/mali_debug_level cat /proc/kmsg | grep -i utilization Then you will see the utilization it reports. When it says SIGNAL_HIGH,it will request highest OPP.

When it says SIGNAL_LOW,it will request lowest OPP. Press Ctrl+C to stop printing. In my Temple Run,it seldom reaches low_to_high(192). That means you can reduce low_to_high to trigger higher OPP requirement. For smoothness and less powersaving: Set low_to_high between 100-192. Quote: echo 120 > mali_utilization_low_to_high ( TCP congestions ) Supported: Quote: cubic(default),westwood,highspeed,vegas,veno,yeah To check all the available options: Quote: busybox sysctl net.ipv4.tcp_available_congestion_control To change to other option: Quote: busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO Quote: #include Francisco.franco's experiments [Thanks!] Latency - Download - Upload cubic: 1st run: 15ms - 10,75Mbps - 7,82Mbps 2nd run: 14ms - 10,84Mbps - 8,06Mbps westwood: 1st run: 11ms - 17,65Mbps - 8,30Mbps 2nd run: 13ms - 13,28Mbps - 8,29Mbps highspeed: 1st run: 13ms - 10,76Mbps - 7,94Mbps 2nd run: 16ms - 14,42Mbps - 8,52Mbps vegas: 1st run: 14ms - 8,49Mbps - 6,62Mbps 2nd run: 14ms - 12,00Mbps - 7,07Mbps veno: 1st run: 13ms - 9,58Mbps - 8,13Mbps 2nd run: 13ms - 8,50Mbps - 7,64Mbps yeah: 1st run: 14ms - 13,37Mbps - 8,28Mbps 2nd run: 17ms - 13,89Mbps - 8,14Mbps * I use YeAh * In fact,every congestion is disigned for different environments. * Google to learn deeper! ( EGL Driver ) To remove sw egl driver: Edit /system/lib/egl.cfg Quote: 0 0 android

0 1 mali To Quote: 0 1 mali * According to my feelings: after removing sw egl driver,UI is faster ( Service Mode ) In dialer, type: Secret code:*#197328640*# (service mode) Secret code:*#9900*# (SysDump) In SysDump: Disable fastdormancy might help 3G standby time (Depends on your mobile base sta tion) * Google to learn more RAM DUMP is a debugger.Most of us wont use it.So disable it. (Tap it,every tap w ill make a reboot,until it shows you "Disable....",then tap disable,it is disabl ed) * Google to learn more about secret code ( Logcat ) Well,we have made android logger(logcat) as module to free more RAM. Some guys request logcat. Now we provide you a workaround: Create a new init.d script: Quote: #!/system/bin/sh insmod /lib/modules/logger.ko Then you can use logcat command.

Almost tweaks will be restored to default after reboots. So you can make your tweaks as init.d scripts to apply them when boots.

Das könnte Ihnen auch gefallen