├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── changelog.sh ├── changelog.txt ├── data └── UKM │ ├── UKM │ ├── UKM.sh │ ├── actions │ ├── adreno_idler │ ├── boolean │ ├── bracket-option │ ├── buildprop │ ├── cpuboostibf │ ├── cpuset │ ├── cpuvolt │ ├── devtools │ ├── dropcaches │ ├── gamma │ ├── generic │ ├── gpuboost │ ├── gpuset │ ├── intellithermal │ ├── ioset │ ├── iosetkryo │ ├── live │ ├── lmk │ ├── mpdboostfreq │ ├── numeric │ ├── powersuspend │ ├── printk │ ├── restorebackup │ ├── serviceset │ ├── socset │ ├── sound │ ├── soundfaux │ ├── speakerfaux │ ├── sqlite │ ├── touch │ ├── url │ ├── voltage │ ├── wake │ └── zram │ ├── busybox │ ├── config.json.generate │ ├── config.json.generate.adv │ ├── config.json.generate.bprop │ ├── config.json.generate.cpu1 │ ├── config.json.generate.cpu2 │ ├── config.json.generate.cpuboost │ ├── config.json.generate.cpuvolt │ ├── config.json.generate.error │ ├── config.json.generate.gamma │ ├── config.json.generate.gpu │ ├── config.json.generate.hotplug │ ├── config.json.generate.info │ ├── config.json.generate.io │ ├── config.json.generate.kryo.io │ ├── config.json.generate.kryo1 │ ├── config.json.generate.kryo2 │ ├── config.json.generate.mem │ ├── config.json.generate.misc │ ├── config.json.generate.profile │ ├── config.json.generate.sound │ ├── config.json.generate.speaker │ ├── config.json.generate.status │ ├── config.json.generate.thermal │ ├── config.json.generate.tools │ ├── config.json.generate.wake │ ├── debug │ ├── last_kmsg │ ├── pvs_bin │ └── speed_bin │ ├── device │ ├── .device.sh │ └── unified.sh │ ├── files │ ├── bck_prof │ ├── dropcaches_prof │ ├── gamma_ak │ │ ├── black_white_gamma.txt │ │ ├── cool_amoled.txt │ │ ├── deep_natural.txt │ │ ├── extreme_amoled.txt │ │ ├── mamba_feat_hackarchive.txt │ │ ├── stock_gamma.txt │ │ ├── triluminos_gamma.txt │ │ └── warm_amoled.txt │ ├── gamma_prof │ ├── gammafaux_prof │ ├── gammafrancoN5_prof │ ├── gammafranco_prof │ ├── lmk_prof │ ├── sound_prof │ ├── speaker_prof │ ├── volt_prof │ └── wake_prof │ ├── sqlite3 │ └── uci └── system └── app └── Synapse └── Synapse.apk /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | # AnyKernel2 Backend 3 | # osm0sis @ xda-developers 4 | 5 | OUTFD=/proc/self/fd/$2; 6 | ZIP="$3"; 7 | DIR=`dirname "$ZIP"`; 8 | 9 | ui_print() { 10 | until [ ! "$1" ]; do 11 | echo -e "ui_print $1\nui_print" > $OUTFD; 12 | shift; 13 | done; 14 | } 15 | show_progress() { echo "progress $1 $2" > $OUTFD; } 16 | set_perm_recursive() { 17 | dirs=$(echo $* | awk '{ print substr($0, index($0,$5)) }'); 18 | for i in $dirs; do 19 | chown -R $1.$2 $i; chown -R $1:$2 $i; 20 | find "$i" -type d -exec chmod $3 {} +; 21 | find "$i" -type f -exec chmod $4 {} +; 22 | done; 23 | } 24 | file_getprop() { grep "^$2" "$1" | cut -d= -f2; } 25 | getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; } 26 | abort() { ui_print "$*"; exit 1; } 27 | 28 | show_progress 1.34 4; 29 | ui_print " "; 30 | mkdir -p /tmp/synapse; 31 | cd /tmp/synapse; 32 | unzip -o "$ZIP"; 33 | set_perm_recursive 0 0 0777 0777 /tmp/synapse; 34 | 35 | 36 | ui_print "***********************************************"; 37 | ui_print "* Welcome to the *"; 38 | ui_print "* Universal Kernel Manager *"; 39 | ui_print "* Created by apb_axel *"; 40 | ui_print "* Modified by yarpiin *"; 41 | ui_print "***********************************************"; 42 | ui_print ""; 43 | ui_print ""; 44 | 45 | 46 | /sbin/busybox mount /system; 47 | 48 | ui_print ""; 49 | ui_print "Creating init.d..."; 50 | mount -o remount,rw /system; 51 | mkdir /system/etc/init.d; 52 | set_perm_recursive 0 0 0755 0755 /system/etc/init.d; 53 | mount -o remount,ro /system; 54 | ui_print " "; 55 | 56 | ui_print ""; 57 | ui_print "Installing ukm..."; 58 | mount -o remount,rw /system; 59 | rm -rf /data/UKM/*; 60 | rm -rf /system/etc/init.d/UKM; 61 | rm -rf /system/xbin/uci; 62 | rm -rf /system/addon.d/UKM.sh; 63 | cp -fvr /tmp/synapse/data/* /data; 64 | cp -f /tmp/synapse/data/UKM/uci /system/xbin/uci; 65 | cp -f /tmp/synapse/data/UKM/busybox /system/xbin/busybox; 66 | cp -f /tmp/synapse/data/UKM/UKM /system/etc/init.d/UKM; 67 | set_perm_recursive 0 0 0755 0755 /data/UKM; 68 | set_perm_recursive 0 0 0755 0755 /system/xbin/uci; 69 | set_perm_recursive 0 0 0755 0755 /system/xbin/busybox; 70 | set_perm_recursive 0 0 0755 0755 /system/etc/init.d/UKM; 71 | mount -o remount,ro /system; 72 | ui_print " "; 73 | 74 | ui_print ""; 75 | ui_print "Installing Synapse..."; 76 | mount -o remount,rw /system; 77 | mkdir /system/app/Synapse; 78 | set_perm_recursive 0 0 0755 0755 /system/app/Synapse; 79 | cp -f /tmp/synapse/system/app/Synapse/Synapse.apk /system/app/Synapse/Synapse.apk; 80 | set_perm_recursive 0 0 0755 0644 /system/app; 81 | ui_print " "; 82 | 83 | ui_print " "; 84 | ui_print "Installing done..."; 85 | ui_print " "; 86 | umount /system; 87 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | # Dummy file; update-binary is a shell script. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UKM REBORN 2 | 3 | ![Synapse logo](https://img.xda-cdn.com/GaXL_y1JB8STTK4pFTitRmFcZeI=/https%3A%2F%2Flh4.ggpht.com%2Fed5XjMyiltwErAFCohZ8cObQilX0aF9EIhQv9bydwGgBpC1a8tHI0zW2LRVxktu_dBc%3Dw300) 4 | 5 | Hi , some of you might seen my support for UKM in general and for OnePlus devices. 6 | 7 | I have always liked to use UKM and Synapse from one simple reason : 8 | 9 | - UKM is one of most powerfull and flexible zip that let you control kernel parameters. 10 | 11 | This project is nothing else than carrying forward original UKM created by @apb_axel and @ak and all credits belong to them. 12 | 13 | Original UKM thread - [https://forum.xda-developers.com/android/software/zip-synapse-script-universal-kernel-t2736986](https://forum.xda-developers.com/android/software/zip-synapse-script-universal-kernel-t2736986) 14 | 15 | ### What is all about? 16 | 17 | In this thread you will find UNIFIED version of UKM that should work on any device from the box 18 | 19 | ### Screenshots: 20 | [![Screenshot_20170702-160229.png](https://s24.postimg.org/eeok75tl1/Screenshot_20170702-160229.png)](https://postimg.org/image/gw0befdhd/) 21 | 22 | [![Screenshot_20170702-160240.png](https://s24.postimg.org/lvxrmdj45/Screenshot_20170702-160240.png)](https://postimg.org/image/5869jvoch/) 23 | 24 | ### Info 25 | 26 | - Zip is still in early stage and been tested only on few devices 27 | - all bugs not working elements or request please report in here i will try to help and fix them 28 | - reports should contain screenshot , path and toggles that are missing or need to be added 29 | 30 | ### What is needed? 31 | 32 | - Root (obviously) 33 | - Working Busybox 34 | - Your ROM has to support init.d scripts 35 | - [Synapse](https://play.google.com/store/apps/details?id=com.af.synapse) 36 | 37 | ### How to install? 38 | 39 | - Reboot in recovery 40 | - Flash the .zip (No cache/dalvik wipe necessary) 41 | - Install Synapse 42 | - You're done! 43 | 44 | ### Download: 45 | 46 | - [UKM FLASHABLE ZIP](https://www.androidfilehost.com/?w=files&flid=154993) 47 | - [UKM - Magisk Module](https://github.com/yarpiin/magisk-UKM) 48 | 49 | ### Git: 50 | 51 | [https://github.com/yarpiin/UKM-unified.git](https://github.com/yarpiin/UKM-unified.git) 52 | 53 | ### Changelog: 54 | 55 | [https://github.com/yarpiin/UKM-unified/blob/UKM-Enhanced/changelog.txt](https://github.com/yarpiin/UKM-unified/blob/UKM-Enhanced/changelog.txt) 56 | 57 | ### Credits: 58 | 59 | - @ak & @apb_axel - for getting this started. 60 | - @AndreiLux - for his awesome app Synapse. 61 | - @osm0sis 62 | - @eng.stk 63 | - @laggardkernel - Magisk Module 64 | 65 | Any suggestions, bugs or others settings you need just let me know. 66 | 67 | ### XDA:DevDB Information 68 | 69 | **Uniified Universal Kernel Manager, Tool/Utility for all devices (see above for details)** 70 | 71 | #### Contributors 72 | 73 | [yarpiin](https://forum.xda-developers.com/member.php?u=5288056) 74 | 75 | **Source Code**: [https://github.com/yarpiin/UKM-unified.git](https://github.com/yarpiin/UKM-unified.git) 76 | 77 | 78 | ### Supported and tested devices so far: 79 | 80 | [https://forum.xda-developers.com/showpost.php?p=71086001&postcount=2](https://forum.xda-developers.com/showpost.php?p=71086001&postcount=2) 81 | 82 | ### Support Links 83 | 84 | - [\[ZIP\] \[Synapse\] Universal Kernel Manager Reborn - unified / any device](https://forum.xda-developers.com/android/software/zip-ukm-reborn-unified-t3558888) by [yarpiin](https://forum.xda-developers.com/member.php?u=5288056) 85 | - [Magisk - Root & Universal Systemless Interface](http://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445) by [topjohnwu](http://forum.xda-developers.com/member.php?u=4470081) 86 | 87 | ### Tips for the Magisk version: 88 | - Reboot is needed for an installation 89 | - No reboot is needed for an **update** in Magisk Manager 90 | -------------------------------------------------------------------------------- /changelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | #************************************************# 5 | # # 6 | # Kernel # 7 | # changelog generator # 8 | # modded by @anarkia1976 # 9 | # written by @fusionjack # 10 | # # 11 | #************************************************# 12 | 13 | # colorize and add text parameters 14 | grn=$(tput setaf 2) # green 15 | yellow=$(tput setaf 3) # yellow 16 | bldgrn=${txtbld}$(tput setaf 2) # bold green 17 | red=$(tput setaf 1) # red 18 | txtbld=$(tput bold) # bold 19 | bldblu=${txtbld}$(tput setaf 4) # bold blue 20 | blu=$(tput setaf 4) # blue 21 | txtrst=$(tput sgr0) # reset 22 | blink=$(tput blink) # blink 23 | 24 | # variables 25 | rdir=`pwd` 26 | CURRENT_DATE=`date +%Y%m%d` 27 | LAST_DATE=`date +%s -d "15 day ago"` 28 | CUSTOM_DATE="$1" 29 | 30 | clear 31 | 32 | echo -e "${bldgrn}" 33 | echo " "; 34 | echo " Yarpiin Kernel CM14.1 "; 35 | echo " "; 36 | echo -e "${txtrst}" 37 | 38 | # generate changelog 39 | echo -e "${blink}${bldblu} *** Generating Changelog ${txtrst}"; echo ""; 40 | if [ -z "$CUSTOM_DATE" ]; then 41 | if [ -z "$LAST_DATE" ]; then 42 | WORKING_DATE=`date +%s "1 day ago"` 43 | else 44 | WORKING_DATE=${LAST_DATE} 45 | fi 46 | else 47 | WORKING_DATE=${CUSTOM_DATE} 48 | fi 49 | 50 | CHANGELOG=$rdir/changelog_${CURRENT_DATE}.txt 51 | 52 | # remove existing changelog 53 | file="$CHANGELOG" 54 | if [ -f "$file" ]; then 55 | echo -e "${txtbld}${red} *** Removing Old Changelog${txtrst}"; echo""; 56 | rm $CHANGELOG; 57 | fi 58 | 59 | # find the directories to log 60 | find $rdir -name .git | sed 's/\/.git//g' | sed 'N;$!P;$!D;$d' | while read line 61 | do 62 | cd $line 63 | # test to see if the repo needs to have a changelog written. 64 | log=$((git log --pretty="* %s (%an) [%h]" --no-merges --since=$WORKING_DATE --date-order) | sed 's/\.git//') 65 | project=$(git remote -v | grep -i origin | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//') 66 | if [ ! -z "$log" ]; then 67 | # write the changelog 68 | echo -e "${txtbld}${yellow} *** Verify Changelog Status ${txtrst}"; 69 | echo -e "${grn} ----> $project: is Updated ${txtrst}"; echo ""; 70 | echo "" >> $CHANGELOG; 71 | echo "Project name: $project" >> $CHANGELOG; 72 | echo "$log" | while read line 73 | do 74 | echo " $line" >> $CHANGELOG 75 | done 76 | echo "" >> $CHANGELOG 77 | fi 78 | done 79 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | / 2 | P/oject name: UKM-unified 3 | 4 | 22/09/17 5 | 6 | * cpu: update amount of cores detection (Slawek) [1007384] 7 | * update readme (Slawek) [154862d] 8 | * misc: fix enable toggles (Slawek) [fb4b998] 9 | * gamma: add support for Boeffla brightnes control (Slawek) [37720e0] 10 | * gamma: add support for Minimum Backlight level By Lord Boeffla (Slawek) [4fcb676] 11 | * gamma: add Oneplus 3T DCI Switch (Slawek) [c84421c] 12 | 13 | 14 | 18/07/17 15 | 16 | * misc: Fix state notifier (Slawek) [83dc179] 17 | * Cpu: Add simple on/off control over the cpus (Slawek) [35bc203] 18 | * Fixes (Slawek) [236af7a] 19 | * device: fix gpu freq sliders not showing in msm8996 devices (Slawek) [eee4884] 20 | 21 | 08/06/17 22 | 23 | * Info: update links (Slawek) [ab65148] 24 | * Cpuboost: Add variables for kryo based devices and correct support of other devices (Slawek) [5350aa7] 25 | * UKM: tidy up and merge most kryo into normal cpu tabs (Slawek) [15fce75] 26 | * UKM: change to update-binary instead of script - based on Anykernel2 by osm0sis (Slawek) [3e9b4cb] 27 | 28 | 23/03/17 29 | 30 | * hotplug: msm performance adjust and add disable knob (Slawek) [67a0692] 31 | * hotplug: Core Control add missing support for a57 cluster (Slawek) [73d929c] 32 | * device.sh: add support for hexa core msm8956 soc (Slawek) [375aca4] 33 | * hotplug: Lazyplug fix enable switch (Slawek) [ea07244] 34 | * device.sh: Corect Kyro clusters naming (Slawek) [b750a10] 35 | * update busybox (Slawek) [fec09af] 36 | * cpuboost: add input boost toggle (Slawek) [cb5e78d] 37 | * changelog: update (Slawek) [7d4ec39] 38 | 39 | 12/03/17 40 | 41 | * UKM: add latest version of Synapse (Slawek) [98c6e4c] 42 | * UKM: Synapse flashed with UKM as default (Slawek) [1d2293e] 43 | * Device.sh: Max Cpu add variable for 4 and 8 cores (Slawek) [268d7b3] 44 | * Hotplug: Add Lazyplug (Slawek) [3af58f1] 45 | * Hotplug: Autosmp add boost tunables (Slawek) [f682563] 46 | * Advanced: add more wakelock controls (Slawek) [cecf8b0] 47 | * gamma: bring back tunables from original gamma file (Slawek) [c61a00b] 48 | * profile: remove rest of profile restoring (Slawek) [8b95586] 49 | * cpuset: add paths for all cpus (Slawek) [1026aed] 50 | * profiles: change to configs (Slawek) [e4e163f] 51 | * restore backup: added paths from original ukm (Slawek) [7444843] 52 | * device: correct cpu numbers (Slawek) [5ad3bcc] 53 | * generate: add path for flars sound control (Slawek) [254b0bd] 54 | * GPU: some devices have same path for gpu lets try it, also enabled adreno boost (Slawek) [ac0639d] 55 | * misc: add Boeffla touchkey controll support (Slawek) [58b45f6] 56 | * live cpu: make core 6 & 7 optional (Slawek) [916a0a0] 57 | * cpu boost: add support for input boost driver by sultanxda (Slawek) [bb6bd66] 58 | * gpu: more governors (Slawek) [acd15f6] 59 | * gpu: governors for various devices (Slawek) [85ca057] 60 | 61 | 26/02/2017 62 | 63 | * misc: add various versions of powersuspend (Slawek) [9ccb750] 64 | * refresh: reduce refresh rate (Slawek) [cd6f73c] 65 | * live: remove doubled gpu rfequency (Slawek) [7c7bc15] 66 | * gpu: add more frequency scaling paths and merge kryo (Slawek) [e1b4106] 67 | * actions: add missing adreno idler (Slawek) [f29df9b] 68 | * gamma: add kcal on/off toggle (Slawek) [902f70c] 69 | * info remove speedbin (Slawek) [67603ee] 70 | * misc: rmove leds control (Slawek) [03ea904] 71 | * cpufreq: corect paths for cpu frequencies (Slawek) [e499160] 72 | 73 | 19/02/2017 74 | 75 | * device: fix cpu temp status and remove Farenheits - we going to use Imperial only (Slawek) [b644623] 76 | * restorebackup: use gamma values from ak kernel (Slawek) [0faa6e7] 77 | 78 | 79 | 80 | 18/02/2017 81 | 82 | * small update (Slawek) [15414fa] 83 | * hotplug: alucard: list frequencies from cpu0 (Slawek) [17514bf] 84 | * gamma: fix backlight dimmer (Slawek) [5ef2722] 85 | * advanced: remove spacer (Slawek) [981de6c] 86 | * gamma: add variable for emulated sd cards (Slawek) [ecdf513] 87 | * kryo.io: add kryo action for io (Slawek) [9fde354] 88 | * kryo I/O: correct paths for i/o sheduler (Slawek) [020c208] 89 | * kryo2: correct toggle paths (Slawek) [dd273ff] 90 | * kryo1: correct toggle paths (Slawek) [edb9390] 91 | * cpu2: correct paths for tunables (Slawek) [98d26ac] 92 | * cpu1: correct paths for tunables (Slawek) [4bb57a1] 93 | * boost: universal cpu freq list (Slawek) [f0c227e] 94 | * sound: add flars sound controls for WDC9335 (Slawek) [f3f9bfb] 95 | * misc: add charge levels , remove version string from powersuspend, move fsync (Slawek) [eb3a0b5] 96 | * mem: Dirty Expire and writeback Centisecs (Slawek) [98adb7b] 97 | * I/O: add kryo variable (Slawek) [14baaa6] 98 | * hotplug: organise and add support for hima and thunderplug (Slawek) [ec1113f] 99 | * gpu: add finish quote and fix gpuset for kryo (Slawek) [c46e057] 100 | * i am retarded (Slawek) [527a7a3] 101 | * gpu: add gpuboost action, adreno530 gpu tunables and adreno boost (Slawek) [52be22f] 102 | * gamma: add gamma from AK kernel icluding profiles (Slawek) [5b6e603] 103 | * error: update version and UKM fix button from AK kernel (Slawek) [e70cf00] 104 | * generate: conditionally create volt controll (Slawek) [fa4a76f] 105 | * advanced: remove gentle fair sleepers & addvarious functions (Slawek) [16d0b8d] 106 | * actions: live add missing functions (Slawek) [afcf369] 107 | * Info: up to 3.8.2 Unified version (Slawek) [094586a] 108 | * Cpu Boost splitted from cpu added basic support for little.big clusters (Slawek) [d743e14] 109 | * device: Add most common cpu configurations rename device to unified (Slawek) [0b60d07] 110 | 111 | -------------------------------------------------------------------------------- /data/UKM/UKM: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | # ************************************************************** 4 | # Add Synapse support 5 | # ************************************************************** 6 | 7 | UKM=/data/UKM; 8 | BB=$UKM/busybox; 9 | UCI_CONFIG=$UKM/config.json; 10 | DEBUG=$UKM/debug; 11 | UCI_FILE=$UKM/uci; 12 | UCI_XBIN=/system/xbin/uci; 13 | 14 | # Delete known files that re-create uci config 15 | 16 | if [ -e "/data/ak/ak-post-boot.sh" ]; then 17 | $BB rm -f /data/ak/ak-post-boot.sh #ak 18 | $BB rm -f /sbin/post-init.sh #neobuddy89 19 | fi 20 | 21 | # Delete default uci config in case kernel has one already to avoid duplicates. 22 | 23 | if [ -e "/sbin/uci" ]; then 24 | $BB rm -f /sbin/uci 25 | fi 26 | 27 | # Delete all debug files so it can be re-created on boot. 28 | 29 | $BB rm -f $DEBUG/* 30 | 31 | # Reset profiles to default 32 | 33 | $BB echo "Custom" > $UKM/files/gamma_prof 34 | $BB echo "Custom" > $UKM/files/lmk_prof 35 | $BB echo "Custom" > $UKM/files/sound_prof 36 | $BB echo "Custom" > $UKM/files/speaker_prof 37 | $BB echo "0" > $UKM/files/volt_prof; 38 | $BB echo "0" > $UKM/files/dropcaches_prof; 39 | 40 | # Symlink uci file to xbin in case it's not found. 41 | 42 | if [ ! -e $UCI_XBIN ]; then 43 | $BB mount -o remount,rw /system 44 | $BB mount -t rootfs -o remount,rw rootfs 45 | 46 | $BB chmod 755 $UCI_FILE 47 | $BB ln -s $UCI_FILE $UCI_XBIN 48 | $BB chmod 755 $UCI_XBIN 49 | 50 | $BB mount -t rootfs -o remount,ro rootfs 51 | $BB mount -o remount,ro /system 52 | fi 53 | 54 | # If uci files does not have 755 permissions, set permissions. 55 | 56 | if [ `$BB stat -c %a $UCI_FILE` -lt "755" ]; then 57 | $BB chmod 755 $UCI_FILE 58 | fi 59 | 60 | if [ `$BB stat -c %a $UCI_XBIN` -lt "755" ]; then 61 | $BB mount -o remount,rw /system 62 | $BB mount -t rootfs -o remount,rw rootfs 63 | $BB chmod 755 $UCI_XBIN 64 | $BB mount -t rootfs -o remount,ro rootfs 65 | $BB mount -o remount,ro /system 66 | fi 67 | 68 | # Reset uci config so it can be re-created on boot. 69 | 70 | $UCI_XBIN reset; 71 | $BB sleep 1; 72 | $UCI_XBIN; 73 | -------------------------------------------------------------------------------- /data/UKM/UKM.sh: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | # 3 | # /system/addon.d/UKM.sh 4 | # During a ROM upgrade, this script backs up UKM system files, 5 | # /system is formatted and reinstalled, then the files are restored. 6 | # 7 | 8 | . /tmp/backuptool.functions 9 | 10 | list_files() { 11 | cat < $1 2> /dev/null; 7 | fi; 8 | 9 | $BB echo "`$BB cat $1`"; 10 | else 11 | $BB echo "0"; 12 | fi; 13 | -------------------------------------------------------------------------------- /data/UKM/actions/boolean: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z $2 ]]; then 6 | VALUE=$2; 7 | 8 | if [ "$VALUE" -eq 1 ]; then 9 | $BB echo "Y" > $1 2> /dev/null; 10 | elif [ "$VALUE" -eq 0 ]; then 11 | $BB echo "N" > $1 2> /dev/null; 12 | fi; 13 | fi; 14 | 15 | VALUE=`$BB cat $1`; 16 | 17 | if [ $VALUE = "Y" ]; then 18 | $BB echo "1"; 19 | elif [ $VALUE = "N" ]; then 20 | $BB echo "0"; 21 | else 22 | $BB echo "0"; 23 | fi; 24 | 25 | else 26 | $BB echo "0"; 27 | fi; 28 | -------------------------------------------------------------------------------- /data/UKM/actions/bracket-option: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z $2 ]]; then 6 | $BB echo $2 > $1 2> /dev/null; 7 | fi; 8 | 9 | $BB echo $($BB cat $1 | $BB sed -n -e '/\[[^]]/s/^[^[]*\[\([^]]*\)].*$/\1/p'); 10 | fi; 11 | -------------------------------------------------------------------------------- /data/UKM/actions/buildprop: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [[ ! -z "$2" ]]; then 5 | if [[ "$1" != *".dns"* ]]; then 6 | if [ "$2" != "-1" ]; then 7 | if [ $1 == "dalvik.vm.heapsize" ]; then 8 | VMHS="$2"; 9 | VMHS="$((VMHS))m"; 10 | 11 | setprop $1 $VMHS; 12 | else 13 | setprop $1 "$2"; 14 | fi; 15 | fi; 16 | else 17 | setprop $1 "$2"; 18 | fi; 19 | fi; 20 | 21 | if [ $1 == "dalvik.vm.heapsize" ]; then 22 | VMHS="`getprop "$1" 2> /dev/null`"; 23 | VMHS=${VMHS%?}; 24 | 25 | $BB echo $VMHS; 26 | else 27 | if [ "`getprop "$1" 2> /dev/null`" == "" ]; then 28 | if [ "$1" == "net.hostname" ]; then 29 | $BB echo ""; 30 | elif [ "$1" == "persist.sys.purgeable_assets" ] || [ "$1" == "service.adb.tcp.port" ]; then 31 | $BB echo "0"; 32 | elif [[ "$1" != *".dns"* ]]; then 33 | $BB echo "-1"; 34 | else 35 | $BB echo "0.0.0.0"; 36 | fi 37 | else 38 | $BB echo "`getprop "$1" 2> /dev/null`"; 39 | fi; 40 | fi; 41 | -------------------------------------------------------------------------------- /data/UKM/actions/cpuboostibf: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | T=/sys/module/cpu_boost/parameters/input_boost_freq; 5 | 6 | read() { 7 | VALUE=-1; 8 | NOW=`$BB cat $T`; 9 | for IBF in $NOW; do 10 | VALUE=$(($VALUE+1)); 11 | if [ "$VALUE" -eq $1 ]; then 12 | $BB echo ${IBF:2}; 13 | return 14 | fi; 15 | done; 16 | } 17 | 18 | if [ -f $T ]; then 19 | if [[ ! -z $2 ]]; then 20 | $BB echo "$1:$2" > $T; 21 | fi; 22 | 23 | $BB echo $(read $1); 24 | fi; 25 | -------------------------------------------------------------------------------- /data/UKM/actions/cpuset: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | if [ -f $1 ]; then 6 | PERM=`$BB stat -c %a $1`; 7 | $BB test $PERM -lt "664" && $BB chmod 664 $1 2> /dev/null; 8 | 9 | if [[ ! -z $2 ]]; then 10 | $BB echo $2 > $1 2> /dev/null; 11 | 12 | $BB test "$1" = "`sh $DEVICE DirCPUMinFrequency`" && sh $DEVICE SetCPUMinFrequency $2 2> /dev/null; 13 | $BB test "$1" = "`sh $DEVICE DirCPU1MinFrequency`" && sh $DEVICE SetCPU1MinFrequency $2 2> /dev/null; 14 | $BB test "$1" = "`sh $DEVICE DirCPU2MinFrequency`" && sh $DEVICE SetCPU2MinFrequency $2 2> /dev/null; 15 | $BB test "$1" = "`sh $DEVICE KRYO1MinFrequency`" && sh $DEVICE SetKRYO1MinFrequency $2 2> /dev/null; 16 | $BB test "$1" = "`sh $DEVICE KRYO2MinFrequency`" && sh $DEVICE SetKRYO2MinFrequency $2 2> /dev/null; 17 | $BB test "$1" = "`sh $DEVICE DirCPUMaxFrequency`" && sh $DEVICE SetCPUMaxFrequency $2 2> /dev/null; 18 | $BB test "$1" = "`sh $DEVICE DirCPU1MaxFrequency`" && sh $DEVICE SetCPU1MaxFrequency $2 2> /dev/null; 19 | $BB test "$1" = "`sh $DEVICE DirCPU2MaxFrequency`" && sh $DEVICE SetCPU2MaxFrequency $2 2> /dev/null; 20 | $BB test "$1" = "`sh $DEVICE DirKRYO1MaxFrequency`" && sh $DEVICE SetKRYO1MaxFrequency $2 2> /dev/null; 21 | $BB test "$1" = "`sh $DEVICE DirKRYO2MaxFrequency`" && sh $DEVICE SetKRYO2MaxFrequency $2 2> /dev/null; 22 | $BB test "$1" = "`sh $DEVICE DirCPUGovernor`" && sh $DEVICE SetCPUGovernor $2 2> /dev/null; 23 | $BB test "$1" = "`sh $DEVICE DirCPU1Governor`" && sh $DEVICE SetCPU1Governor $2 2> /dev/null; 24 | $BB test "$1" = "`sh $DEVICE DirKRYO1Governor`" && sh $DEVICE SetKRYO1Governor $2 2> /dev/null; 25 | $BB test "$1" = "`sh $DEVICE DirKRYO2Governor`" && sh $DEVICE SetKRYO2Governor $2 2> /dev/null; 26 | fi; 27 | 28 | $BB echo `$BB cat $1`; 29 | fi; 30 | -------------------------------------------------------------------------------- /data/UKM/actions/cpuvolt: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | VOLT_PROF=$UKM/files/volt_prof; 5 | TABLE=/sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels; 6 | FREQ=$1; 7 | VOLT=$2; 8 | LEVEL="$1 $2"; 9 | 10 | if [ -f $TABLE ]; then 11 | if [[ ! -z $VOLT ]]; then 12 | if [ $FREQ = "global" ]; then 13 | CURR_VOLT=`$BB cat $VOLT_PROF`; 14 | NEW_VOLT=$((VOLT - CURR_VOLT)); 15 | $BB echo $VOLT > $VOLT_PROF; 16 | 17 | if [ "$NEW_VOLT" -gt "0" ]; then 18 | NEW_VOLT="+$NEW_VOLT"; 19 | else 20 | NEW_VOLT="$NEW_VOLT"; 21 | fi; 22 | 23 | if [ "$NEW_VOLT" -ne "0" ]; then 24 | $BB echo $NEW_VOLT > $TABLE; 25 | fi; 26 | else 27 | $BB echo $LEVEL > $TABLE; 28 | fi; 29 | fi; 30 | 31 | if [ $FREQ = "global" ]; then 32 | V=`$BB cat $VOLT_PROF 2> /dev/null`; 33 | 34 | if [ -z "$V" ]; then $BB echo 0; else $BB echo $V; fi; 35 | else 36 | $BB awk '{if ($1 == "'$FREQ':") print $2;}' $TABLE 37 | fi; 38 | else 39 | $BB echo "0"; 40 | fi; 41 | -------------------------------------------------------------------------------- /data/UKM/actions/devtools: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | TIMESTAMP=`date +%Y-%m-%d.%H.%M.%S`; 6 | LOGS=/sdcard/logs; 7 | 8 | case $1 in 9 | bootloader) 10 | $BB echo `sh $DEVICE ToggleBootloader`; 11 | ;; 12 | tamper) 13 | $BB echo `sh $DEVICE ToggleTamper`; 14 | ;; 15 | selinux) 16 | if [[ ! -z $2 ]]; then 17 | if [ $2 = "Enforcing" ]; then 18 | setenforce 1; 19 | elif [ $2 = "Permissive" ]; then 20 | setenforce 0; 21 | fi; 22 | fi; 23 | 24 | $BB echo `getenforce`; 25 | #/sys/fs/selinux/enforce 26 | ;; 27 | optimizedb) 28 | for i in `$BB find /data -iname "*.db"`; do 29 | $UKM/sqlite3 $i 'VACUUM;' 2> /dev/null; 30 | $UKM/sqlite3 $i 'REINDEX;' 2> /dev/null; 31 | done; 32 | 33 | for i in `$BB find /sdcard -iname "*.db"`; do 34 | $UKM/sqlite3 $i 'VACUUM;' 2> /dev/null; 35 | $UKM/sqlite3 $i 'REINDEX;' 2> /dev/null; 36 | done; 37 | 38 | $BB echo "Databases have been optimized."; 39 | ;; 40 | logcat) 41 | saved="$LOGS/logcat-$TIMESTAMP.txt"; 42 | [ ! -d "$LOGS" ] && $BB mkdir -p "$LOGS"; 43 | $BB chmod 755 $LOGS; 44 | 45 | logcat -d > $saved; 46 | ;; 47 | dmesg) 48 | saved="$LOGS/dmesg-$TIMESTAMP.txt"; 49 | [ ! -d "$LOGS" ] && $BB mkdir -p "$LOGS"; 50 | $BB chmod 755 $LOGS; 51 | 52 | $BB dmesg > $saved; 53 | ;; 54 | kmsg) 55 | kmsg=/proc/last_kmsg; 56 | if [ -f $kmsg ]; then 57 | saved="$LOGS/last_kmsg-$TIMESTAMP.txt"; 58 | [ ! -d "$LOGS" ] && $BB mkdir -p "$LOGS"; 59 | $BB chmod 755 $LOGS; 60 | 61 | $BB cp -f $kmsg $saved; 62 | else 63 | $BB echo "$kmsg not found."; 64 | fi; 65 | ;; 66 | reboot) 67 | $BB sleep 1; 68 | reboot $2; 69 | ;; 70 | cleardata) 71 | am force-stop com.af.synapse 2> /dev/null; 72 | $BB sleep 1; 73 | $BB rm -R /data/data/com.af.synapse/databases; 74 | $BB sleep 1; 75 | am start -a android.intent.action.MAIN -n com.af.synapse/.MainActivity 2> /dev/null; 76 | ;; 77 | esac; 78 | 79 | case $1 in 80 | logcat|dmesg|kmsg) 81 | $BB echo "Logfile saved to $saved"; 82 | ;; 83 | esac; 84 | -------------------------------------------------------------------------------- /data/UKM/actions/dropcaches: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | PATH=/proc/sys/vm/drop_caches; 5 | 6 | if [ -f $1 ]; then 7 | if [[ ! -z "$2" ]]; then 8 | $BB echo "$2" > $1; 9 | DC=`$BB cat $PATH`; 10 | 11 | if [ "$2" -eq 1 ] && [ "$DC" -ne 3 ]; then 12 | $BB sync; 13 | $BB echo 3 > $PATH 2> /dev/null; 14 | fi 15 | fi; 16 | 17 | V=`$BB cat $1 2> /dev/null`; 18 | 19 | if [ -z "$V" ]; then $BB echo 0; else $BB echo $V; fi; 20 | else 21 | $BB echo "0"; 22 | fi; 23 | -------------------------------------------------------------------------------- /data/UKM/actions/gamma: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z "$2" ]]; then 6 | $BB echo "$2" > $1 2> /dev/null; 7 | 8 | if [ "$1" == "/sys/devices/platform/kcal_ctrl.0/kcal" ] && [ -f "/sys/devices/platform/kcal_ctrl.0/kcal_ctrl" ]; then 9 | $BB echo 1 > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl; 10 | fi; 11 | fi; 12 | 13 | $BB echo "`$BB cat $1`"; 14 | else 15 | $BB echo "0"; 16 | fi; 17 | -------------------------------------------------------------------------------- /data/UKM/actions/generic: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z "$2" ]]; then 6 | $BB echo "$2" > $1 2> /dev/null; 7 | fi; 8 | 9 | $BB echo "`$BB cat $1`"; 10 | else 11 | $BB echo "0"; 12 | fi; 13 | -------------------------------------------------------------------------------- /data/UKM/actions/gpuboost: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | case $1 in 6 | enable) 7 | $BB echo 0 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/device/kgsl/kgsl-3d0/min_pwrlevel; 8 | $BB echo " GPU Boost enabled ... "; 9 | ;; 10 | disable) 11 | $BB echo 6 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/device/kgsl/kgsl-3d0/min_pwrlevel; 12 | $BB echo " GPU Boost disabled ... "; 13 | ;; 14 | esac; 15 | -------------------------------------------------------------------------------- /data/UKM/actions/gpuset: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | case $1 in 6 | `sh $DEVICE DirGPUMinPwrLevel`) 7 | $BB echo `sh $DEVICE SetGPUMinPwrLevel $1 $2`; 8 | ;; 9 | `sh $DEVICE DirGPUGovernor`) 10 | $BB echo `sh $DEVICE SetGPUGovernor $1 $2`; 11 | ;; 12 | esac; 13 | -------------------------------------------------------------------------------- /data/UKM/actions/intellithermal: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ "$1" == "freq" ]; then 5 | [ -f "/sys/module/msm_thermal/parameters/freq_control_mask" ] && FP=/sys/module/msm_thermal/parameters/freq_control_mask; 6 | [ -f "/sys/module/msm_thermal_v2/parameters/freq_control_mask" ] && FP=/sys/module/msm_thermal_v2/parameters/freq_control_mask; 7 | 8 | if [ "$2" == "core0" ]; then 9 | if [[ ! -z "$3" ]]; then 10 | V=1; 11 | FCM=`$BB cat $FP`; 12 | 13 | [ $3 -eq "1" ] && N=$((FCM + V)); [ $3 -eq "0" ] && N=$((FCM - V)); if [ $N -ge 0 -a $N -le 15 ]; then $BB echo "$N" > $FP 2> /dev/null; fi; 14 | fi; 15 | 16 | FCM=`$BB cat $FP`; 17 | 18 | if [ $FCM -eq 1 -o $FCM -eq 3 -o $FCM -eq 5 -o $FCM -eq 7 -o $FCM -eq 9 -o $FCM -eq 11 -o $FCM -eq 13 -o $FCM -eq 15 ]; then 19 | $BB echo 1; 20 | else 21 | $BB echo 0; 22 | fi; 23 | elif [ "$2" == "core1" ]; then 24 | if [[ ! -z "$3" ]]; then 25 | V=2; 26 | FCM=`$BB cat $FP`; 27 | 28 | [ $3 -eq "1" ] && N=$((FCM + V)); [ $3 -eq "0" ] && N=$((FCM - V)); if [ $N -ge 0 -a $N -le 15 ]; then $BB echo "$N" > $FP 2> /dev/null; fi; 29 | fi; 30 | 31 | FCM=`$BB cat $FP`; 32 | 33 | if [ $FCM -eq 2 -o $FCM -eq 3 -o $FCM -eq 6 -o $FCM -eq 7 -o $FCM -eq 10 -o $FCM -eq 11 -o $FCM -eq 14 -o $FCM -eq 15 ]; then 34 | $BB echo 1; 35 | else 36 | $BB echo 0; 37 | fi; 38 | elif [ "$2" == "core2" ]; then 39 | if [[ ! -z "$3" ]]; then 40 | V=4; 41 | FCM=`$BB cat $FP`; 42 | 43 | [ $3 -eq "1" ] && N=$((FCM + V)); [ $3 -eq "0" ] && N=$((FCM - V)); if [ $N -ge 0 -a $N -le 15 ]; then $BB echo "$N" > $FP 2> /dev/null; fi; 44 | fi; 45 | 46 | FCM=`$BB cat $FP`; 47 | 48 | if [ $FCM -eq 4 -o $FCM -eq 5 -o $FCM -eq 6 -o $FCM -eq 7 -o $FCM -eq 12 -o $FCM -eq 13 -o $FCM -eq 14 -o $FCM -eq 15 ]; then 49 | $BB echo 1; 50 | else 51 | $BB echo 0; 52 | fi; 53 | elif [ "$2" == "core3" ]; then 54 | if [[ ! -z "$3" ]]; then 55 | V=8; 56 | FCM=`$BB cat $FP`; 57 | 58 | [ $3 -eq "1" ] && N=$((FCM + V)); [ $3 -eq "0" ] && N=$((FCM - V)); if [ $N -ge 0 -a $N -le 15 ]; then $BB echo "$N" > $FP 2> /dev/null; fi; 59 | fi; 60 | 61 | FCM=`$BB cat $FP`; 62 | 63 | if [ $FCM -eq 8 -o $FCM -eq 9 -o $FCM -eq 10 -o $FCM -eq 11 -o $FCM -eq 12 -o $FCM -eq 13 -o $FCM -eq 14 -o $FCM -eq 15 ]; then 64 | $BB echo 1; 65 | else 66 | $BB echo 0; 67 | fi; 68 | fi; 69 | fi; 70 | 71 | if [ "$1" == "core" ]; then 72 | [ -f "/sys/module/msm_thermal/parameters/core_control_mask" ] && CP=/sys/module/msm_thermal/parameters/core_control_mask; 73 | [ -f "/sys/module/msm_thermal_v2/parameters/core_control_mask" ] && CP=/sys/module/msm_thermal_v2/parameters/core_control_mask; 74 | 75 | if [ "$2" == "core1" ]; then 76 | if [[ ! -z "$3" ]]; then 77 | V=2; 78 | CCM=`$BB cat $CP`; 79 | 80 | [ $3 -eq "1" ] && N=$((CCM + V)); [ $3 -eq "0" ] && N=$((CCM - V)); if [ $N -ge 0 -a $N -le 14 ]; then $BB echo "$N" > $CP 2> /dev/null; fi; 81 | fi; 82 | 83 | CCM=`$BB cat $CP`; 84 | 85 | if [ $CCM -eq 2 -o $CCM -eq 6 -o $CCM -eq 10 -o $CCM -eq 14 ]; then 86 | $BB echo 1; 87 | else 88 | $BB echo 0; 89 | fi; 90 | elif [ "$2" == "core2" ]; then 91 | if [[ ! -z "$3" ]]; then 92 | V=4; 93 | CCM=`$BB cat $CP`; 94 | 95 | [ $3 -eq "1" ] && N=$((CCM + V)); [ $3 -eq "0" ] && N=$((CCM - V)); if [ $N -ge 0 -a $N -le 14 ]; then $BB echo "$N" > $CP 2> /dev/null; fi; 96 | fi; 97 | 98 | CCM=`$BB cat $CP`; 99 | 100 | if [ $CCM -eq 4 -o $CCM -eq 6 -o $CCM -eq 12 -o $CCM -eq 14 ]; then 101 | $BB echo 1; 102 | else 103 | $BB echo 0; 104 | fi; 105 | elif [ "$2" == "core3" ]; then 106 | if [[ ! -z "$3" ]]; then 107 | V=8; 108 | CCM=`$BB cat $CP`; 109 | 110 | [ $3 -eq "1" ] && N=$((CCM + V)); [ $3 -eq "0" ] && N=$((CCM - V)); if [ $N -ge 0 -a $N -le 14 ]; then $BB echo "$N" > $CP 2> /dev/null; fi; 111 | fi; 112 | 113 | CCM=`$BB cat $CP`; 114 | 115 | if [ $CCM -eq 8 -o $CCM -eq 10 -o $CCM -eq 12 -o $CCM -eq 14 ]; then 116 | $BB echo 1; 117 | else 118 | $BB echo 0; 119 | fi; 120 | fi; 121 | fi; 122 | -------------------------------------------------------------------------------- /data/UKM/actions/ioset: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | case "$1" in 5 | queue) 6 | if [ -f /sys/block/mmcblk0/queue/$2 ]; then 7 | if [[ ! -z $3 ]]; then 8 | for i in /sys/block/*/queue; do 9 | $BB echo $3 > $i/$2 2> /dev/null; 10 | done; 11 | fi; 12 | 13 | $BB echo `$BB cat /sys/block/mmcblk0/queue/$2`; 14 | fi; 15 | ;; 16 | scheduler) 17 | if [ -f /sys/block/mmcblk0/queue/scheduler ]; then 18 | if [[ ! -z $2 ]]; then 19 | for i in /sys/block/mmcblk*/queue/scheduler; do 20 | $BB echo $2 > $i 2> /dev/null; 21 | done; 22 | fi; 23 | 24 | $BB echo `$BB cat /sys/block/mmcblk0/queue/scheduler | $BB sed -n -e '/\[[^]]/s/^[^[]*\[\([^]]*\)].*$/\1/p'`; 25 | fi; 26 | ;; 27 | esac; 28 | -------------------------------------------------------------------------------- /data/UKM/actions/iosetkryo: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | case "$1" in 5 | queue) 6 | if [ -f /sys/block/sda/queue/$2 ]; then 7 | if [[ ! -z $3 ]]; then 8 | for i in /sys/block/*/queue; do 9 | $BB echo $3 > $i/$2 2> /dev/null; 10 | done; 11 | fi; 12 | 13 | $BB echo `$BB cat /sys/block/sda/queue/$2`; 14 | fi; 15 | ;; 16 | scheduler) 17 | if [ -f /sys/block/sda/queue/scheduler ]; then 18 | if [[ ! -z $2 ]]; then 19 | for i in /sys/block/sda*/queue/scheduler; do 20 | $BB echo $2 > $i 2> /dev/null; 21 | done; 22 | fi; 23 | 24 | $BB echo `$BB cat /sys/block/sda/queue/scheduler | $BB sed -n -e '/\[[^]]/s/^[^[]*\[\([^]]*\)].*$/\1/p'`; 25 | fi; 26 | ;; 27 | esac; 28 | -------------------------------------------------------------------------------- /data/UKM/actions/live: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | case $1 in 6 | BatteryTemperature) 7 | $BB echo `sh $DEVICE LiveBatteryTemperature`; 8 | ;; 9 | Bootloader) 10 | $BB echo `sh $DEVICE LiveBootloader`; 11 | ;; 12 | CPUFrequency) 13 | $BB echo `sh $DEVICE LiveCPUFrequency`; 14 | ;; 15 | CPU1Frequency) 16 | $BB echo `sh $DEVICE LiveCPU1Frequency`; 17 | ;; 18 | GPUFrequency) 19 | $BB echo `sh $DEVICE LiveGPUFrequency`; 20 | ;; 21 | CPUTemperature) 22 | $BB echo `sh $DEVICE LiveCPUTemperature`; 23 | ;; 24 | KRYOTemperature) 25 | $BB echo `sh $DEVICE LiveKRYOCPUTemperature`; 26 | ;; 27 | InstallationCheck) 28 | $BB echo `if [ ! -f "/system/etc/init.d/UKM" ]; then $BB echo "UKM file missing in init.d"; elif [ ! -f "/system/addon.d/UKM.sh" ]; then $BB echo "UKM.sh file missing in addon.d"; else $BB echo "All checks OK"; fi`; 29 | ;; 30 | Memory) 31 | $BB echo `sh $DEVICE LiveMemory`; 32 | ;; 33 | Time) 34 | $BB echo `sh $DEVICE LiveTime $2 $3`; 35 | ;; 36 | TimeCPU1) 37 | $BB echo `sh $DEVICE LiveTimeCPU1 $2 $3`; 38 | ;; 39 | TimeCPU2) 40 | $BB echo `sh $DEVICE LiveTimeCPU2 $2 $3`; 41 | ;; 42 | TimeKRYO1) 43 | $BB echo `sh $DEVICE LiveTimeKRYO1 $2 $3`; 44 | ;; 45 | TimeKRYO2) 46 | $BB echo `sh $DEVICE LiveTimeKRYO2 $2 $3`; 47 | ;; 48 | TimeGpu) 49 | $BB echo `sh $DEVICE LiveTimeGpu $2 $3`; 50 | ;; 51 | TimeKRYOGpu) 52 | $BB echo `sh $DEVICE LiveTimeKRYOGpu $2 $3`; 53 | ;; 54 | UpTime) 55 | $BB echo `sh $DEVICE LiveUpTime`; 56 | ;; 57 | UpTimeCPU1) 58 | $BB echo `sh $DEVICE LiveUpTimeCPU1`; 59 | ;; 60 | UpTimeCPU2) 61 | $BB echo `sh $DEVICE LiveUpTimeCPU2`; 62 | ;; 63 | UpTimeKRYO1) 64 | $BB echo `sh $DEVICE LiveUpTimeKRYO1`; 65 | ;; 66 | UpTimeKRYO2) 67 | $BB echo `sh $DEVICE LiveUpTimeKRYO2`; 68 | ;; 69 | UnUsed) 70 | $BB echo `sh $DEVICE LiveUnUsed`; 71 | ;; 72 | UnUsedCPU1) 73 | $BB echo `sh $DEVICE LiveUnUsedCPU1`; 74 | ;; 75 | UnUsedCPU2) 76 | $BB echo `sh $DEVICE LiveUnUsedCPU2`; 77 | ;; 78 | UnUsedKRYO1) 79 | $BB echo `sh $DEVICE LiveUnUsedKRYO1`; 80 | ;; 81 | UnUsedKRYO2) 82 | $BB echo `sh $DEVICE LiveUnUsedKRYO2`; 83 | ;; 84 | UnUsedGpu) 85 | $BB echo `sh $DEVICE LiveUnUsedGpu`; 86 | ;; 87 | UnUsedKRYOGpu) 88 | $BB echo `sh $DEVICE LiveUnUsedKRYOGpu`; 89 | ;; 90 | WakelocksKernel) 91 | $BB echo `sh $DEVICE LiveWakelocksKernel`; 92 | ;; 93 | CpuPvsLevel) 94 | $BB echo `sh $DEVICE LiveCpuPvsLevel`; 95 | ;; 96 | ChargeCurrent) 97 | $BB echo `sh $DEVICE LiveChargeCurrent`; 98 | ;; 99 | KernelCurrent) 100 | $BB echo `sh $DEVICE LiveKernelCurrent`; 101 | ;; 102 | InfoCurrent) 103 | $BB echo `sh $DEVICE LiveInfoCurrent`; 104 | ;; 105 | BrickedHotplug) 106 | $BB echo `sh $DEVICE LiveBrickedHotplug`; 107 | ;; 108 | IntellidHotplug) 109 | $BB echo `sh $DEVICE LiveIntellidHotplug`; 110 | ;; 111 | MsmHotplug) 112 | $BB echo `sh $DEVICE LivedMsmHotplug`; 113 | ;; 114 | SimpleThermal) 115 | $BB echo `sh $DEVICE LiveSimpleThermal`; 116 | ;; 117 | CpuBoost) 118 | $BB echo `sh $DEVICE LiveCpuBoost`; 119 | ;; 120 | StateNotifier) 121 | $BB echo `sh $DEVICE LiveStateNotifier`; 122 | ;; 123 | MsmPerformance) 124 | $BB echo `sh $DEVICE LiveMsmPerformance`; 125 | ;; 126 | CPU1) 127 | $BB echo `sh $DEVICE LiveCPU1`; 128 | ;; 129 | CPU2) 130 | $BB echo `sh $DEVICE LiveCPU2`; 131 | esac; 132 | -------------------------------------------------------------------------------- /data/UKM/actions/lmk: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | P=/sys/module/lowmemorykiller/parameters/minfree; 5 | 6 | PERM=`$BB stat -c %a $P`; 7 | $BB test $PERM -lt "664" && $BB chmod 664 $P 2> /dev/null; 8 | 9 | #Read/Write 10 | read() { 11 | VALUE=0; 12 | NOW=`$BB cat $P`; 13 | for LMK in ${NOW//,/ }; do 14 | VALUE=$(($VALUE+1)); 15 | if [ "$VALUE" == $1 ]; then 16 | $BB echo $((LMK / 256)); 17 | return 18 | fi; 19 | done; 20 | } 21 | 22 | write() { 23 | SET=$2; 24 | LMKARR=""; 25 | VALUE=0; 26 | NOW=`$BB cat $P`; 27 | for LMK in ${NOW//,/ }; do 28 | VALUE=$(($VALUE+1)); 29 | if [ "$VALUE" == $1 ]; then 30 | if [ "$VALUE" == 1 ]; then 31 | LMKARR="$((SET * 256))"; 32 | else 33 | LMKARR="$LMKARR $((SET * 256))"; 34 | fi; 35 | else 36 | if [ "$VALUE" == 1 ]; then 37 | LMKARR="$LMK"; 38 | else 39 | LMKARR="$LMKARR $LMK"; 40 | fi; 41 | fi; 42 | done; 43 | $BB echo ${LMKARR// /,} > $P 2> /dev/null; 44 | } 45 | 46 | #Profiles 47 | Low(){ 48 | MINFREE="1536,2048,2560,8192,16384,20480"; 49 | COST="64"; 50 | } 51 | 52 | Medium(){ 53 | MINFREE="1536,2048,4096,16384,18432,20480"; 54 | COST="48"; 55 | } 56 | 57 | Default(){ 58 | MINFREE="1536,2048,4096,16384,28672,32768"; 59 | COST="32"; 60 | } 61 | 62 | Aggressive(){ 63 | MINFREE="2048,4096,4096,16384,32768,49152"; 64 | COST="16"; 65 | } 66 | 67 | Exterminate(){ 68 | MINFREE="4096,8192,16384,19200,49152,65536"; 69 | COST="16"; 70 | } 71 | 72 | if [ "$1" == "profile" ]; then 73 | if [[ ! -z $2 ]]; then 74 | $BB echo $2 > $UKM/files/lmk_prof; 75 | 76 | if [ $2 != "Custom" ]; then 77 | $2; 78 | $BB echo "$MINFREE" > $P; 79 | $BB echo "$COST" > /sys/module/lowmemorykiller/parameters/cost; 80 | fi; 81 | fi; 82 | 83 | $BB echo `$BB cat $UKM/files/lmk_prof;` 84 | else 85 | if [[ ! -z $2 ]]; then 86 | write $1 $2; 87 | fi; 88 | 89 | $BB echo $(read $1); 90 | fi; 91 | -------------------------------------------------------------------------------- /data/UKM/actions/mpdboostfreq: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | [ -d "/sys/kernel/msm_mpdecision/conf" ] && BHC=/sys/kernel/msm_mpdecision/conf; 5 | [ -d "/sys/kernel/bricked_hotplug/conf" ] && BHC=/sys/kernel/bricked_hotplug/conf; 6 | 7 | T=$BHC/boost_freqs; 8 | 9 | read() { 10 | VALUE=-1; 11 | NOW=`$BB cat $T`; 12 | for BF in $NOW; do 13 | VALUE=$(($VALUE+1)); 14 | if [ "$VALUE" -eq $1 ]; then 15 | $BB echo $BF; 16 | return 17 | fi; 18 | done; 19 | } 20 | 21 | if [ -f $T ]; then 22 | if [[ ! -z $2 ]]; then 23 | $BB echo "$1 $2" > $T; 24 | fi; 25 | 26 | $BB echo $(read $1); 27 | fi; 28 | -------------------------------------------------------------------------------- /data/UKM/actions/numeric: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z $2 ]]; then 6 | $BB echo $2 > $1; 7 | fi; 8 | 9 | $BB echo `$BB awk '{ if ($1 >=2147483646) print 0; else print $0; }' $1`; 10 | else 11 | $BB echo "0"; 12 | fi; 13 | -------------------------------------------------------------------------------- /data/UKM/actions/powersuspend: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z "$2" ]]; then 6 | PSM=`$BB cat /sys/kernel/power_suspend/power_suspend_mode`; 7 | 8 | if [ "$PSM" == "1" ]; then 9 | $BB echo "$2" > $1 10 | fi; 11 | fi; 12 | 13 | $BB echo "`$BB cat $1`"; 14 | else 15 | $BB echo "0"; 16 | fi; 17 | -------------------------------------------------------------------------------- /data/UKM/actions/printk: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [ -f $1 ]; then 5 | if [[ ! -z $2 ]]; then 6 | $BB echo "$2" > $1 2> /dev/null; 7 | fi; 8 | 9 | if [ "`$BB grep enabled $1`" ]; then 10 | $BB echo "1"; 11 | else 12 | $BB echo "0"; 13 | fi; 14 | else 15 | $BB echo "0"; 16 | fi; 17 | -------------------------------------------------------------------------------- /data/UKM/actions/serviceset: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | if [[ ! -z $2 ]]; then 5 | if [ $2 -eq 1 ]; then 6 | start $1; 7 | elif [ $2 -eq 0 ]; then 8 | stop $1; 9 | fi; 10 | fi; 11 | 12 | if [ "`ps | $BB grep $1`" ]; then 13 | $BB echo "1"; 14 | else 15 | $BB echo "0"; 16 | fi; 17 | -------------------------------------------------------------------------------- /data/UKM/actions/socset: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | [ -d "/sys/module/pm_8x60" ] && PM=/sys/module/pm_8x60; 5 | [ -d "/sys/module/msm_pm" ] && PM=/sys/module/msm_pm; 6 | 7 | if [ -f $1 ]; then 8 | if [[ ! -z $3 ]]; then 9 | for CSTATE in $PM/modes/cpu[0-3]/$2; do 10 | if [ -f "$CSTATE/idle_enabled" ]; then 11 | $BB echo $3 > $CSTATE/idle_enabled; 12 | fi; 13 | 14 | if [ -f "$CSTATE/suspend_enabled" ]; then 15 | $BB echo $3 > $CSTATE/suspend_enabled; 16 | fi; 17 | done; 18 | fi; 19 | 20 | $BB echo `$BB cat $1`; 21 | else 22 | $BB echo "0"; 23 | fi; 24 | -------------------------------------------------------------------------------- /data/UKM/actions/sound: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | BASE_HP_PA_GAIN=`sh $DEVICE HeadphonePAValue`; 5 | 6 | LG_Stock() { 7 | CAM_MIC_GAIN="0 255"; 8 | HEADPHONE_GAIN="0 0 255"; 9 | 10 | X=$((BASE_HP_PA_GAIN - 0)); 11 | Y=$((255 - X - X)); 12 | HEADPHONE_PA_GAIN="$X $X $Y"; 13 | 14 | MIC_GAIN="0 255"; 15 | SPEAKER_GAIN="0 0 255"; 16 | } 17 | 18 | Quality() { 19 | CAM_MIC_GAIN="0 255"; 20 | HEADPHONE_GAIN="254 254 259"; 21 | 22 | X=$((BASE_HP_PA_GAIN - 5)); 23 | Y=$((255 - X - X)); 24 | HEADPHONE_PA_GAIN="$X $X $Y"; 25 | 26 | MIC_GAIN="0 255"; 27 | SPEAKER_GAIN="254 254 259"; 28 | } 29 | 30 | Loudness() { 31 | CAM_MIC_GAIN="0 255"; 32 | HEADPHONE_GAIN="9 9 237"; 33 | 34 | X=$((BASE_HP_PA_GAIN - 3)); 35 | Y=$((255 - X - X)); 36 | HEADPHONE_PA_GAIN="$X $X $Y"; 37 | 38 | MIC_GAIN="0 255"; 39 | SPEAKER_GAIN="5 5 245"; 40 | } 41 | 42 | Quiet() { 43 | CAM_MIC_GAIN="0 255"; 44 | HEADPHONE_GAIN="251 251 265"; 45 | 46 | X=$((BASE_HP_PA_GAIN + 2)); 47 | Y=$((255 - X - X)); 48 | HEADPHONE_PA_GAIN="$X $X $Y"; 49 | 50 | MIC_GAIN="0 255"; 51 | SPEAKER_GAIN="253 253 261"; 52 | } 53 | 54 | if [ -f $1 ]; then 55 | if [[ ! -z $2 ]]; then 56 | [ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ]; 57 | 58 | if [ "$1" == "$UKM/files/sound_prof" ]; then 59 | $BB echo $2 > $1; 60 | 61 | if [ $2 != "Custom" ]; then 62 | $2; 63 | $BB echo "$CAM_MIC_GAIN" > /sys/kernel/sound_control/cam_mic_gain; 64 | $BB echo "$HEADPHONE_GAIN" > /sys/kernel/sound_control/headphone_gain; 65 | [ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ] && $BB echo "$HEADPHONE_PA_GAIN" > /sys/kernel/sound_control/headphone_pa_gain; 66 | $BB echo "$MIC_GAIN" > /sys/kernel/sound_control/mic_gain; 67 | $BB echo "$SPEAKER_GAIN" > /sys/kernel/sound_control/speaker_gain; 68 | fi; 69 | 70 | elif [ "$1" == "/sys/kernel/sound_control/cam_mic_gain" ] || [ "$1" == "/sys/kernel/sound_control/mic_gain" ]; then 71 | if [ "$2" -lt 0 ]; then 72 | V=$2; 73 | V=$((256 + V)); 74 | H=$((255 - V)); 75 | 76 | $BB echo "$V $H" > $1; 77 | else 78 | V=$2; 79 | H=$((255 - V)); 80 | 81 | $BB echo "$V $H" > $1; 82 | fi; 83 | 84 | elif [ "$1" == "/sys/kernel/sound_control/headphone_gain" ] || [ "$1" == "/sys/kernel/sound_control/speaker_gain" ]; then 85 | if [ "$2" -lt 0 ]; then 86 | V=$2; 87 | H=$((255 - V - V)); 88 | V=$((256 + V)); 89 | 90 | $BB echo "$V $V $H" > $1; 91 | else 92 | V=$2; 93 | H=$((255 - V - V)); 94 | 95 | $BB echo "$V $V $H" > $1; 96 | fi; 97 | 98 | else 99 | V=$2; 100 | V=$((BASE_HP_PA_GAIN - V)); 101 | H=$((255 - V - V)); 102 | 103 | $BB echo "$V $V $H" > $1; 104 | fi; 105 | #[ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ]; 106 | fi; 107 | 108 | PATH=$1; 109 | C=`while read V1 V2; do echo $V1; done < $PATH`; 110 | 111 | if [ "$PATH" == "/sys/kernel/sound_control/headphone_pa_gain" ]; then 112 | C=$((BASE_HP_PA_GAIN - C)); 113 | 114 | $BB echo $C; 115 | else 116 | if [ "$C" -gt 200 ]; then 117 | C=$((C - 256)); 118 | 119 | $BB echo $C; 120 | else 121 | $BB echo $C; 122 | fi; 123 | fi; 124 | fi; 125 | 126 | 127 | -------------------------------------------------------------------------------- /data/UKM/actions/soundfaux: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | BASE_HP_PA_GAIN=`sh $DEVICE HeadphonePAValue`; 5 | 6 | LG_Stock() { 7 | CAM_MIC_GAIN="0 255"; 8 | HEADPHONE_GAIN="0 0 255"; 9 | 10 | X=$((BASE_HP_PA_GAIN - 0)); 11 | Y=$((255 - X - X)); 12 | HEADPHONE_PA_GAIN="$X $X $Y"; 13 | 14 | MIC_GAIN="0 255"; 15 | SPEAKER_GAIN="0 0 255"; 16 | } 17 | 18 | Quality() { 19 | CAM_MIC_GAIN="0 255"; 20 | HEADPHONE_GAIN="254 254 259"; 21 | 22 | X=$((BASE_HP_PA_GAIN - 5)); 23 | Y=$((255 - X - X)); 24 | HEADPHONE_PA_GAIN="$X $X $Y"; 25 | 26 | MIC_GAIN="0 255"; 27 | SPEAKER_GAIN="254 254 259"; 28 | } 29 | 30 | Loudness() { 31 | CAM_MIC_GAIN="0 255"; 32 | HEADPHONE_GAIN="9 9 237"; 33 | 34 | X=$((BASE_HP_PA_GAIN - 3)); 35 | Y=$((255 - X - X)); 36 | HEADPHONE_PA_GAIN="$X $X $Y"; 37 | 38 | MIC_GAIN="0 255"; 39 | SPEAKER_GAIN="5 5 245"; 40 | } 41 | 42 | Quiet() { 43 | CAM_MIC_GAIN="0 255"; 44 | HEADPHONE_GAIN="251 251 265"; 45 | 46 | X=$((BASE_HP_PA_GAIN + 2)); 47 | Y=$((255 - X - X)); 48 | HEADPHONE_PA_GAIN="$X $X $Y"; 49 | 50 | MIC_GAIN="0 255"; 51 | SPEAKER_GAIN="253 253 261"; 52 | } 53 | 54 | if [ -f $1 ]; then 55 | if [[ ! -z $2 ]]; then 56 | [ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ] && $BB echo 0 > /sys/kernel/sound_control_3/gpl_sound_control_locked; 57 | 58 | if [ "$1" == "$UKM/files/sound_prof" ]; then 59 | $BB echo $2 > $1; 60 | 61 | if [ $2 != "Custom" ]; then 62 | $2; 63 | $BB echo "$CAM_MIC_GAIN" > /sys/kernel/sound_control_3/gpl_cam_mic_gain; 64 | $BB echo "$HEADPHONE_GAIN" > /sys/kernel/sound_control_3/gpl_headphone_gain; 65 | [ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ] && $BB echo "$HEADPHONE_PA_GAIN" > /sys/kernel/sound_control_3/gpl_headphone_pa_gain; 66 | $BB echo "$MIC_GAIN" > /sys/kernel/sound_control_3/gpl_mic_gain; 67 | $BB echo "$SPEAKER_GAIN" > /sys/kernel/sound_control_3/gpl_speaker_gain; 68 | fi; 69 | 70 | elif [ "$1" == "/sys/kernel/sound_control_3/gpl_sound_control_locked" ]; then 71 | [ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ] && $BB echo "$2" > $1 2> /dev/null; 72 | 73 | elif [ "$1" == "/sys/kernel/sound_control_3/gpl_cam_mic_gain" ] || [ "$1" == "/sys/kernel/sound_control_3/gpl_mic_gain" ]; then 74 | if [ "$2" -lt 0 ]; then 75 | V=$2; 76 | V=$((256 + V)); 77 | H=$((255 - V)); 78 | 79 | $BB echo "$V $H" > $1; 80 | else 81 | V=$2; 82 | H=$((255 - V)); 83 | 84 | $BB echo "$V $H" > $1; 85 | fi; 86 | 87 | elif [ "$1" == "/sys/kernel/sound_control_3/gpl_headphone_gain" ] || [ "$1" == "/sys/kernel/sound_control_3/gpl_speaker_gain" ]; then 88 | if [ "$2" -lt 0 ]; then 89 | V=$2; 90 | H=$((255 - V - V)); 91 | V=$((256 + V)); 92 | 93 | $BB echo "$V $V $H" > $1; 94 | else 95 | V=$2; 96 | H=$((255 - V - V)); 97 | 98 | $BB echo "$V $V $H" > $1; 99 | fi; 100 | 101 | else 102 | V=$2; 103 | V=$((BASE_HP_PA_GAIN - V)); 104 | H=$((255 - V - V)); 105 | 106 | $BB echo "$V $V $H" > $1; 107 | fi; 108 | #[ "`sh $DEVICE HasHeadphonePowerAmp`" == "1" ] && $BB echo 1 > /sys/kernel/sound_control_3/gpl_sound_control_locked; 109 | fi; 110 | 111 | PATH=$1; 112 | C=`while read V1 V2; do echo $V1; done < $PATH`; 113 | 114 | if [ "$PATH" == "/sys/kernel/sound_control_3/gpl_headphone_pa_gain" ]; then 115 | C=$((BASE_HP_PA_GAIN - C)); 116 | 117 | $BB echo $C; 118 | else 119 | if [ "$C" -gt 200 ]; then 120 | C=$((C - 256)); 121 | 122 | $BB echo $C; 123 | else 124 | $BB echo $C; 125 | fi; 126 | fi; 127 | fi; 128 | 129 | #if [ $((num - base)) -ge -6 ] && [ $((num - base)) -le 6 ]; then 130 | -------------------------------------------------------------------------------- /data/UKM/actions/speakerfaux: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | SPEAKER=/sys/bus/i2c/devices/0-0058; 5 | 6 | LG_Stock() { 7 | COMP_RATE=0; 8 | FIXED_GAIN=12; 9 | ATK_TIME=5; 10 | REL_TIME=11; 11 | HOLD_TIME=0; 12 | OUT_LIM=0; 13 | OUTPUT_LIMIT_LEVEL=26; 14 | AGC_MAX_GAIN=12; 15 | NOISE_GATE_THRESHOLD=1; 16 | } 17 | 18 | Max_Loudness() { 19 | COMP_RATE=2; 20 | FIXED_GAIN=30; 21 | ATK_TIME=3; 22 | REL_TIME=30; 23 | HOLD_TIME=0; 24 | OUT_LIM=0; 25 | OUTPUT_LIMIT_LEVEL=31; 26 | AGC_MAX_GAIN=12; 27 | NOISE_GATE_THRESHOLD=0; 28 | } 29 | 30 | Voice() { 31 | COMP_RATE=2; 32 | FIXED_GAIN=6; 33 | ATK_TIME=2; 34 | REL_TIME=11; 35 | HOLD_TIME=0; 36 | OUT_LIM=0; 37 | OUTPUT_LIMIT_LEVEL=28; 38 | AGC_MAX_GAIN=12; 39 | NOISE_GATE_THRESHOLD=1; 40 | } 41 | 42 | Quiet() { 43 | COMP_RATE=3; 44 | FIXED_GAIN=3; 45 | ATK_TIME=6; 46 | REL_TIME=24; 47 | HOLD_TIME=0; 48 | OUT_LIM=0; 49 | OUTPUT_LIMIT_LEVEL=16; 50 | AGC_MAX_GAIN=9; 51 | NOISE_GATE_THRESHOLD=2; 52 | } 53 | 54 | if [ -f $1 ]; then 55 | if [[ ! -z $2 ]]; then 56 | if [ "$1" == "$UKM/files/speaker_prof" ]; then 57 | $BB echo $2 > $1; 58 | 59 | if [ $2 != "Custom" ]; then 60 | $2; 61 | 62 | [ -f "$SPEAKER/comp_rate" ] && $BB echo $COMP_RATE > $SPEAKER/comp_rate; 63 | [ -f "$SPEAKER/fixed_gain" ] && $BB echo $FIXED_GAIN > $SPEAKER/fixed_gain; 64 | [ -f "$SPEAKER/ATK_time" ] && $BB echo $ATK_TIME > $SPEAKER/ATK_time; 65 | [ -f "$SPEAKER/REL_time" ] && $BB echo $REL_TIME > $SPEAKER/REL_time; 66 | [ -f "$SPEAKER/Hold_time" ] && $BB echo $HOLD_TIME > $SPEAKER/Hold_time; 67 | [ -f "$SPEAKER/out_lim" ] && $BB echo $OUT_LIM > $SPEAKER/out_lim; 68 | [ -f "$SPEAKER/Output_limit_level" ] && $BB echo $OUTPUT_LIMIT_LEVEL > $SPEAKER/Output_limit_level; 69 | [ -f "$SPEAKER/AGC_Max_Gain" ] && $BB echo $AGC_MAX_GAIN > $SPEAKER/AGC_Max_Gain; 70 | [ -f "$SPEAKER/Noise_Gate_Threshold" ] && $BB echo $NOISE_GATE_THRESHOLD > $SPEAKER/Noise_Gate_Threshold; 71 | fi; 72 | 73 | elif [ "$1" == "$SPEAKER/AGC_Max_Gain" ]; then 74 | V=$2; 75 | V=$((V - 18)); 76 | 77 | $BB echo $V > $1; 78 | else 79 | if [ "$2" -lt 0 ]; then 80 | V=$2; 81 | V=$((V - 256)); 82 | 83 | $BB echo $V > $1; 84 | else 85 | $BB echo $2 > $1; 86 | fi; 87 | fi; 88 | fi; 89 | 90 | C=`$BB cat $1` 91 | 92 | if [ "$1" == "$UKM/files/speaker_prof" ]; then 93 | $BB echo $C; 94 | elif [ "$1" == "$SPEAKER/AGC_Max_Gain" ]; then 95 | C=${C##*: }; 96 | C=$((C + 18)); 97 | 98 | $BB echo $C; 99 | else 100 | C=${C##*: }; 101 | 102 | if [ "$C" -gt 200 ]; then 103 | C=$((256 - C)); 104 | 105 | $BB echo $C; 106 | else 107 | $BB echo $C; 108 | fi; 109 | fi; 110 | fi; 111 | -------------------------------------------------------------------------------- /data/UKM/actions/sqlite: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | if [ -f "/system/xbin/sqlite3" ]; then SQL3=/system/xbin/sqlite3; else SQL3=$UKM/sqlite3; fi; 4 | 5 | if [ -d "/data/data/com.af.synapse" -o -d "/storage/emulated/0/Synapse" ]; then 6 | SYNAPSE_SD_DIR=/storage/emulated/0/Synapse; 7 | SYNAPSE_CONFIG_DIR=$SYNAPSE_SD_DIR/saved_configs; 8 | SYNAPSE_GAMMAOPO_DIR=$SYNAPSE_SD_DIR/gamma_ak; 9 | SYNAPSE_DATA=/data/data/com.af.synapse/databases; 10 | DISABLED_SETTINGS="'devtools selinux', 'generic /data/UKM/files/bck_prof'"; 11 | DISABLED_ACTIONS="AND key NOT LIKE 'cpuvolt%' AND key NOT LIKE 'restorebackup%' AND key NOT LIKE 'voltage%'"; 12 | else 13 | SYNAPSE_SD_DIR=/sdcard/Synapse; 14 | SYNAPSE_CONFIG_DIR=$SYNAPSE_SD_DIR/saved_configs; 15 | SYNAPSE_GAMMAOPO_DIR=$SYNAPSE_SD_DIR/gamma_ak; 16 | SYNAPSE_DATA=/data/data/com.af.synapse/databases; 17 | DISABLED_SETTINGS="'devtools selinux', 'generic /data/UKM/files/bck_prof'"; 18 | DISABLED_ACTIONS="AND key NOT LIKE 'cpuvolt%' AND key NOT LIKE 'restorebackup%' AND key NOT LIKE 'voltage%'"; 19 | fi 20 | 21 | case "$1" in 22 | ExportConfigSynapse) 23 | BCK_PROF=`$BB cat $UKM/files/bck_prof`; 24 | BCK_PROF=`$BB echo ${BCK_PROF// /_}`; 25 | 26 | if [ "$BCK_PROF" == "None" ]; then 27 | $BB echo "Enter a config name first and then apply."; 28 | else 29 | $BB echo "None" > $UKM/files/bck_prof; 30 | cd $SYNAPSE_DATA; 31 | $SQL3 -separator '=' actionValueStore "SELECT key, value FROM action_value WHERE context = 'global' AND key NOT IN ($DISABLED_SETTINGS) $DISABLED_ACTIONS ORDER BY key ASC;" > "$SYNAPSE_CONFIG_DIR/$BCK_PROF.txt" 2> /dev/null; 32 | $BB echo "$BCK_PROF.txt created. Press the Restart Synapse button below to see updated list."; 33 | fi; 34 | ;; 35 | ImportGammaSynapse) 36 | SYNAPSE_CONFIG=`$BB cat "$SYNAPSE_GAMMAOPO_DIR/.selected_config_profile"`; 37 | 38 | if [ -f "$SYNAPSE_GAMMAOPO_DIR/$SYNAPSE_CONFIG" ]; then 39 | cd $SYNAPSE_DATA; 40 | $SQL3 actionValueStore "DROP TABLE IF EXISTS my_action_value"; 41 | $SQL3 actionValueStore "CREATE TABLE my_action_value (key TEXT, value TEXT)"; 42 | $SQL3 actionValueStore < T1.value;" 2> /dev/null`; 47 | $SQL3 actionValueStore "UPDATE action_value SET value = (SELECT T1.value FROM my_action_value T1 WHERE T1.key = action_value.key) WHERE key NOT IN ($DISABLED_SETTINGS) $DISABLED_ACTIONS AND value <> (SELECT T1.value FROM my_action_value T1 WHERE T1.key = action_value.key)"; 48 | $SQL3 actionValueStore "DROP TABLE my_action_value"; 49 | $BB echo "None" > $SYNAPSE_GAMMAOPO_DIR/.selected_config_profile; 50 | $BB echo "$SYNAPSE_CONFIG imported $ROWS row(s)."; 51 | elif [ "$SYNAPSE_CONFIG" == "None" ]; then 52 | $BB echo "None selected."; 53 | else 54 | $BB echo "File not found."; 55 | fi; 56 | ;; 57 | ImportConfigSynapse) 58 | SYNAPSE_CONFIG=`$BB cat "$SYNAPSE_CONFIG_DIR/.selected_config_profile"`; 59 | 60 | if [ -f "$SYNAPSE_CONFIG_DIR/$SYNAPSE_CONFIG" ]; then 61 | cd $SYNAPSE_DATA; 62 | $SQL3 actionValueStore "DROP TABLE IF EXISTS my_action_value"; 63 | $SQL3 actionValueStore "CREATE TABLE my_action_value (key TEXT, value TEXT)"; 64 | $SQL3 actionValueStore < T1.value;" 2> /dev/null`; 69 | $SQL3 actionValueStore "UPDATE action_value SET value = (SELECT T1.value FROM my_action_value T1 WHERE T1.key = action_value.key) WHERE key NOT IN ($DISABLED_SETTINGS) $DISABLED_ACTIONS AND value <> (SELECT T1.value FROM my_action_value T1 WHERE T1.key = action_value.key)"; 70 | $SQL3 actionValueStore "DROP TABLE my_action_value"; 71 | $BB echo "None" > $SYNAPSE_CONFIG_DIR/.selected_config_profile; 72 | $BB echo "$SYNAPSE_CONFIG imported $ROWS row(s)."; 73 | elif [ "$SYNAPSE_CONFIG" == "None" ]; then 74 | $BB echo "None selected."; 75 | else 76 | $BB echo "File not found."; 77 | fi; 78 | ;; 79 | esac; 80 | -------------------------------------------------------------------------------- /data/UKM/actions/touch: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | T=/sys/devices/virtual/input/lge_touch/accuracy; 5 | 6 | read() { 7 | VALUE=0; 8 | NOW=`$BB cat $T`; 9 | for TOUCH in $NOW; do 10 | VALUE=$(($VALUE+1)); 11 | if [ "$VALUE" == $1 ]; then 12 | $BB echo $TOUCH; 13 | return 14 | fi; 15 | done; 16 | } 17 | 18 | write() { 19 | SET=$2; 20 | TOUCHARR=""; 21 | VALUE=0; 22 | NOW=`$BB cat $T`; 23 | for TOUCH in $NOW; do 24 | VALUE=$(($VALUE+1)); 25 | if [ "$VALUE" == $1 ]; then 26 | if [ "$VALUE" == 1 ]; then 27 | TOUCHARR="$SET"; 28 | else 29 | TOUCHARR="$TOUCHARR $SET"; 30 | fi; 31 | else 32 | if [ "$VALUE" == 1 ]; then 33 | TOUCHARR="$TOUCH"; 34 | else 35 | TOUCHARR="$TOUCHARR $TOUCH"; 36 | fi; 37 | fi; 38 | done; 39 | $BB echo $TOUCHARR > $T; 40 | } 41 | 42 | if [[ ! -z $2 ]]; then 43 | write $1 $2; 44 | fi; 45 | 46 | $BB echo $(read $1); 47 | -------------------------------------------------------------------------------- /data/UKM/actions/url: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | case $1 in 5 | donate) 6 | am start -a android.intent.action.VIEW -d https://www.paypal.me/yarpiin; 7 | 8 | ;; 9 | esac; -------------------------------------------------------------------------------- /data/UKM/actions/voltage: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | cpuread() { 5 | while read FREQ UVOLT UNIT; do 6 | if [ $FREQ == $1 ]; then 7 | $BB echo $UVOLT; 8 | return; 9 | fi; 10 | done < $P; 11 | } 12 | 13 | cpuwrite() { 14 | VOLTARR=""; 15 | while read FREQ UVOLT UNIT; do 16 | if [ $FREQ == $1 ]; then 17 | VOLTARR="$VOLTARR $2"; 18 | else 19 | VOLTARR="$VOLTARR $UVOLT"; 20 | fi; 21 | done < $P; 22 | 23 | $BB echo "$VOLTARR" > $P 2> /dev/null; 24 | } 25 | 26 | coreread() { 27 | VOLTAGE=0; 28 | while read UVOLT UNIT; do 29 | VOLTAGE=$((VOLTAGE + 1)); 30 | if [ "$VOLTAGE" == $1 ]; then 31 | $BB echo $UVOLT; 32 | return; 33 | fi; 34 | done < $P; 35 | } 36 | 37 | corewrite() { 38 | VOLTARR=""; 39 | VOLTAGE=0; 40 | while read UVOLT UNIT; do 41 | VOLTAGE=$((VOLTAGE + 1)); 42 | if [ "$VOLTAGE" == $1 ]; then 43 | VOLTARR="$VOLTARR $2"; 44 | else 45 | VOLTARR="$VOLTARR $UVOLT"; 46 | fi; 47 | done < $P; 48 | 49 | $BB echo $VOLTARR > $P 2> /dev/null; 50 | } 51 | 52 | case $1 in 53 | cpuvoltglobal) 54 | VOLT_PROF=$UKM/files/volt_prof; 55 | P=/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table; 56 | 57 | if [ -f $P ]; then 58 | if [[ ! -z $3 ]]; then 59 | VOLT=$3; 60 | CURR_VOLT=`$BB cat $VOLT_PROF`; 61 | NEW_VOLT=$((VOLT - CURR_VOLT)); 62 | $BB echo $VOLT > $VOLT_PROF; 63 | 64 | VOLTARR=""; 65 | while read FREQ UVOLT UNIT; do 66 | VOLTARR="$VOLTARR $((UVOLT + NEW_VOLT))"; 67 | done < $P; 68 | 69 | $BB echo "$VOLTARR" > $P 2> /dev/null; 70 | fi; 71 | 72 | V=`$BB cat $VOLT_PROF 2> /dev/null`; 73 | 74 | if [ -z "$V" ]; then $BB echo 0; else $BB echo $V; fi; 75 | fi; 76 | ;; 77 | cpuvolt) 78 | P=/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table; 79 | 80 | if [ -f $P ]; then 81 | if [[ ! -z $3 ]]; then 82 | cpuwrite $2 $3; 83 | fi; 84 | 85 | $BB echo `cpuread $2`; 86 | fi; 87 | ;; 88 | gpuvolt) 89 | P=/sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table; 90 | 91 | if [ -f $P ]; then 92 | if [[ ! -z $3 ]]; then 93 | corewrite $2 $3; 94 | fi; 95 | 96 | $BB echo $(coreread $2); 97 | fi; 98 | ;; 99 | corevolt) 100 | P=/sys/devices/virtual/misc/customvoltage/core_voltages; 101 | 102 | if [ -f $P ]; then 103 | if [[ ! -z $3 ]]; then 104 | corewrite $2 $3; 105 | fi; 106 | 107 | $BB echo `coreread $2`; 108 | fi; 109 | ;; 110 | ivavolt) 111 | P=/sys/devices/virtual/misc/customvoltage/iva_voltages; 112 | 113 | if [ -f $P ]; then 114 | if [[ ! -z $3 ]]; then 115 | corewrite $2 $3; 116 | fi; 117 | 118 | $BB echo `coreread $2`; 119 | fi; 120 | ;; 121 | regulatorvolt) 122 | P=/sys/devices/virtual/misc/customvoltage/regulator_voltages; 123 | 124 | if [ -f $P ]; then 125 | if [[ ! -z $3 ]]; then 126 | cpuwrite $2 $3; 127 | fi; 128 | $BB echo `cpuread $2`; 129 | fi; 130 | ;; 131 | esac; 132 | -------------------------------------------------------------------------------- /data/UKM/actions/wake: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | INITD=/system/etc/init.d; 4 | 5 | if [ -f $1 ]; then 6 | if [[ ! -z $2 ]]; then 7 | $BB echo $2 > $1 2> /dev/null; 8 | WAKE_PROF=`cat $UKM/files/wake_prof`; 9 | 10 | if [ $2 -eq 1 ]; then 11 | if [ "$1" == "/sys/devices/virtual/misc/touchwake/enabled" ] && [ -f "/sys/devices/virtual/input/lge_touch/dt_wake_enabled" ]; then 12 | $BB echo "0" > /sys/devices/virtual/input/lge_touch/dt_wake_enabled; 13 | elif [ "$1" == "/sys/devices/virtual/input/lge_touch/dt_wake_enabled" ] && [ -f "/sys/devices/virtual/misc/touchwake/enabled" ]; then 14 | $BB echo "0" > /sys/devices/virtual/misc/touchwake/enabled; 15 | fi; 16 | fi; 17 | 18 | PATH=$1; 19 | PATH=${PATH##*/}; 20 | 21 | if [ $WAKE_PROF -eq 1 ] && [ ! -f "$INITD/UKM_WAKE" ]; then 22 | OWNER=`$BB stat -c %u $INITD`; 23 | PERM=`$BB stat -c %a $INITD`; 24 | 25 | $BB mount -o remount,rw /system 2> /dev/null; 26 | $BB mount -t rootfs -o remount,rw rootfs 2> /dev/null; 27 | $BB test $OWNER -ne "0" && $BB chown -R root:root $INITD 2> /dev/null; 28 | $BB test $PERM -lt "775" && $BB chmod -R 775 $INITD 2> /dev/null; 29 | $BB echo '#!/system/bin/sh' > $INITD/UKM_WAKE 2> /dev/null; 30 | $BB echo '' >> $INITD/UKM_WAKE 2> /dev/null; 31 | $BB echo '#This file was generated automaticaly from Synapse/UKM.' >> $INITD/UKM_WAKE 2> /dev/null; 32 | $BB echo '#It contains wake options to be applied from init.d script.' >> $INITD/UKM_WAKE 2> /dev/null; 33 | $BB echo '' >> $INITD/UKM_WAKE 2> /dev/null; 34 | $BB chmod 775 $INITD/UKM_WAKE 2> /dev/null; 35 | $BB mount -t rootfs -o remount,ro rootfs 2> /dev/null; 36 | $BB mount -o remount,ro /system 2> /dev/null; 37 | fi; 38 | 39 | if [ $WAKE_PROF -eq 1 ] && [ -f "$INITD/UKM_WAKE" ] && [ "$1" != "$UKM/files/wake_prof" ] && [ $2 -eq 1 ]; then 40 | if [ ! "`$BB grep $PATH $INITD/UKM_WAKE`" ]; then 41 | OWNER=`$BB stat -c %u $INITD`; 42 | PERM=`$BB stat -c %a $INITD`; 43 | 44 | $BB mount -o remount,rw /system 2> /dev/null; 45 | $BB mount -t rootfs -o remount,rw rootfs 2> /dev/null; 46 | $BB test $OWNER -ne "0" && $BB chown -R root:root $INITD 2> /dev/null; 47 | $BB test $PERM -lt "775" && $BB chmod -R 775 $INITD 2> /dev/null; 48 | $BB echo 'echo '$2' > '$1 >> $INITD/UKM_WAKE 2> /dev/null; 49 | $BB mount -t rootfs -o remount,ro rootfs 2> /dev/null; 50 | $BB mount -o remount,ro /system 2> /dev/null; 51 | fi; 52 | fi; 53 | 54 | if [ $WAKE_PROF -eq 1 ] && [ -f "$INITD/UKM_WAKE" ] && [ "$1" != "$UKM/files/wake_prof" ] && [ $2 -eq 0 ]; then 55 | OWNER=`$BB stat -c %u $INITD`; 56 | PERM=`$BB stat -c %a $INITD`; 57 | 58 | $BB mount -o remount,rw /system 2> /dev/null; 59 | $BB mount -t rootfs -o remount,rw rootfs 2> /dev/null; 60 | $BB test $OWNER -ne "0" && $BB chown -R root:root $INITD 2> /dev/null; 61 | $BB test $PERM -lt "775" && $BB chmod -R 775 $INITD 2> /dev/null; 62 | $BB sed -i "/$PATH/d" $INITD/UKM_WAKE 2> /dev/null; 63 | $BB mount -t rootfs -o remount,ro rootfs 2> /dev/null; 64 | $BB mount -o remount,ro /system 2> /dev/null; 65 | fi; 66 | 67 | if [ $WAKE_PROF -eq 0 ] && [ -f "$INITD/UKM_WAKE" ]; then 68 | OWNER=`$BB stat -c %u $INITD`; 69 | PERM=`$BB stat -c %a $INITD`; 70 | 71 | $BB mount -o remount,rw /system 2> /dev/null; 72 | $BB mount -t rootfs -o remount,rw rootfs 2> /dev/null; 73 | $BB test $OWNER -ne "0" && $BB chown -R root:root $INITD 2> /dev/null; 74 | $BB test $PERM -lt "775" && $BB chmod -R 775 $INITD 2> /dev/null; 75 | $BB rm -f $INITD/UKM_WAKE 2> /dev/null; 76 | $BB mount -t rootfs -o remount,ro rootfs 2> /dev/null; 77 | $BB mount -o remount,ro /system 2> /dev/null; 78 | fi; 79 | fi; 80 | 81 | $BB echo `$BB cat $1`; 82 | fi; 83 | -------------------------------------------------------------------------------- /data/UKM/actions/zram: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | 4 | SWAP=/dev/block/zram0; 5 | RESET=/sys/devices/virtual/block/zram0/reset; 6 | ZRAM=$2; 7 | 8 | if [ -f $1 ]; then 9 | if [[ ! -z $2 ]]; then 10 | $BB swapoff $SWAP > /dev/null 2>&1; 11 | $BB echo "1" > $RESET; 12 | 13 | if [ $ZRAM -gt 0 ]; then 14 | $BB echo $((ZRAM * 1024 * 1024)) > $1; 15 | $BB mkswap $SWAP > /dev/null 2>&1; 16 | $BB swapon $SWAP > /dev/null 2>&1; 17 | fi; 18 | fi; 19 | 20 | ZRAM=`$BB cat $1`; 21 | $BB echo $((ZRAM / 1024 / 1024)); 22 | else 23 | $BB echo "0"; 24 | fi; 25 | -------------------------------------------------------------------------------- /data/UKM/busybox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/data/UKM/busybox -------------------------------------------------------------------------------- /data/UKM/config.json.generate: -------------------------------------------------------------------------------- 1 | UKM=/data/UKM; 2 | BB=$UKM/busybox; 3 | DEVICE=`sh $UKM/device/.device.sh`; 4 | 5 | 6 | bool() { 7 | [ `$BB cat $1` == "Y" ] && $BB echo "1"; 8 | [ `$BB cat $1` == "N" ] && $BB echo "0"; 9 | } 10 | 11 | cat << CTAG 12 | { 13 | sections: [ 14 | `if [ -n "$DEVICE" ]; then 15 | . $UKM/config.json.generate.info 16 | $BB echo ',' 17 | . $UKM/config.json.generate.status 18 | $BB echo ',' 19 | . $UKM/config.json.generate.cpu1 20 | $BB echo ',' 21 | if [ -d "/sys/module/clock_cpu_8996" -o -f "/sys/devices/system/cpu/cpu4/cpufreq/scaling_available_frequencies" ]; then 22 | . $UKM/config.json.generate.cpu2 23 | $BB echo ',' 24 | fi 25 | . $UKM/config.json.generate.cpuboost 26 | $BB echo ',' 27 | . $UKM/config.json.generate.hotplug 28 | $BB echo ',' 29 | . $UKM/config.json.generate.thermal 30 | $BB echo ',' 31 | if [ -f "/sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels" ]; then 32 | . $UKM/config.json.generate.cpuvolt 33 | $BB echo ',' 34 | fi 35 | if [ -d "/sys/module/clock_cpu_8996" ]; then 36 | . $UKM/config.json.generate.kryo.io 37 | else 38 | . $UKM/config.json.generate.io 39 | $BB echo ',' 40 | fi 41 | . $UKM/config.json.generate.gpu 42 | $BB echo ',' 43 | if [ -f "/sys/devices/platform/kcal_ctrl.0/kcal" -o -f "/sys/devices/platform/mipi_lgit.1537/kgamma_b" -o -f "/sys/class/misc/gammacontrol/brightness" -o -f "/sys/devices/i2c-0/0-0038/lm3530_br_mode" -o -f "/sys/module/msm_fb/parameters/backlight_dimmer" -o -f "/sys/devices/platform/mipi_lgit.1537/kgamma_blue" -o -f "/sys/module/dsi_panel/kgamma_bn" -o -d "/sys/devices/virtual/graphics/fb0" -o -f "/sys/module/panel_s6e8aa0/parameters/contrast" -o -f "/sys/devices/platform/omapdss/manager0/gamma" -o -f "/sys/class/backlight/s6e8aa0/acl_set" ]; then 44 | . $UKM/config.json.generate.gamma 45 | $BB echo ',' 46 | fi 47 | if [ -d "/sys/kernel/sound_control_3" -o -d "/sys/class/misc/soundcontrol" -o -d "/sys/kernel/sound_control" ]; then 48 | . $UKM/config.json.generate.sound 49 | $BB echo ',' 50 | fi 51 | if [ -d "/sys/bus/i2c/devices/0-0058" ]; then 52 | . $UKM/config.json.generate.speaker 53 | $BB echo ',' 54 | fi 55 | . $UKM/config.json.generate.mem 56 | $BB echo ',' 57 | . $UKM/config.json.generate.wake 58 | $BB echo ',' 59 | . $UKM/config.json.generate.misc 60 | $BB echo ',' 61 | . $UKM/config.json.generate.adv 62 | $BB echo ',' 63 | . $UKM/config.json.generate.bprop 64 | $BB echo ',' 65 | . $UKM/config.json.generate.tools 66 | $BB echo ',' 67 | . $UKM/config.json.generate.profile 68 | else 69 | . $UKM/config.json.generate.error 70 | fi` 71 | ] 72 | } 73 | CTAG 74 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.bprop: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:BUILD.PROP, 4 | elements:[ 5 | { SPane:{ 6 | title:"build.prop Tweaks", 7 | description:"A value of -1 on any of the following settings means that setting was not found in your build.prop file.", 8 | }}, 9 | { SSeekBar:{ 10 | title:"Wifi Scan Interval", 11 | description:"Set the interval on which on wifi will scan for channels. Setting this to a higher value will save battery.", 12 | unit:" sec", 13 | min:-1, 14 | max:300, 15 | step:1, 16 | default:15, 17 | action:"buildprop wifi.supplicant_scan_interval", 18 | }}, 19 | { SSeekBar:{ 20 | title:"VM Heapsize", 21 | description:"Set the maximum amount of heapsize (memory) a single instance of the Dalvik Virtual Machine (application) can obtain.", 22 | unit:" MB", 23 | min:-1, 24 | max:1024, 25 | step:1, 26 | default:512, 27 | action:"buildprop dalvik.vm.heapsize", 28 | }}, 29 | { SCheckBox:{ 30 | label:"Allow purging of assets", 31 | description:"Purging of bitmap memory assets allows the freeing of more RAM when needed.", 32 | default:0, 33 | action:"buildprop persist.sys.purgeable_assets", 34 | }}, 35 | { SPane:{ 36 | title:"ADB over WIFI" 37 | }}, 38 | { SGeneric:{ 39 | title:"Device HostName", 40 | default:`getprop net.hostname 2> /dev/null`, 41 | action:"buildprop net.hostname", 42 | }}, 43 | { SGeneric:{ 44 | title:"Wireless Port", 45 | default:`getprop service.adb.tcp.port`, 46 | action:"buildprop service.adb.tcp.port", 47 | }}, 48 | `if [ 2 == 1 ]; then 49 | $BB echo '{ SPane:{ 50 | title:"DNS Tweaks", 51 | description:"Allows you to set the default DNS (Domain Name System) for 3G connections. Use this to speed up your browsing experience and improve your security.", 52 | }}, 53 | { SDescription:{ 54 | description:"Google > DNS1: 8.8.8.8 | DNS2: 8.8.4.4" 55 | }}, 56 | { SDescription:{ 57 | description:"OpenDNS > DNS1: 208.67.222.222 | DNS2: 208.67.220.220" 58 | }}, 59 | { SGeneric:{ 60 | title:"3G DNS1:", 61 | default:'\`getprop net.rmnet0.dns1\`', 62 | action:"buildprop net.rmnet0.dns1", 63 | }}, 64 | { SGeneric:{ 65 | title:"3G DNS2:", 66 | default:'\`getprop net.rmnet0.dns2\`', 67 | action:"buildprop net.rmnet0.dns2", 68 | }},' 69 | fi` 70 | ] 71 | } 72 | CTAG 73 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.cpu1: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:CPU 1, 4 | elements:[ 5 | { SLiveLabel:{ 6 | refresh:0, 7 | style:italic, 8 | action:"live CPU1" 9 | }}, 10 | { SSpacer:{ 11 | height: 1 12 | }}, 13 | { SPane:{ 14 | title:"Live Cpu Frequency:" 15 | }}, 16 | { SSpacer:{ 17 | height: 1 18 | }}, 19 | { SLiveLabel:{ 20 | refresh:800, 21 | style:italic, 22 | action:"live CPUFrequency" 23 | }}, 24 | { SSpacer:{ 25 | height: 1 26 | }}, 27 | { STitleBar:{ 28 | title:"CPU Frequency Scaling" 29 | }}, 30 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 31 | $BB echo '{ SSpacer:{ 32 | height: 1 33 | }},' 34 | $BB echo '{ SSeekBar:{ 35 | title:"CPU Min Scaling Frequency", 36 | description:"Set the minimum frequency the CPU scales down to.", 37 | default:'\`sh $DEVICE DefaultCPUMinFrequency\`', 38 | action:"cpuset '\`sh $DEVICE DirCPUMinFrequency\`'", 39 | values:{' 40 | sh $DEVICE CPUFrequencyList 41 | $BB echo }' 42 | }},' 43 | $BB echo '{ SSeekBar:{ 44 | title:"CPU Max Scaling Frequency", 45 | description:"Set the maximum frequency the CPU scales up to.", 46 | default:'\`sh $DEVICE DefaultCPUMaxFrequency\`', 47 | action:"cpuset '\`sh $DEVICE DirCPUMaxFrequency\`'", 48 | values:{' 49 | sh $DEVICE CPUFrequencyList 50 | $BB echo }' 51 | }},' 52 | fi` 53 | `if [ -d "/sys/module/clock_cpu_8996" ]; then 54 | $BB echo '{ SPane:{ 55 | title:"Core Control" 56 | }},' 57 | if [ -d "/sys/module/clock_cpu_8996" ]; then 58 | CPU0=\`$BB cat /sys/devices/system/cpu/cpu0/online\` 59 | $BB echo '{ SCheckBox:{ 60 | label:"CPU0 Enabled", 61 | description:"Allow to disable CPU0.", 62 | default:'$CPU0', 63 | action:"generic /sys/devices/system/cpu/cpu0/online" 64 | }},' 65 | fi 66 | if [ -d "/sys/module/clock_cpu_8996" ]; then 67 | CPU1=\`$BB cat /sys/devices/system/cpu/cpu1/online\` 68 | $BB echo '{ SCheckBox:{ 69 | label:"CPU1 Enabled", 70 | description:"Allow to disable CPU1.", 71 | default:'$CPU1', 72 | action:"generic /sys/devices/system/cpu/cpu1/online" 73 | }},' 74 | fi 75 | fi` 76 | { SSpacer:{ 77 | height: 1 78 | }}, 79 | { SPane:{ 80 | title:"CPU Governor Tunables", 81 | }}, 82 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 83 | $BB echo '{ SSpacer:{ 84 | height: 2 85 | }}, 86 | { SLiveLabel:{ 87 | refresh:0, 88 | style:italic, 89 | action:"live CPU1" 90 | }}, 91 | { SSpacer:{ 92 | height: 1 93 | }}, 94 | { SOptionList:{ 95 | default:'\`sh $DEVICE DefaultCPUGovernor\`', 96 | action:"cpuset '\`sh $DEVICE DirCPUGovernor\`'", 97 | values:[' 98 | sh $DEVICE CPUGovernorList 99 | $BB echo '], 100 | notify:[ 101 | { 102 | on:APPLY, 103 | do:[ REFRESH, CANCEL ], 104 | to:"'\`sh $DEVICE DirCPU1GovernorTree\`'" 105 | }, 106 | { 107 | on:APPLY, 108 | do:[ REFRESH, CANCEL ], 109 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 110 | }, 111 | { 112 | on:REFRESH, 113 | do:REFRESH, 114 | to:"'\`sh $DEVICE DirCPU1GovernorTree\`'" 115 | } 116 | { 117 | on:REFRESH, 118 | do:REFRESH, 119 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 120 | } 121 | ] 122 | }},' 123 | fi` 124 | { SSpacer:{ 125 | height: 2 126 | }}, 127 | { STreeDescriptor:{ 128 | path:"`sh $DEVICE DirCPU1GovernorTree`", 129 | generic: { 130 | directory: { 131 | STreeDescriptor:{ 132 | generic: { 133 | directory: {}, 134 | element: { 135 | SGeneric: { title:"@BASENAME" } 136 | } 137 | }, 138 | exclude: [ 139 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 140 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 141 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 142 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 143 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 144 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 145 | ] 146 | }, 147 | } 148 | }, 149 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 150 | }}, 151 | { SSpacer:{ 152 | height: 1 153 | }}, 154 | { STreeDescriptor:{ 155 | path:"`sh $DEVICE DirCPUGovernorTree`", 156 | generic: { 157 | directory: { 158 | STreeDescriptor:{ 159 | generic: { 160 | directory: {}, 161 | element: { 162 | SGeneric: { title:"@BASENAME" } 163 | } 164 | }, 165 | exclude: [ 166 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 167 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 168 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 169 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 170 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 171 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 172 | ] 173 | }, 174 | } 175 | }, 176 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 177 | }}, 178 | { SSpacer:{ 179 | height: 1 180 | }}, 181 | ] 182 | } 183 | CTAG 184 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.cpu2: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:CPU 2, 4 | elements:[ 5 | { SLiveLabel:{ 6 | refresh:0, 7 | style:italic, 8 | action:"live CPU2" 9 | }}, 10 | { SSpacer:{ 11 | height: 1 12 | }}, 13 | { SPane:{ 14 | title:"Live Cpu Frequency:" 15 | }}, 16 | { SSpacer:{ 17 | height: 1 18 | }}, 19 | { SLiveLabel:{ 20 | refresh:800, 21 | style:italic, 22 | action:"live CPU1Frequency" 23 | }}, 24 | { SSpacer:{ 25 | height: 1 26 | }}, 27 | { STitleBar:{ 28 | title:"CPU Frequency Scaling" 29 | }}, 30 | `if [ -f "/sys/devices/system/cpu/cpu5/cpufreq/scaling_available_frequencies" ]; then 31 | $BB echo '{ SSpacer:{ 32 | height: 1 33 | }},' 34 | $BB echo '{ SSeekBar:{ 35 | title:"CPU2 Min Scaling Frequency", 36 | description:"Set the minimum frequency the CPU scales down to.", 37 | default:'\`sh $DEVICE DefaultCPU2MinFrequency\`', 38 | action:"cpuset '\`sh $DEVICE DirCPU2MinFrequency\`'", 39 | values:{' 40 | sh $DEVICE CPU2FrequencyList 41 | $BB echo }' 42 | }},' 43 | $BB echo '{ SSeekBar:{ 44 | title:"CPU2 Max Scaling Frequency", 45 | description:"Set the maximum frequency the CPU scales up to.", 46 | default:'\`sh $DEVICE DefaultCPU2MaxFrequency\`', 47 | action:"cpuset '\`sh $DEVICE DirCPU2MaxFrequency\`'", 48 | values:{' 49 | sh $DEVICE CPU2FrequencyList 50 | $BB echo }' 51 | }},' 52 | fi` 53 | `if [ -d "/sys/module/clock_cpu_8996" ]; then 54 | $BB echo '{ SSpacer:{ 55 | height: 1 56 | }},' 57 | $BB echo '{ SSeekBar:{ 58 | title:"CPU2 Min Scaling Frequency", 59 | description:"Set the minimum frequency the CPU scales down to.", 60 | default:'\`sh $DEVICE DefaultCPU1MinFrequency\`', 61 | action:"cpuset '\`sh $DEVICE DirCPU1MinFrequency\`'", 62 | values:{' 63 | sh $DEVICE CPU1FrequencyList 64 | $BB echo }' 65 | }},' 66 | $BB echo '{ SSeekBar:{ 67 | title:"CPU2 Max Scaling Frequency", 68 | description:"Set the maximum frequency the CPU scales up to.", 69 | default:'\`sh $DEVICE DefaultCPU1MaxFrequency\`', 70 | action:"cpuset '\`sh $DEVICE DirCPU1MaxFrequency\`'", 71 | values:{' 72 | sh $DEVICE CPU1FrequencyList 73 | $BB echo }' 74 | }},' 75 | fi` 76 | `if [ -d "/sys/module/clock_cpu_8996" ]; then 77 | $BB echo '{ SPane:{ 78 | title:"Core Control" 79 | }},' 80 | if [ -d "/sys/module/clock_cpu_8996/parameters" ]; then 81 | CPU2=\`$BB cat /sys/devices/system/cpu/cpu2/online\` 82 | $BB echo '{ SCheckBox:{ 83 | label:"CPU2 Enabled", 84 | description:"Allow to disable CPU2.", 85 | default:'$CPU2', 86 | action:"generic /sys/devices/system/cpu/cpu2/online" 87 | }},' 88 | fi 89 | if [ -d "/sys/module/clock_cpu_8996/parameters" ]; then 90 | CPU3=\`$BB cat /sys/devices/system/cpu/cpu3/online\` 91 | $BB echo '{ SCheckBox:{ 92 | label:"CPU3 Enabled", 93 | description:"Allow to disable CPU3.", 94 | default:'$CPU3', 95 | action:"generic /sys/devices/system/cpu/cpu3/online" 96 | }},' 97 | fi 98 | fi` 99 | { SSpacer:{ 100 | height: 1 101 | }}, 102 | { SPane:{ 103 | title:"CPU Governor Tunables", 104 | }}, 105 | `if [ -f "/sys/devices/system/cpu/cpu5/cpufreq/scaling_available_frequencies" ]; then 106 | $BB echo '{ SSpacer:{ 107 | height: 2 108 | }}, 109 | { SLiveLabel:{ 110 | refresh:0, 111 | style:italic, 112 | action:"live CPU2" 113 | }}, 114 | { SSpacer:{ 115 | height: 1 116 | }}, 117 | { SOptionList:{ 118 | default:'\`sh $DEVICE DefaultCPU2Governor\`', 119 | action:"cpuset '\`sh $DEVICE DirCPU2Governor\`'", 120 | values:[' 121 | sh $DEVICE CPU2GovernorList 122 | $BB echo '], 123 | notify:[ 124 | { 125 | on:APPLY, 126 | do:[ REFRESH, CANCEL ], 127 | to:"'\`sh $DEVICE DirCPU3GovernorTree\`'" 128 | }, 129 | { 130 | on:APPLY, 131 | do:[ REFRESH, CANCEL ], 132 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 133 | }, 134 | { 135 | on:REFRESH, 136 | do:REFRESH, 137 | to:"'\`sh $DEVICE DirCPU3GovernorTree\`'" 138 | } 139 | { 140 | on:REFRESH, 141 | do:REFRESH, 142 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 143 | } 144 | ] 145 | }},' 146 | fi` 147 | { SSpacer:{ 148 | height: 1 149 | }}, 150 | { STreeDescriptor:{ 151 | path:"`sh $DEVICE DirCPU3GovernorTree`", 152 | generic: { 153 | directory: { 154 | STreeDescriptor:{ 155 | generic: { 156 | directory: {}, 157 | element: { 158 | SGeneric: { title:"@BASENAME" } 159 | } 160 | }, 161 | exclude: [ 162 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 163 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 164 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 165 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 166 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 167 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 168 | ] 169 | }, 170 | } 171 | }, 172 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 173 | }}, 174 | { SSpacer:{ 175 | height: 1 176 | }}, 177 | { STreeDescriptor:{ 178 | path:"`sh $DEVICE DirCPUGovernorTree`", 179 | generic: { 180 | directory: { 181 | STreeDescriptor:{ 182 | generic: { 183 | directory: {}, 184 | element: { 185 | SGeneric: { title:"@BASENAME" } 186 | } 187 | }, 188 | exclude: [ 189 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 190 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 191 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 192 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 193 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 194 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 195 | ] 196 | }, 197 | } 198 | }, 199 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 200 | }}, 201 | `if [ -d "/sys/module/clock_cpu_8996" ]; then 202 | $BB echo '{ SLiveLabel:{ 203 | refresh:0, 204 | style:italic, 205 | action:"live CPU2" 206 | }}, 207 | { SSpacer:{ 208 | height: 1 209 | }}, 210 | { SOptionList:{ 211 | default:'\`sh $DEVICE DefaultCPU1Governor\`', 212 | action:"cpuset '\`sh $DEVICE DirCPU1Governor\`'", 213 | values:[' 214 | sh $DEVICE CPU1GovernorList 215 | $BB echo '], 216 | notify:[ 217 | { 218 | on:APPLY, 219 | do:[ REFRESH, CANCEL ], 220 | to:"'\`sh $DEVICE DirCPU2GovernorTree\`'" 221 | }, 222 | { 223 | on:APPLY, 224 | do:[ REFRESH, CANCEL ], 225 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 226 | }, 227 | { 228 | on:REFRESH, 229 | do:REFRESH, 230 | to:"'\`sh $DEVICE DirCPU2GovernorTree\`'" 231 | } 232 | { 233 | on:REFRESH, 234 | do:REFRESH, 235 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 236 | } 237 | ] 238 | }},' 239 | fi` 240 | { SSpacer:{ 241 | height: 2 242 | }}, 243 | { STreeDescriptor:{ 244 | path:"`sh $DEVICE DirCPU2GovernorTree`", 245 | generic: { 246 | directory: { 247 | STreeDescriptor:{ 248 | generic: { 249 | directory: {}, 250 | element: { 251 | SGeneric: { title:"@BASENAME" } 252 | } 253 | }, 254 | exclude: [ 255 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 256 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 257 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 258 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 259 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 260 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 261 | ] 262 | }, 263 | } 264 | }, 265 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 266 | }}, 267 | { SSpacer:{ 268 | height: 1 269 | }}, 270 | { STreeDescriptor:{ 271 | path:"`sh $DEVICE DirCPUGovernorTree`", 272 | generic: { 273 | directory: { 274 | STreeDescriptor:{ 275 | generic: { 276 | directory: {}, 277 | element: { 278 | SGeneric: { title:"@BASENAME" } 279 | } 280 | }, 281 | exclude: [ 282 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 283 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 284 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 285 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 286 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 287 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 288 | ] 289 | }, 290 | } 291 | }, 292 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 293 | }}, 294 | { SSpacer:{ 295 | height: 1 296 | }}, 297 | ] 298 | } 299 | CTAG 300 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.cpuboost: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:CPU BOOST, 4 | elements:[ 5 | { SPane:{ 6 | title:"Info" 7 | }}, 8 | { SDescription:{ 9 | description:"CPU frequency is boosted to a higher level when the touch screen is being used." 10 | }}, 11 | `if [ -d "/sys/module/cpu_boost/parameters" ]; then 12 | $BB echo '{ SPane:{ 13 | title:"CPU Boost Tunables" 14 | }}, 15 | { SLiveLabel:{ 16 | refresh:0, 17 | style:italic, 18 | action:"live CpuBoost" 19 | }},' 20 | if [ -f "/sys/module/cpu_boost/parameters/cpu_boost" ]; then 21 | CPUBOOST=\`$BB cat /sys/module/cpu_boost/parameters/cpu_boost\`; 22 | $BB echo '{ SCheckBox:{ 23 | label:"Enable", 24 | description:"An in kernel replacement for Qualcomms MPDecision. Developed by Cyanogenmod.", 25 | default:'$CPUBOOST', 26 | action:"generic /sys/module/cpu_boost/parameters/cpu_boost" 27 | }},' 28 | fi 29 | if [ -f "/sys/module/cpu_boost/parameters/cpuboost_enable" ]; then 30 | CPUBOOSTE=\`bool /sys/module/cpu_boost/parameters/cpuboost_enable\`; 31 | $BB echo '{ SCheckBox:{ 32 | label:"Enable", 33 | description:"Enable/Disable CPU Boost", 34 | default:'$CPUBOOSTE', 35 | action:"boolean /sys/module/cpu_boost/parameters/cpuboost_enable" 36 | }},' 37 | fi 38 | if [ -f "/sys/module/cpu_boost/parameters/input_boost_enabled" ]; then 39 | INBST=\`$BB cat /sys/module/cpu_boost/parameters/input_boost_enabled\` 40 | echo '{ SCheckBox:{ 41 | label:"Input Boost", 42 | description:"Enable/Disable Input Boost.", 43 | default:'$INBST', 44 | action:"generic /sys/module/cpu_boost/parameters/input_boost_enabled" 45 | }},' 46 | fi 47 | if [ -f "/sys/module/cpu_boost/parameters/debug_mask" ]; then 48 | DEBUG=\`$BB cat /sys/module/cpu_boost/parameters/debug_mask\` 49 | echo '{ SCheckBox:{ 50 | label:"Debug Mask", 51 | description:"Allows you to activate debug mask for CPU Boost operations.", 52 | default:'$DEBUG', 53 | action:"generic /sys/module/cpu_boost/parameters/debug_mask" 54 | }},' 55 | fi 56 | if [ -f "/sys/module/cpu_boost/parameters/boost_ms" ]; then 57 | BOOSTMS=\`$BB cat /sys/module/cpu_boost/parameters/boost_ms\` 58 | $BB echo '{ SSeekBar:{ 59 | title:"Boost", 60 | description:"Minimum interval a CPU is boosted.", 61 | unit:" ms", 62 | min:0, 63 | max:5000, 64 | step:10, 65 | default:'$BOOSTMS', 66 | action:"generic /sys/module/cpu_boost/parameters/boost_ms" 67 | }},' 68 | fi 69 | if [ -f "/sys/module/cpu_boost/parameters/sync_threshold" ]; then 70 | SYNCT=\`$BB cat /sys/module/cpu_boost/parameters/sync_threshold\` 71 | $BB echo '{ SSeekBar:{ 72 | title:"Sync Threshold", 73 | description:"When CPU loading crosses the preset threshold, the current CPU is raised to this frequency.", 74 | default:'$SYNCT', 75 | action:"generic /sys/module/cpu_boost/parameters/sync_threshold", 76 | values:{ 0:"Disabled", ' 77 | sh $DEVICE CPUFrequencyList 78 | $BB echo '} 79 | }},' 80 | fi 81 | if [ -f "/sys/module/cpu_boost/parameters/input_boost_ms" ]; then 82 | SYNCT=\`$BB cat /sys/module/cpu_boost/parameters/input_boost_ms\` 83 | $BB echo '{ SSeekBar:{ 84 | title:"Input Boost", 85 | description:"Minimum interval a CPU is boosted when input is detected.", 86 | unit:" ms", 87 | min:0, 88 | max:5000, 89 | step:10, 90 | default:'$SYNCT', 91 | action:"generic /sys/module/cpu_boost/parameters/input_boost_ms" 92 | }},' 93 | fi 94 | if [ -f "/sys/module/cpu_boost/parameters/min_input_interval" ]; then 95 | MBOOSTINT=\`$BB cat /sys/module/cpu_boost/parameters/min_input_interval\` 96 | $BB echo '{ SSeekBar:{ 97 | title:"Min Input Interval", 98 | description:"Minimum Input Interval between touches.", 99 | unit:" ms", 100 | min:100, 101 | max:1500, 102 | step:10, 103 | default:'$MBOOSTINT', 104 | action:"generic /sys/module/cpu_boost/parameters/min_input_interval" 105 | }},' 106 | fi 107 | if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ] && [ -f "/sys/devices/system/cpu/cpu4/cpufreq/scaling_available_frequencies" ]; then 108 | 109 | VALUE=0; for i in \`$BB cat /sys/module/cpu_boost/parameters/input_boost_freq\`; do VALUE=$(($VALUE+1)); done; 110 | 111 | if [ $VALUE -eq 1 ]; then 112 | IBF=\`$BB cat /sys/module/cpu_boost/parameters/input_boost_freq\` 113 | 114 | $BB echo '{ SSeekBar:{ 115 | title:"Input Boost Frequency", 116 | description:"This will boost your minimum CPU speed to the selected frequency when you touch the screen or press a button.", 117 | default:'$IBF', 118 | action:"generic /sys/module/cpu_boost/parameters/input_boost_freq", 119 | values:{ 0:"Disabled", ' 120 | sh $DEVICE CPUFrequencyList 121 | $BB echo '} 122 | }},' 123 | elif [ $VALUE -eq 4 ]; then 124 | $BB echo '{ SSeekBar:{ 125 | title:"CPU0 Input Boost Frequency", 126 | action:"cpuboostibf 0", 127 | values:{ 0:"Disabled", ' 128 | sh $DEVICE CPUFrequencyList 129 | $BB echo '} 130 | }}, 131 | { SSeekBar:{ 132 | title:"CPU1 Input Boost Frequency", 133 | action:"cpuboostibf 1", 134 | values:{ 0:"Disabled", ' 135 | sh $DEVICE CPUFrequencyList 136 | $BB echo '} 137 | }}, 138 | { SSeekBar:{ 139 | title:"CPU2 Input Boost Frequency", 140 | action:"cpuboostibf 2", 141 | values:{ 0:"Disabled", ' 142 | sh $DEVICE CPUFrequencyList 143 | $BB echo '} 144 | }}, 145 | { SSeekBar:{ 146 | title:"CPU3 Input Boost Frequency", 147 | action:"cpuboostibf 3", 148 | values:{ 0:"Disabled", ' 149 | sh $DEVICE CPUFrequencyList 150 | $BB echo '} 151 | }}, 152 | { SSeekBar:{ 153 | title:"CPU4 Input Boost Frequency", 154 | action:"cpuboostibf 4", 155 | values:{ 0:"Disabled", ' 156 | sh $DEVICE CPU2FrequencyList 157 | $BB echo '} 158 | }}, 159 | { SSeekBar:{ 160 | title:"CPU5 Input Boost Frequency", 161 | action:"cpuboostibf 5", 162 | values:{ 0:"Disabled", ' 163 | sh $DEVICE CPU2FrequencyList 164 | $BB echo '} 165 | }}, 166 | { SSeekBar:{ 167 | title:"CPU6 Input Boost Frequency", 168 | action:"cpuboostibf 6", 169 | values:{ 0:"Disabled", ' 170 | sh $DEVICE CPU2FrequencyList 171 | $BB echo '} 172 | }}, 173 | { SSeekBar:{ 174 | title:"CPU7 Input Boost Frequency", 175 | action:"cpuboostibf 7", 176 | values:{ 0:"Disabled", ' 177 | sh $DEVICE CPU2FrequencyList 178 | $BB echo '} 179 | }},' 180 | fi; 181 | fi; 182 | if [ -f "/sys/module/cpu_boost/parameters/input_boost_freq" ] && [ -d "/sys/module/clock_cpu_8996" ]; then 183 | 184 | VALUE=0; for i in \`$BB cat /sys/module/cpu_boost/parameters/input_boost_freq\`; do VALUE=$(($VALUE+1)); done; 185 | 186 | if [ $VALUE -eq 1 ]; then 187 | IBF=\`$BB cat /sys/module/cpu_boost/parameters/input_boost_freq\` 188 | 189 | $BB echo '{ SSeekBar:{ 190 | title:"Input Boost Frequency", 191 | description:"This will boost your minimum CPU speed to the selected frequency when you touch the screen or press a button.", 192 | default:'$IBF', 193 | action:"generic /sys/module/cpu_boost/parameters/input_boost_freq", 194 | values:{ 0:"Disabled", ' 195 | sh $DEVICE CPUFrequencyList 196 | $BB echo '} 197 | }},' 198 | elif [ $VALUE -eq 4 ]; then 199 | $BB echo '{ SSeekBar:{ 200 | title:"CPU0 Input Boost Frequency", 201 | action:"cpuboostibf 0", 202 | values:{ 0:"Disabled", ' 203 | sh $DEVICE CPUFrequencyList 204 | $BB echo '} 205 | }}, 206 | { SSeekBar:{ 207 | title:"CPU1 Input Boost Frequency", 208 | action:"cpuboostibf 1", 209 | values:{ 0:"Disabled", ' 210 | sh $DEVICE CPUFrequencyList 211 | $BB echo '} 212 | }}, 213 | { SSeekBar:{ 214 | title:"CPU2 Input Boost Frequency", 215 | action:"cpuboostibf 2", 216 | values:{ 0:"Disabled", ' 217 | sh $DEVICE CPU1FrequencyList 218 | $BB echo '} 219 | }}, 220 | { SSeekBar:{ 221 | title:"CPU3 Input Boost Frequency", 222 | action:"cpuboostibf 3", 223 | values:{ 0:"Disabled", ' 224 | sh $DEVICE CPU1FrequencyList 225 | $BB echo '} 226 | }},' 227 | fi; 228 | fi; 229 | if [ -f "/sys/module/cpu_boost/parameters/migration_load_threshold" ]; then 230 | MLT=\`$BB cat /sys/module/cpu_boost/parameters/migration_load_threshold\` 231 | $BB echo '{ SSeekBar:{ 232 | title:"Migration Load Threshold", 233 | description:"The amount of load before migrate tasks to another cpu.", 234 | min:0, 235 | max:100, 236 | step:1, 237 | default:'$MLT', 238 | action:"generic /sys/module/cpu_boost/parameters/migration_load_threshold" 239 | }},' 240 | fi 241 | if [ -f "/sys/module/cpu_boost/parameters/load_based_syncs" ]; then 242 | LBS=\`bool /sys/module/cpu_boost/parameters/load_based_syncs\` 243 | $BB echo '{ SCheckBox:{ 244 | label:"Load Based Syncs", 245 | description:"The cpu boost driver can use this load to compute a suitable frequency for the migrating task.", 246 | default:'$LBS', 247 | action:"boolean /sys/module/cpu_boost/parameters/load_based_syncs", 248 | }},' 249 | fi 250 | if [ -f "/sys/module/cpu_boost/parameters/sched_boost_on_input" ]; then 251 | SBOI=\`bool /sys/module/cpu_boost/parameters/sched_boost_on_input\` 252 | $BB echo '{ SCheckBox:{ 253 | label:"Scheduler Boost on Input", 254 | description:"Enable scheduler boost to migrate tasks to big cluster.", 255 | default:'$SBOI', 256 | action:"boolean /sys/module/cpu_boost/parameters/sched_boost_on_input", 257 | }},' 258 | fi 259 | if [ -f "/sys/module/cpu_boost/parameters/hotplug_boost" ]; then 260 | HB=\`bool /sys/module/cpu_boost/parameters/hotplug_boost\` 261 | $BB echo '{ SCheckBox:{ 262 | label:"Hotplug Boost", 263 | description:"Hotplug Boost is similar to input boost but it occurs when CPUs go online.", 264 | default:'$HB', 265 | action:"boolean /sys/module/cpu_boost/parameters/hotplug_boost", 266 | }},' 267 | fi 268 | if [ -f "/sys/module/cpu_boost/parameters/wakeup_boost" ]; then 269 | WB=\`bool /sys/module/cpu_boost/parameters/wakeup_boost\` 270 | $BB echo '{ SCheckBox:{ 271 | label:"Wakeup Boost", 272 | description:"Wakeup Boost is similar to input boost but it occurs when screen is turned on.", 273 | default:'$WB', 274 | action:"boolean /sys/module/cpu_boost/parameters/wakeup_boost", 275 | }},' 276 | fi 277 | $BB echo '{ SSpacer:{ 278 | height: 1 279 | }},' 280 | if [ -f "/sys/module/cpu_boost/parameters/sysctl_thermal_aware_scheduling" ]; then 281 | STAS=\`bool /sys/module/cpu_boost/parameters/sysctl_thermal_aware_scheduling\` 282 | $BB echo '{ SGeneric:{ 283 | title:"Thermal Aware Scheduling", 284 | description:"Balancing the workloads between both the bigger and smaller cores within the SoC regardless of the thermal conditions.", 285 | default:'$STAS', 286 | action:"generic /sys/module/cpu_boost/parameters/sysctl_thermal_aware_scheduling", 287 | }},' 288 | fi 289 | $BB echo '{ SSpacer:{ 290 | height: 1 291 | }},' 292 | fi` 293 | `if [ -d "/sys/kernel/cpu_input_boost" ]; then 294 | $BB echo '{ SPane:{ 295 | title:"Input Boost driver developed by Sultanxda" 296 | }},' 297 | if [ -f "/sys/kernel/cpu_input_boost/enabled" ]; then 298 | INB=\`$BB cat /sys/kernel/cpu_input_boost/enabled\` 299 | $BB echo '{ SCheckBox:{ 300 | label:"Enable", 301 | description:"Enable/Disable Input Boost", 302 | default:'$INB', 303 | action:"generic /sys/kernel/cpu_input_boost/enabled" 304 | }},' 305 | fi 306 | if [ -f "/sys/kernel/cpu_input_boost/ib_duration_ms" ]; then 307 | INB=\`$BB cat /sys/kernel/cpu_input_boost/ib_duration_ms\` 308 | $BB echo '{ SSeekBar:{ 309 | title:"Input Boost Duration", 310 | description:"Sets input boost duration in ms.", 311 | unit:"ms", 312 | min:0, 313 | max:5000, 314 | step:10, 315 | default:'$INB', 316 | action:"generic /sys/kernel/cpu_input_boost/ib_duration_ms", 317 | }},' 318 | fi 319 | fi` 320 | `if [ -d "/sys/kernel/fp_boost" ]; then 321 | $BB echo '{ SPane:{ 322 | title:"Fingerprint Boost" 323 | }},' 324 | if [ -f "/sys/kernel/fp_boost/enabled" ]; then 325 | INB=\`$BB cat /sys/kernel/fp_boost/enabled\` 326 | $BB echo '{ SCheckBox:{ 327 | label:"Enable", 328 | description:"Fingerprint Boost driver from Frap129", 329 | default:'$INB', 330 | action:"generic /sys/kernel/cpu_input_boost/enabled" 331 | }},' 332 | fi 333 | fi` 334 | ] 335 | } 336 | CTAG 337 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.cpuvolt: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:CPU VOLT, 4 | elements:[ 5 | `if [ -f "/sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels" ]; then 6 | $BB echo '{ STitleBar:{ 7 | title:"CPU Global Voltage" 8 | }}, 9 | { SSeekBar:{ 10 | default:0, 11 | action:"cpuvolt global", 12 | unit:" uV", 13 | min:-300000, 14 | max:300000, 15 | step:5000, 16 | notify:[ 17 | { 18 | on:APPLY, 19 | do:[ REFRESH, APPLY ], 20 | to:[' 21 | while read CPUFREQ VOLT; do 22 | CPUFREQ=\`$BB echo $CPUFREQ | sed "s/://"\`; 23 | echo '"cpuvolt '$CPUFREQ'",'; 24 | done < /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels; 25 | $BB echo '] 26 | } 27 | ] 28 | }},' 29 | fi` 30 | `if [ -f "/sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels" ]; then 31 | $BB echo '{ SPane:{ 32 | title:"CPU Frequency Voltage", 33 | description:"Decreasing voltages will lower heat and power consumption of the CPU. Increasing it on overclocked frequencies improves stability. Too low voltages may cause instability and freezes." 34 | }},' 35 | while read CPUFREQ VOLT; do 36 | CPUFREQ=\`$BB echo $CPUFREQ | $BB sed "s/://"\` 37 | LABEL=$((CPUFREQ / 1000)) 38 | $BB echo '{ SSeekBar:{ 39 | title:"'${LABEL}' MHz", 40 | default:'$VOLT', 41 | action:"cpuvolt '$CPUFREQ'", 42 | unit:" uV", 43 | min:500000, 44 | max:1400000, 45 | step:500 46 | }},' 47 | done < /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels 48 | fi` 49 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table" ]; then 50 | $BB echo '{ STitleBar:{ 51 | title:"CPU Global Voltage" 52 | }}, 53 | { SSeekBar:{ 54 | default:0, 55 | action:"voltage cpuvoltglobal global", 56 | unit:" mV", 57 | min:-300, 58 | max:300, 59 | step:5, 60 | notify:[ 61 | { 62 | on:APPLY, 63 | do:[ REFRESH, APPLY ], 64 | to:[' 65 | while read CPUFREQ VOLT UNIT; do 66 | $BB echo '"voltage cpuvolt '$CPUFREQ'",'; 67 | done < /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table; 68 | $BB echo '] 69 | } 70 | ] 71 | }},' 72 | fi` 73 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table" ]; then 74 | $BB echo '{ SPane:{ 75 | title:"CPU Frequency Voltage", 76 | description:"Decreasing voltages will lower heat and power consumption of the CPU. Increasing it on overclocked frequencies improves stability. Too low voltages may cause instability and freezes." 77 | }},' 78 | while read CPUFREQ VOLT UNIT; do 79 | $BB echo '{ SSeekBar:{ 80 | title:"'${CPUFREQ//mhz\:/}' MHz", 81 | unit:"' ${UNIT}'", 82 | min:500, 83 | max:1400, 84 | step:1, 85 | default:'$VOLT', 86 | action:"voltage cpuvolt '${CPUFREQ}'" 87 | }}, 88 | '; 89 | done < /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table; 90 | fi` 91 | `if [ -f "/sys/module/acpuclock_krait/parameters/boost" ] && [ -f "/sys/module/acpuclock_krait/parameters/higher_khz_thres" ]; then 92 | GBOOST=\`bool /sys/module/acpuclock_krait/parameters/boost\` 93 | $BB echo '{ SPane:{ 94 | title:"Boost Voltage", 95 | }}, 96 | { SCheckBox:{ 97 | label:"Enable", 98 | description:"If this is enabled, a 25 mV over-volt will be applied.", 99 | default:'$GBOOST', 100 | action:"boolean /sys/module/acpuclock_krait/parameters/boost" 101 | }},' 102 | if [ -f "/sys/module/acpuclock_krait/parameters/higher_khz_thres" ]; then 103 | HTHRES=\`$BB cat /sys/module/acpuclock_krait/parameters/higher_khz_thres\` 104 | $BB echo '{ SPane:{ 105 | title:"Settings", 106 | }}, 107 | { SSeekBar:{ 108 | title:"Higher Frequency UV", 109 | description:"Above this frequency the Higher uV will be used, else Lower uV will be used.", 110 | default:'$HTHRES', 111 | action:"generic /sys/module/acpuclock_krait/parameters/higher_khz_thres", 112 | values:{' 113 | sh $DEVICE CPUFrequencyList 114 | $BB echo '} 115 | }},' 116 | fi 117 | if [ -f "/sys/module/acpuclock_krait/parameters/lower_uV" ]; then 118 | LUV=\`$BB cat /sys/module/acpuclock_krait/parameters/lower_uV\` 119 | $BB echo '{ SSeekBar:{ 120 | title:"Lower uV", 121 | description:"Undervolting value for lower frequencies.", 122 | unit:" uV", 123 | min:0, 124 | max:300000, 125 | step:5000, 126 | default:'$LUV', 127 | action:"generic /sys/module/acpuclock_krait/parameters/lower_uV", 128 | }},' 129 | fi 130 | if [ -f "/sys/module/acpuclock_krait/parameters/higher_uV" ]; then 131 | HUV=\`$BB cat /sys/module/acpuclock_krait/parameters/higher_uV\` 132 | $BB echo '{ SSeekBar:{ 133 | title:"Higher uV", 134 | description:"Undervolting value for higher frequencies.", 135 | unit:" uV", 136 | min:0, 137 | max:300000, 138 | step:5000, 139 | default:'$HUV', 140 | action:"generic /sys/module/acpuclock_krait/parameters/higher_uV", 141 | }},' 142 | fi 143 | fi` 144 | `if [ -f "/sys/devices/virtual/misc/customvoltage/core_voltages" ]; then 145 | $BB echo '{ STitleBar:{ 146 | title:"Core Voltages" 147 | }},' 148 | VOLTAGE=0 149 | while read UVOLT UNIT; do 150 | VOLTAGE=$((VOLTAGE + 1)); 151 | $BB echo '{ SSeekBar:{ 152 | title:"Voltage '${VOLTAGE}'", 153 | unit:"' ${UNIT}'", 154 | min:700, 155 | max:1500, 156 | step:1, 157 | default:'$UVOLT', 158 | action:"voltage corevolt '${VOLTAGE}'" 159 | }},' 160 | done < /sys/devices/virtual/misc/customvoltage/core_voltages; 161 | fi` 162 | `if [ -f "/sys/devices/virtual/misc/customvoltage/iva_voltages" ]; then 163 | $BB echo '{ STitleBar:{ 164 | title:"IVA Voltages" 165 | }},' 166 | VOLTAGE=0 167 | while read UVOLT UNIT; do 168 | VOLTAGE=$((VOLTAGE + 1)); 169 | $BB echo '{ SSeekBar:{ 170 | title:"Voltage '${VOLTAGE}'", 171 | unit:"' ${UNIT}'", 172 | min:700, 173 | max:1500, 174 | step:1, 175 | default:'$UVOLT', 176 | action:"voltage ivavolt '${VOLTAGE}'" 177 | }},' 178 | done < /sys/devices/virtual/misc/customvoltage/iva_voltages; 179 | fi` 180 | `if [ -f "/sys/devices/virtual/misc/customvoltage/regulator_voltages" ]; then 181 | $BB echo '{ STitleBar:{ 182 | title:"Regulator Voltages" 183 | }},' 184 | while read FREQ UVOLT UNIT; do 185 | $BB echo '{ SSeekBar:{ 186 | title:"'${FREQ//\:/}'", 187 | unit:"' ${UNIT}'", 188 | min:800, 189 | max:3500, 190 | step:1, 191 | default:'$UVOLT', 192 | action:"voltage regulatorvolt '${FREQ}'", 193 | }},' 194 | done < /sys/devices/virtual/misc/customvoltage/regulator_voltages; 195 | fi` 196 | ] 197 | } 198 | CTAG 199 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.error: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:ERROR, 4 | elements:[ 5 | { SLiveLabel:{ 6 | refresh:0, 7 | style:italic, 8 | action:"echo 'DEVICE NOT SUPPORTED'" 9 | }}, 10 | { SPane:{ 11 | title:{ 12 | en:"General", 13 | es:"General" 14 | }, 15 | }}, 16 | { SDescription:{ 17 | description:"Welcome to the Universal Kernel Manager." 18 | }}, 19 | { SDescription:{ 20 | description:"Created by apb_axel." 21 | }}, 22 | { SDescription:{ 23 | description:"Modified by yarpiin." 24 | }}, 25 | { SDescription:{ 26 | description:"Version 3.8.2 - Unified" 27 | }}, 28 | { SDescription:{ 29 | description:"XDA Link: HERE" 30 | }}, 31 | { SPane:{ 32 | title:{ 33 | en:"Device", 34 | es:"Dispositivo" 35 | }, 36 | description:"`getprop ro.product.model` (`getprop ro.product.device`)" 37 | }}, 38 | { SPane:{ 39 | title:{ 40 | en:"Android Version", 41 | es:"Versión de Android" 42 | }, 43 | description:"`getprop ro.build.version.release`" 44 | }}, 45 | { SPane:{ 46 | title:{ 47 | en:"Kernel Version", 48 | es:"Versión del Núcleo" 49 | }, 50 | description:"`$BB cat /proc/version`" 51 | }}, 52 | { SPane:{ 53 | title:{ 54 | en:"ROM Description", 55 | es:"Descripción del ROM" 56 | }, 57 | description:"`getprop ro.build.host | $BB awk '{print toupper($0)}'`" 58 | }}, 59 | { SPane:{ 60 | title:{ 61 | en:"ROM Version", 62 | es:"Versión del ROM" 63 | }, 64 | description:"`MODVER=\`getprop ro.modversion\`; 65 | if [ -n $MODVER ]; then 66 | $BB echo $MODVER; 67 | else 68 | $BB echo \`getprop ro.build.version.incremental\`; 69 | fi;`" 70 | }}, 71 | { SPane:{ 72 | title:{ 73 | en:"Build Date", 74 | es:"Fecha del ROM" 75 | }, 76 | description:"`getprop ro.build.date`" 77 | }}, 78 | { SPane:{ 79 | title:"Disclaimer and Fixing", 80 | description:"To update/refresh UKM, select Fix Device Not Supported below, if it does not work, probably your device is not supported. You can use the link to UKM to verify this." 81 | }}, 82 | { SButton:{ 83 | label:"Fix Device Not Supported", 84 | action:"restorebackup restart" 85 | }}, 86 | ] 87 | } 88 | CTAG 89 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.gpu: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:GPU, 4 | elements:[ 5 | { SPane:{ 6 | title:"Current GPU Frequency:" 7 | }}, 8 | { SLiveLabel:{ 9 | refresh:800, 10 | style:italic, 11 | action:"live GPUFrequency" 12 | }}, 13 | { SPane:{ 14 | title:"GPU Frequency Scaling", 15 | }}, 16 | `if [ -f "\`sh $DEVICE DirGPUMinPwrLevel\`" ]; then 17 | GPUMIN=\`sh $DEVICE DirGPUMinPwrLevel\` 18 | $BB echo '{ SSeekBar:{ 19 | title:"GPU Min Frequency", 20 | description:"Set the minimum frequency the GPU scales down to.", 21 | default:'\`$BB cat $GPUMIN\`', 22 | action:"gpuset '$GPUMIN'", 23 | values:{ 24 | '\`sh $DEVICE GPUPowerLevel\`' 25 | } 26 | }},' 27 | fi` 28 | `if [ -f "\`sh $DEVICE DirGPUMaxFrequency\`" ]; then 29 | GPUMAX=\`sh $DEVICE DirGPUMaxFrequency\` 30 | $BB echo '{ SSeekBar:{ 31 | title:"GPU Max Frequency", 32 | description:"Set the maximum frequency the GPU scales up to.", 33 | default:'\`$BB cat $GPUMAX\`', 34 | action:"generic '$GPUMAX'", 35 | values:{ 36 | '\`sh $DEVICE GPUFrequencyList\`' 37 | } 38 | }},' 39 | fi` 40 | `if [ -f "\`sh $DEVICE DirGPUGovernor\`" ]; then 41 | GPUGOV=\`sh $DEVICE DirGPUGovernor\` 42 | $BB echo '{ SPane:{ 43 | title:"GPU Governor", 44 | description:"The GPU Governor makes scaling decisions based on specific algorithm for 2D/3D scenarios." 45 | }}, 46 | { SOptionList:{ 47 | default:'\`sh $DEVICE DefaultGPUGovernor\`', 48 | action:"gpuset '$GPUGOV'", 49 | values:[ 50 | '\`sh $DEVICE GPUGovernorList\`' 51 | ] 52 | }},' 53 | fi` 54 | `SGA=/sys/module/msm_kgsl_core/parameters; 55 | if [ -f "$SGA/simple_laziness" ] || [ -f "$SGA/simple_ramp_threshold" ] || [ -d "/sys/module/simple_gpu_algorithm/parameters" ]; then 56 | 57 | [ -d "/sys/module/simple_gpu_algorithm/parameters" ] && SGA=/sys/module/simple_gpu_algorithm/parameters; 58 | 59 | $BB echo '{ SPane:{ 60 | title:"Simple Governor Tunables" 61 | }},' 62 | if [ -f "$SGA/simple_gpu_activate" ]; then 63 | SIMPLE=\`$BB cat $SGA/simple_gpu_activate\` 64 | $BB echo '{ SCheckBox:{ 65 | label:"Enable", 66 | description:"An add-on for MSM Adreno TZ GPU Governor. Developed by faux123.", 67 | default:'$SIMPLE', 68 | action:"generic '$SGA'/simple_gpu_activate" 69 | }},' 70 | fi 71 | if [ -f "$SGA/simple_laziness" ]; then 72 | LAZ=\`$BB cat $SGA/simple_laziness\` 73 | $BB echo '{ SSeekBar:{ 74 | title:"Laziness", 75 | description:"Adjusts the number of times the governor skips ramp down requests. Higher = better performance (more battery drain).", 76 | default:'$LAZ', 77 | action:"generic '$SGA'/simple_laziness", 78 | min:0, 79 | max:10, 80 | step:1 81 | }},' 82 | fi 83 | if [ -f "$SGA/simple_ramp_threshold" ]; then 84 | RAMP=\`$BB cat $SGA/simple_ramp_threshold\` 85 | $BB echo '{ SSeekBar:{ 86 | title:"Ramp Threshold", 87 | description:"Adjusts the threshold to ramp up or down GPU frequencies. Lower = better performance (more battery drain).", 88 | default:'$RAMP', 89 | action:"generic '$SGA'/simple_ramp_threshold", 90 | min:0, 91 | max:10000, 92 | step:1000 93 | }},' 94 | fi 95 | fi` 96 | `if [ -f "/sys/module/msm_kgsl_core/parameters/up_threshold" ] || [ -f "/sys/module/msm_kgsl_core/parameters/down_threshold" ] || [ -f "/sys/module/msm_kgsl_core/parameters/sample_time_ms" ]; then 97 | $BB echo '{ SPane:{ 98 | title:"Interactive Governor Tunables" 99 | }},' 100 | if [ -f "/sys/module/msm_kgsl_core/parameters/down_threshold" ]; then 101 | DT=\`$BB cat /sys/module/msm_kgsl_core/parameters/down_threshold\` 102 | $BB echo '{ SSeekBar:{ 103 | title:"Down Threshold", 104 | description:"When the GPU load is lower than this level, it ramps down the frequency one level.", 105 | default:'$DT', 106 | action:"generic /sys/module/msm_kgsl_core/parameters/down_threshold", 107 | min:0, 108 | max:100, 109 | step:1 110 | }},' 111 | fi 112 | if [ -f "/sys/module/msm_kgsl_core/parameters/up_threshold" ]; then 113 | UT=\`$BB cat /sys/module/msm_kgsl_core/parameters/up_threshold\` 114 | $BB echo '{ SSeekBar:{ 115 | title:"Up Threshold", 116 | description:"When the GPU load is above this level, it ramps up the frequency one level.", 117 | default:'$UT', 118 | action:"generic /sys/module/msm_kgsl_core/parameters/up_threshold", 119 | min:0, 120 | max:100, 121 | step:1 122 | }},' 123 | fi 124 | if [ -f "/sys/module/msm_kgsl_core/parameters/sample_time_ms" ]; then 125 | ST=\`$BB cat /sys/module/msm_kgsl_core/parameters/sample_time_ms\` 126 | $BB echo '{ SSeekBar:{ 127 | title:"Sample Time", 128 | description:"Sample time to ramp up or down GPU.", 129 | unit:" ms", 130 | default:'$ST', 131 | action:"generic /sys/module/msm_kgsl_core/parameters/sample_time_ms", 132 | min:0, 133 | max:1000, 134 | step:10 135 | }},' 136 | fi 137 | fi` 138 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table" ]; then 139 | $BB echo '{ SPane:{ 140 | title:"GPU Voltages" 141 | }},' 142 | while read UVOLT UNIT; do 143 | VOLTAGE=$(($VOLTAGE+1)); 144 | $BB echo '{ SSeekBar:{ 145 | default:'$UVOLT', 146 | title:"Voltage '${VOLTAGE}'", 147 | action:"voltage gpuvolt '${VOLTAGE}'", 148 | unit:"' ${UNIT}'",' 149 | if [ "$UVOLT" -ge "900000" ]; then 150 | $BB echo 'min:900000, max:1200000, step:5000 }},' 151 | else 152 | $BB echo 'min:900, max:1200, step:5 }},' 153 | fi; 154 | done < /sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table 155 | fi` 156 | `if [ -f "/sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost" -o -f "/sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost" -o -f "/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/adrenoboost" -o -f "/sys/class/kgsl/kgsl-3d0/devfreq/adrenoboost" ]; then 157 | $BB echo '{ SPane:{ 158 | title:"Adrenoboost" 159 | }},' 160 | if [ -f "/sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost" ]; then 161 | ADB=\`$BB cat /sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost\` 162 | $BB echo '{ SOptionList:{ 163 | description:"Gpu scaling driver .", 164 | default:'$ADB', 165 | action:"generic /sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost", 166 | values:{ 167 | 0:"Off", 1:"Low",2:"Medium", 3:"Agressive", 168 | } 169 | }},' 170 | fi 171 | if [ -f "/sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost" ]; then 172 | ADB=\`$BB cat /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost\` 173 | $BB echo '{ SOptionList:{ 174 | description:"Gpu scaling driver .", 175 | default:'$ADB', 176 | action:"generic /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/adrenoboost", 177 | values:{ 178 | 0:"Off", 1:"Low",2:"Medium", 3:"Agressive", 179 | } 180 | }},' 181 | fi 182 | if [ -f "/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/adrenoboost" ]; then 183 | ADB=\`$BB cat /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/adrenoboost\` 184 | $BB echo '{ SOptionList:{ 185 | description:"Gpu scaling driver .", 186 | default:'$ADB', 187 | action:"generic /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/adrenoboost", 188 | values:{ 189 | 0:"Off", 1:"Low",2:"Medium", 3:"Agressive", 190 | } 191 | }},' 192 | fi 193 | if [ -f "/sys/class/kgsl/kgsl-3d0/devfreq/adrenoboost" ]; then 194 | ADB=\`$BB cat /sys/class/kgsl/kgsl-3d0/devfreq/adrenoboost\` 195 | $BB echo '{ SOptionList:{ 196 | description:"Gpu scaling driver .", 197 | default:'$ADB', 198 | action:"generic /sys/class/kgsl/kgsl-3d0/devfreq/adrenoboost", 199 | values:{ 200 | 0:"Off", 1:"Low",2:"Medium", 3:"Agressive", 201 | } 202 | }},' 203 | fi 204 | fi` 205 | `if [ -f "/sys/module/adreno_idler/parameters/adreno_idler_active" ]; then 206 | IDLER=\`bool /sys/module/adreno_idler/parameters/adreno_idler_active\` 207 | IDLELOC=/sys/module/adreno_idler/parameters; 208 | $BB echo '{ SPane:{ 209 | title:"Adreno_Idler Tunables" 210 | }}, 211 | { SCheckBox:{ 212 | label:"Enable", 213 | description:"An add-on for MSM Adreno TZ GPU Governor. Developed by arter97.", 214 | default:'$IDLER', 215 | action:"boolean /sys/module/adreno_idler/parameters/adreno_idler_active" 216 | }}, 217 | { SSpacer:{ 218 | height: 1 219 | }},' 220 | $BB echo '{ SGeneric:{ 221 | title:"Down Differential", 222 | description:"Decrease this value to idle faster. Increase this value to idle slower. ", 223 | default:'cat $IDLELOC/adreno_idler_downdifferential', 224 | action:"adreno_idler '$IDLELOC'/adreno_idler_downdifferential" 225 | }},' 226 | $BB echo '{ SGeneric:{ 227 | title:"Idle Wait", 228 | description:"Time to wait for entering idle, measured in milliseconds. This implementation is to prevent micro-lags on scrolling or playing games, meaning the lower it gets, the slower & low-power it would get.", 229 | default:'cat $IDLELOC/adreno_idler_idlewait', 230 | action:"adreno_idler '$IDLELOC'/adreno_idler_idlewait" 231 | }},' 232 | $BB echo '{ SGeneric:{ 233 | title:"Idle Workload", 234 | description:"Any workload higher than this will be treated as non-idle workload, meaning the higher it gets, the slower & low-power it would get.", 235 | default:'cat $IDLELOC/adreno_idler_idleworkload', 236 | action:"adreno_idler '$IDLELOC'/adreno_idler_idleworkload" 237 | }}, 238 | { SSpacer:{ 239 | height: 1 240 | }},' 241 | fi` 242 | ] 243 | } 244 | CTAG 245 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.info: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:INFO, 4 | elements:[ 5 | { SPane:{ 6 | title:{ 7 | en:"General", 8 | es:"General" 9 | }, 10 | }}, 11 | { SDescription:{ 12 | description:"Welcome to the Universal Kernel Manager." 13 | }}, 14 | { SDescription:{ 15 | description:"Created by apb_axel." 16 | }}, 17 | { SDescription:{ 18 | description:"Modified by yarpiin." 19 | }}, 20 | { SDescription:{ 21 | description:"Version 3.8.2 - Unified" 22 | }}, 23 | { SDescription:{ 24 | description:"XDA Link: HERE" 25 | }}, 26 | { SDescription:{ 27 | description:"UKM Download: HERE" 28 | }}, 29 | { SPane:{ 30 | title:"Special thanks to" 31 | }}, 32 | { SDescription:{ 33 | description:"> ak" 34 | }}, 35 | { SDescription:{ 36 | description:"> AndreiLux" 37 | }}, 38 | { SDescription:{ 39 | description:"> osm0sis" 40 | }}, 41 | { SDescription:{ 42 | description:"> eng.stk" 43 | }}, 44 | { SPane:{ 45 | title:{ 46 | en:"Device", 47 | es:"Dispositivo" 48 | }, 49 | description:"`getprop ro.product.model` (`getprop ro.product.device`)" 50 | }}, 51 | { SPane:{ 52 | title:{ 53 | en:"Android Version", 54 | es:"Versión de Android" 55 | }, 56 | description:"`getprop ro.build.version.release`" 57 | }}, 58 | { SPane:{ 59 | title:{ 60 | en:"Kernel Version", 61 | es:"Versión del Núcleo" 62 | }, 63 | description:"`$BB cat /proc/version`" 64 | }}, 65 | { SPane:{ 66 | title:{ 67 | en:"ROM Description", 68 | es:"Descripción del ROM" 69 | }, 70 | description:"`getprop ro.build.host | $BB awk '{print toupper($0)}'`" 71 | }}, 72 | { SPane:{ 73 | title:{ 74 | en:"ROM Version", 75 | es:"Versión del ROM" 76 | }, 77 | description:"`MODVER=\`getprop ro.modversion\`; 78 | if [ -n $MODVER ]; then 79 | $BB echo $MODVER; 80 | else 81 | $BB echo \`getprop ro.build.version.incremental\`; 82 | fi;`" 83 | }}, 84 | { SPane:{ 85 | title:{ 86 | en:"Build Date", 87 | es:"Fecha del ROM" 88 | }, 89 | description:"`getprop ro.build.date`" 90 | }}, 91 | { STitleBar:{ 92 | title:"Donate" 93 | }}, 94 | { SButton:{ 95 | label:"If you like my work buy me a beer :)", 96 | action:"url donate" 97 | }} 98 | ] 99 | } 100 | CTAG 101 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.io: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:I/O, 4 | elements:[ 5 | { STitleBar:{ 6 | title:"I/O Control" 7 | }}, 8 | { SSeekBar:{ 9 | title:"Read-ahead Size", 10 | description:"Set the read-ahead size for the internal storage.", 11 | unit:" KB", 12 | step:128, 13 | min:128, 14 | max:4096, 15 | default:`$BB cat /sys/block/mmcblk0/queue/read_ahead_kb`, 16 | action:"ioset queue read_ahead_kb" 17 | }}, 18 | { SOptionList:{ 19 | title:"I/O Scheduler", 20 | description:"The I/O Scheduler decides how to prioritize and handle I/O requests. More info: HERE", 21 | default:`$BB echo $($UKM/actions/bracket-option \`sh $DEVICE DirIOScheduler\`)`, 22 | action:"ioset scheduler", 23 | values:[ 24 | `sh $DEVICE IOSchedulerList` 25 | ], 26 | notify:[ 27 | { 28 | on:APPLY, 29 | do:[ REFRESH, CANCEL ], 30 | to:"`sh $DEVICE DirIOSchedulerTree`" 31 | }, 32 | { 33 | on:REFRESH, 34 | do:REFRESH, 35 | to:"`sh $DEVICE DirIOSchedulerTree`" 36 | } 37 | ] 38 | }}, 39 | `if [ -f "/sys/module/mmc_core/parameters/use_spi_crc" ]; then 40 | CRCS=\`bool /sys/module/mmc_core/parameters/use_spi_crc\` 41 | $BB echo '{ SPane:{ 42 | title:"Software CRC control" 43 | }}, 44 | { SCheckBox:{ 45 | label:"Software CRC control", 46 | description:"Enabling software CRCs on the data blocks can be a significant (30%) performance cost. So we allow it to be disabled.", 47 | default:'$CRCS', 48 | action:"boolean /sys/module/mmc_core/parameters/use_spi_crc" 49 | }},' 50 | fi` 51 | { SPane:{ 52 | title:"General I/O Tunables", 53 | description:"Set the internal storage general tunables" 54 | }}, 55 | { SCheckBox:{ 56 | description:"Draw entropy from spinning (rotational) storage.", 57 | label:"Add Random", 58 | default:`$BB cat /sys/block/mmcblk0/queue/add_random`, 59 | action:"ioset queue add_random" 60 | }}, 61 | { SCheckBox:{ 62 | description:"Maintain I/O statistics for this storage device. Disabling will break I/O monitoring apps.", 63 | label:"I/O Stats", 64 | default:`$BB cat /sys/block/mmcblk0/queue/iostats`, 65 | action:"ioset queue iostats" 66 | }}, 67 | { SCheckBox:{ 68 | description:"Treat device as rotational storage.", 69 | label:"Rotational", 70 | default:`$BB cat /sys/block/mmcblk0/queue/rotational`, 71 | action:"ioset queue rotational" 72 | }}, 73 | { SOptionList:{ 74 | title:"No Merges", 75 | description:"Types of merges (prioritization) the scheduler queue for this storage device allows.", 76 | default:`$BB cat /sys/block/mmcblk0/queue/nomerges`, 77 | action:"ioset queue nomerges", 78 | values:{ 79 | 0:"All", 1:"Simple Only", 2:"None" 80 | } 81 | }}, 82 | { SOptionList:{ 83 | title:"RQ Affinity", 84 | description:"Try to have scheduler requests complete on the CPU core they were made from. Higher is more aggressive. Some kernels only support 0-1.", 85 | default:`$BB cat /sys/block/mmcblk0/queue/rq_affinity`, 86 | action:"ioset queue rq_affinity", 87 | values:{ 88 | 0:"Disabled", 1:"Enabled", 2:"Aggressive" 89 | } 90 | }}, 91 | { SSeekBar:{ 92 | title:"NR Requests", 93 | description:"Maximum number of read (or write) requests that can be queued to the scheduler in the block layer.", 94 | step:128, 95 | min:128, 96 | max:2048, 97 | default:`$BB cat /sys/block/mmcblk0/queue/nr_requests`, 98 | action:"ioset queue nr_requests" 99 | }}, 100 | { SPane:{ 101 | title:"I/O Scheduler Tunables" 102 | }}, 103 | { STreeDescriptor:{ 104 | path:"`sh $DEVICE DirIOSchedulerTree`", 105 | generic: { 106 | directory: {}, 107 | element: { 108 | SGeneric: { title:"@BASENAME" } 109 | } 110 | }, 111 | exclude: [ "weights" ] 112 | }}, 113 | ] 114 | } 115 | CTAG 116 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.kryo.io: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:I/O, 4 | elements:[ 5 | { STitleBar:{ 6 | title:"I/O Control" 7 | }}, 8 | { SSeekBar:{ 9 | title:"Read-ahead Size", 10 | description:"Set the read-ahead size for the internal storage.", 11 | unit:" KB", 12 | step:128, 13 | min:128, 14 | max:4096, 15 | default:`$BB cat /sys/block/sda/queue/read_ahead_kb`, 16 | action:"iosetkryo queue read_ahead_kb" 17 | }}, 18 | { SOptionList:{ 19 | title:"I/O Scheduler", 20 | description:"The I/O Scheduler decides how to prioritize and handle I/O requests. More info: HERE", 21 | default:`$BB echo $($UKM/actions/bracket-option \`sh $DEVICE DirKRYOIOScheduler\`)`, 22 | action:"iosetkryo scheduler", 23 | values:[ 24 | `sh $DEVICE KRYOIOSchedulerList` 25 | ], 26 | notify:[ 27 | { 28 | on:APPLY, 29 | do:[ REFRESH, CANCEL ], 30 | to:"`sh $DEVICE DirKRYOIOSchedulerTree`" 31 | }, 32 | { 33 | on:REFRESH, 34 | do:REFRESH, 35 | to:"`sh $DEVICE DirKRYOIOSchedulerTree`" 36 | } 37 | ] 38 | }}, 39 | `if [ -f "/sys/module/mmc_core/parameters/use_spi_crc" ]; then 40 | CRCS=\`bool /sys/module/mmc_core/parameters/use_spi_crc\` 41 | $BB echo '{ SPane:{ 42 | title:"Software CRC control" 43 | }}, 44 | { SCheckBox:{ 45 | label:"Software CRC control", 46 | description:"Enabling software CRCs on the data blocks can be a significant (30%) performance cost. So we allow it to be disabled.", 47 | default:'$CRCS', 48 | action:"boolean /sys/module/mmc_core/parameters/use_spi_crc" 49 | }},' 50 | fi` 51 | `if [ -f "/sys/devices/soc.0/f9824900.sdhci/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load" ]; then 52 | MMCC=\`$BB cat /sys/devices/soc.0/f9824900.sdhci/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load\` 53 | $BB echo '{ SPane:{ 54 | title:"Memory Card Clock Scaling Control" 55 | }}, 56 | { SCheckBox:{ 57 | label:"MMC Clock Scaling Control", 58 | description:"Optimize clock scaling during write requests. The default value for it is 0. In case we want to gain performance over power they should set it to 1.", 59 | default:'$MMCC', 60 | action:"generic /sys/devices/soc.0/f9824900.sdhci/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load" 61 | }},' 62 | fi` 63 | { SPane:{ 64 | title:"General I/O Tunables", 65 | description:"Set the internal storage general tunables" 66 | }}, 67 | { SCheckBox:{ 68 | description:"Draw entropy from spinning (rotational) storage.", 69 | label:"Add Random", 70 | default:`$BB cat /sys/block/sda/queue/add_random`, 71 | action:"iosetkryo queue add_random" 72 | }}, 73 | { SCheckBox:{ 74 | description:"Maintain I/O statistics for this storage device. Disabling will break I/O monitoring apps.", 75 | label:"I/O Stats", 76 | default:`$BB cat /sys/block/sda/queue/iostats`, 77 | action:"iosetkryo queue iostats" 78 | }}, 79 | { SCheckBox:{ 80 | description:"Treat device as rotational storage.", 81 | label:"Rotational", 82 | default:`$BB cat /sys/block/sda/queue/rotational`, 83 | action:"iosetkryo queue rotational" 84 | }}, 85 | { SOptionList:{ 86 | title:"No Merges", 87 | description:"Types of merges (prioritization) the scheduler queue for this storage device allows.", 88 | default:`$BB cat /sys/block/sda/queue/nomerges`, 89 | action:"iosetkryo queue nomerges", 90 | values:{ 91 | 0:"All", 1:"Simple Only", 2:"None" 92 | } 93 | }}, 94 | { SOptionList:{ 95 | title:"RQ Affinity", 96 | description:"Try to have scheduler requests complete on the CPU core they were made from. Higher is more aggressive. Some kernels only support 0-1.", 97 | default:`$BB cat /sys/block/sda/queue/rq_affinity`, 98 | action:"iosetkryo queue rq_affinity", 99 | values:{ 100 | 0:"Disabled", 1:"Enabled", 2:"Aggressive" 101 | } 102 | }}, 103 | { SSeekBar:{ 104 | title:"NR Requests", 105 | description:"Maximum number of read (or write) requests that can be queued to the scheduler in the block layer.", 106 | step:128, 107 | min:128, 108 | max:2048, 109 | default:`$BB cat /sys/block/sda/queue/nr_requests`, 110 | action:"iosetkryo queue nr_requests" 111 | }}, 112 | { SPane:{ 113 | title:"I/O Scheduler Tunables" 114 | }}, 115 | { STreeDescriptor:{ 116 | path:"`sh $DEVICE DirKRYOIOSchedulerTree`", 117 | generic: { 118 | directory: {}, 119 | element: { 120 | SGeneric: { title:"@BASENAME" } 121 | } 122 | }, 123 | exclude: [ "weights" ] 124 | }}, 125 | ] 126 | } 127 | CTAG 128 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.kryo1: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:KRYO 1.6, 4 | elements:[ 5 | { SLiveLabel:{ 6 | refresh:0, 7 | style:italic, 8 | action:"live KRYO1" 9 | }}, 10 | { SPane:{ 11 | title:"Live Cpu Frequency:" 12 | }}, 13 | { SLiveLabel:{ 14 | refresh:800, 15 | style:italic, 16 | action:"live KRYO1Frequency" 17 | }}, 18 | { STitleBar:{ 19 | title:"CPU Frequency Scaling" 20 | }}, 21 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 22 | $BB echo '{ SSpacer:{ 23 | height: 1 24 | }},' 25 | $BB echo '{ SSeekBar:{ 26 | title:"Kryo 1.6 Min Scaling Frequency", 27 | description:"Set the minimum frequency the CPU scales down to.", 28 | default:'\`sh $DEVICE DefaultKRYO1MinFrequency\`', 29 | action:"cpuset '\`sh $DEVICE DirKRYO1MinFrequency\`'", 30 | values:{' 31 | sh $DEVICE KRYO1FrequencyList 32 | $BB echo }' 33 | }},' 34 | $BB echo '{ SSeekBar:{ 35 | title:"Kryo 1.6 Max Scaling Frequency", 36 | description:"Set the maximum frequency the CPU scales up to.", 37 | default:'\`sh $DEVICE DefaultKRYO1MaxFrequency\`', 38 | action:"cpuset '\`sh $DEVICE DirKRYO1MaxFrequency\`'", 39 | values:{' 40 | sh $DEVICE KRYO1FrequencyList 41 | $BB echo }' 42 | }},' 43 | fi` 44 | { SSpacer:{ 45 | height: 1 46 | }}, 47 | { SPane:{ 48 | title:"CPU Governor Tunables", 49 | }}, 50 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 51 | $BB echo '{ SSpacer:{ 52 | height: 1 53 | }}, 54 | { SLiveLabel:{ 55 | refresh:0, 56 | style:italic, 57 | action:"live KRYO1" 58 | }}, 59 | { SSpacer:{ 60 | height: 1 61 | }}, 62 | { SOptionList:{ 63 | default:'\`sh $DEVICE DefaultKRYO1Governor\`', 64 | action:"cpuset '\`sh $DEVICE DirKRYO1Governor\`'", 65 | values:[' 66 | sh $DEVICE KRYO1GovernorList 67 | $BB echo '], 68 | notify:[ 69 | { 70 | on:APPLY, 71 | do:[ REFRESH, CANCEL ], 72 | to:"'\`sh $DEVICE DirCPUGovernorTreeKyro1\`'" 73 | } 74 | { 75 | on:REFRESH, 76 | do:REFRESH, 77 | to:"'\`sh $DEVICE DirCPUGovernorTreeKyro1\`'" 78 | } 79 | { 80 | on:REFRESH, 81 | do:REFRESH, 82 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 83 | } 84 | ] 85 | }},' 86 | fi` 87 | { SSpacer:{ 88 | height: 2 89 | }}, 90 | { STreeDescriptor:{ 91 | path:"`sh $DEVICE DirCPUGovernorTreeKyro1`", 92 | generic: { 93 | directory: { 94 | STreeDescriptor:{ 95 | generic: { 96 | directory: {}, 97 | element: { 98 | SGeneric: { title:"@BASENAME" } 99 | } 100 | }, 101 | exclude: [ 102 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 103 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 104 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 105 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 106 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 107 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 108 | ] 109 | }, 110 | } 111 | }, 112 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 113 | }}, 114 | { SSpacer:{ 115 | height: 1 116 | }}, 117 | { STreeDescriptor:{ 118 | path:"`sh $DEVICE DirCPUGovernorTree`", 119 | generic: { 120 | directory: { 121 | STreeDescriptor:{ 122 | generic: { 123 | directory: {}, 124 | element: { 125 | SGeneric: { title:"@BASENAME" } 126 | } 127 | }, 128 | exclude: [ 129 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 130 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 131 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 132 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 133 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 134 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 135 | ] 136 | }, 137 | } 138 | }, 139 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 140 | }}, 141 | { SSpacer:{ 142 | height: 1 143 | }}, 144 | ] 145 | } 146 | CTAG 147 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.kryo2: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:KRYO 2.2, 4 | elements:[ 5 | { SLiveLabel:{ 6 | refresh:0, 7 | style:italic, 8 | action:"live KRYO2" 9 | }}, 10 | { SPane:{ 11 | title:"Live Cpu Frequency:" 12 | }}, 13 | { SLiveLabel:{ 14 | refresh:800, 15 | style:italic, 16 | action:"live KRYO2Frequency" 17 | }}, 18 | { STitleBar:{ 19 | title:"CPU Frequency Scaling" 20 | }}, 21 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 22 | $BB echo '{ SSpacer:{ 23 | height: 1 24 | }},' 25 | $BB echo '{ SSeekBar:{ 26 | title:"Kryo 2.2 Min Scaling Frequency", 27 | description:"Set the minimum frequency the CPU scales down to.", 28 | default:'\`sh $DEVICE DefaultKRYO2MinFrequency\`', 29 | action:"cpuset '\`sh $DEVICE DirKRYO2MinFrequency\`'", 30 | values:{' 31 | sh $DEVICE KRYO2FrequencyList 32 | $BB echo }' 33 | }},' 34 | $BB echo '{ SSeekBar:{ 35 | title:"Kryo 2.2 Max Scaling Frequency", 36 | description:"Set the maximum frequency the CPU scales up to.", 37 | default:'\`sh $DEVICE DefaultKRYO2MaxFrequency\`', 38 | action:"cpuset '\`sh $DEVICE DirKRYO2MaxFrequency\`'", 39 | values:{' 40 | sh $DEVICE KRYO2FrequencyList 41 | $BB echo }' 42 | }},' 43 | fi` 44 | { SSpacer:{ 45 | height: 1 46 | }}, 47 | { SPane:{ 48 | title:"CPU Governor Tunables", 49 | }}, 50 | `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" ]; then 51 | $BB echo '{ SSpacer:{ 52 | height: 1 53 | }}, 54 | { SLiveLabel:{ 55 | refresh:0, 56 | style:italic, 57 | action:"live KRYO2" 58 | }}, 59 | { SSpacer:{ 60 | height: 1 61 | }}, 62 | { SOptionList:{ 63 | default:'\`sh $DEVICE DefaultKRYO2Governor\`', 64 | action:"cpuset '\`sh $DEVICE DirKRYO2Governor\`'", 65 | values:[' 66 | sh $DEVICE KRYO2GovernorList 67 | $BB echo '], 68 | notify:[ 69 | { 70 | on:APPLY, 71 | do:[ REFRESH, CANCEL ], 72 | to:"'\`sh $DEVICE DirCPUGovernorTreeKyro2\`'" 73 | }, 74 | { 75 | on:APPLY, 76 | do:[ REFRESH, CANCEL ], 77 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 78 | }, 79 | { 80 | on:REFRESH, 81 | do:REFRESH, 82 | to:"'\`sh $DEVICE DirCPUGovernorTreeKyro2\`'" 83 | }, 84 | { 85 | on:REFRESH, 86 | do:REFRESH, 87 | to:"'\`sh $DEVICE DirCPUGovernorTree\`'" 88 | } 89 | ] 90 | }},' 91 | fi` 92 | { SSpacer:{ 93 | height: 2 94 | }}, 95 | { STreeDescriptor:{ 96 | path:"`sh $DEVICE DirCPUGovernorTreeKyro2`", 97 | generic: { 98 | directory: { 99 | STreeDescriptor:{ 100 | generic: { 101 | directory: {}, 102 | element: { 103 | SGeneric: { title:"@BASENAME" } 104 | } 105 | }, 106 | exclude: [ 107 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 108 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 109 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 110 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 111 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 112 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 113 | ] 114 | }, 115 | } 116 | }, 117 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 118 | }}, 119 | { SSpacer:{ 120 | height: 1 121 | }}, 122 | { STreeDescriptor:{ 123 | path:"`sh $DEVICE DirCPUGovernorTree`", 124 | generic: { 125 | directory: { 126 | STreeDescriptor:{ 127 | generic: { 128 | directory: {}, 129 | element: { 130 | SGeneric: { title:"@BASENAME" } 131 | } 132 | }, 133 | exclude: [ 134 | "boost_duration", "boostpulse", "cpu_utilization", "multi_phase_freq_tbl", "profile", 135 | "up_threshold_h", "up_threshold_l", "version_profiles", "sampling_rate_current", "freq_limit", 136 | "music_state", "inputboost_punch_cycles", "inputboost_punch_freq", "inputboost_punch_on_epenmove", 137 | "inputboost_punch_on_fingerdown", "inputboost_punch_on_fingermove", "auto_adjust_freq_thresholds", 138 | "version", "early_demand", "fast_scaling_up", "fast_scaling_down", "fast_scaling_sleep_up", "fast_scaling_sleep_down" 139 | "scaling_up_block_freq", "scaling_block_freq", "inputboost_typingbooster_cores", "music_max_freq", "music_min_freq" 140 | ] 141 | }, 142 | } 143 | }, 144 | exclude: [ "all_cpus", "kset", "overall_stats", "stats", "vdd_table" ] 145 | }}, 146 | { SSpacer:{ 147 | height: 1 148 | }}, 149 | ] 150 | } 151 | CTAG 152 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.mem: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:MEMORY, 4 | elements:[ 5 | `if [ -f "/sys/devices/virtual/block/zram0/disksize" ]; then 6 | ZRAM=\`$BB cat /sys/devices/virtual/block/zram0/disksize\`; 7 | ZRAM=$((ZRAM / 1024 / 1024)); 8 | $BB echo '{ SPane:{ 9 | title:"Z-RAM", 10 | description:"Attempts to increase performance by avoiding paging on physical storage, instead using a compressed virtual device in RAM. Paging takes place in RAM until it is necessary to use the swap space on physical storage." 11 | }}, 12 | { SSeekBar:{ 13 | unit:" MB", 14 | step:1, 15 | min:0, 16 | max:1024, 17 | default:'$ZRAM', 18 | action:"zram /sys/devices/virtual/block/zram0/disksize" 19 | }},' 20 | fi` 21 | `if [ -f "/sys/block/zram0/comp_algorithm" ]; then 22 | CA=\`$BB echo $($UKM/actions/bracket-option /sys/block/zram0/comp_algorithm)\`; 23 | $BB echo '{ SOptionList:{ 24 | title:"Compression Algorithm", 25 | description:"Applying a different option will reset Z-RAM. LZ4 algorithm tends to have a faster decompression. More info: HERE.", 26 | default:'$CA', 27 | action:"bracket-option /sys/block/zram0/comp_algorithm", 28 | values:[' 29 | for COMPALG in \`$BB cat /sys/block/zram0/comp_algorithm | $BB sed -e "s/\]//;s/\[//"\`; do 30 | echo "\"$COMPALG\","; 31 | done; 32 | $BB echo '], 33 | notify:[ 34 | { 35 | on:APPLY, 36 | do:[ RESET, REFRESH, APPLY ], 37 | to:"zram /sys/devices/virtual/block/zram0/disksize" 38 | } 39 | ] 40 | }},' 41 | fi` 42 | `if [ -f "/sys/block/zram0/max_comp_streams" ]; then 43 | MCS=\`$BB cat /sys/block/zram0/max_comp_streams\`; 44 | $BB echo '{ SSeekBar:{ 45 | title:"Max Compression Streams", 46 | description:"Applying a different option will reset Z-RAM. Can have N write operations (depending on size of streams list) executing in parallel.", 47 | min:1, 48 | max:5, 49 | step:1, 50 | default:'$MCS', 51 | action:"generic /sys/block/zram0/max_comp_streams", 52 | notify:[ 53 | { 54 | on:APPLY, 55 | do:[ RESET, REFRESH, APPLY ], 56 | to:"zram /sys/devices/virtual/block/zram0/disksize" 57 | } 58 | ] 59 | }},' 60 | fi` 61 | { SPane:{ 62 | title:"Virtual Memory", 63 | description:"Tune the operation of the VM subsystem of the Linux kernel and the writeout of dirty data to disk. Swappiness also affects Z-RAM operation on kernels which support swaps." 64 | }}, 65 | { SSeekBar:{ 66 | title:"Dirty Background Ratio", 67 | description:"Contains, as a % of total system memory, the number of pages at which the pdflush background writeback daemon will start writing out dirty data.", 68 | unit:"%", 69 | step:1, 70 | min:0, 71 | max:100, 72 | default:`$BB cat /proc/sys/vm/dirty_background_ratio`, 73 | action:"generic /proc/sys/vm/dirty_background_ratio" 74 | }}, 75 | { SSeekBar:{ 76 | title:"Dirty Ratio", 77 | description:"Contains, as a % of total system memory, the number of pages at which a process which is generating disk writes will itself start writing out dirty data. Lower the amount of unwritten write cache to reduce lags when a huge write is required.", 78 | unit:"%", 79 | step:1, 80 | min:0, 81 | max:100, 82 | default:`$BB cat /proc/sys/vm/dirty_ratio`, 83 | action:"generic /proc/sys/vm/dirty_ratio" 84 | }}, 85 | { SSeekBar:{ 86 | title:"Dirty Expire Centisecs", 87 | description:"This tunable is used to define when dirty data is old enough to be eligible for writeout by the kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.", 88 | unit:"cs", 89 | step:10, 90 | min:10, 91 | max:5000, 92 | default:`$BB cat /proc/sys/vm/dirty_expire_centisecs`, 93 | action:"generic /proc/sys/vm/dirty_expire_centisecs" 94 | }}, 95 | { SSeekBar:{ 96 | title:"Dirty Writeback Centisecs", 97 | description:"The kernel flusher threads will periodically wake up and write old data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second. Setting this to zero disables periodic writeback altogether.", 98 | unit:"cs", 99 | step:100, 100 | min:0, 101 | max:9000, 102 | default:`$BB cat /proc/sys/vm/dirty_writeback_centisecs`, 103 | action:"generic /proc/sys/vm/dirty_writeback_centisecs" 104 | }}, 105 | { SOptionList:{ 106 | title:"Drop Caches (Clear VFS Cache After Boot)", 107 | description:"This option will force rebuild of file system cache based on actual app usage rather than boot/startup processes. NOTE: This process can take from 1-2 minutes (Enable for better file system read/write performance).", 108 | default:0, 109 | action:"dropcaches $UKM/files/dropcaches_prof", 110 | values:{ 0:"Disabled", 1:"Enabled" 111 | } 112 | }}, 113 | `if [ -f "/proc/sys/vm/extra_free_kbytes" ]; then 114 | $BB echo '{ SSeekBar:{ 115 | title:"Extra Free Kilobytes", 116 | unit:" kB", 117 | step:50, 118 | min:0, 119 | max:30000, 120 | default:'\`$BB cat /proc/sys/vm/extra_free_kbytes\`', 121 | action:"generic /proc/sys/vm/extra_free_kbytes" 122 | }},' 123 | fi` 124 | { SOptionList:{ 125 | title:"Laptop Mode (Auto FS Writeback Delay Mode)", 126 | description:"This option will delay the writebacks of file system bits cached in RAM while screen is ON (Enable for better performance @ slight risk of possible data loss if crashed or sudden loss of power).", 127 | default:`$BB cat /proc/sys/vm/laptop_mode`, 128 | action:"generic /proc/sys/vm/laptop_mode", 129 | values:{ 0:"Disabled", 1:"Enabled" 130 | } 131 | }}, 132 | { SSeekBar:{ 133 | title:"Swappiness", 134 | description:"Controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.", 135 | unit:"%", 136 | step:1, 137 | min:0, 138 | max:100, 139 | default:`$BB cat /proc/sys/vm/swappiness`, 140 | action:"generic /proc/sys/vm/swappiness" 141 | }}, 142 | { SSeekBar:{ 143 | title:"VFS Cache Pressure", 144 | description:"Controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects. Lower = prefer to retain dentry and inode cache, higher = prefer to reclaim dentry and inodes cache.", 145 | unit:"%", 146 | step:1, 147 | min:0, 148 | max:150, 149 | default:`$BB cat /proc/sys/vm/vfs_cache_pressure`, 150 | action:"generic /proc/sys/vm/vfs_cache_pressure" 151 | }}, 152 | ] 153 | } 154 | CTAG 155 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.misc: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:MISC, 4 | elements:[ 5 | `if [ -d "/sys/kernel/charge_levels/" ]; then 6 | if [ -f "/sys/kernel/charge_levels/charge_info" ]; then 7 | $BB echo '{ SPane:{ 8 | title:"Charge Levels Interface:" 9 | }}, 10 | { SLiveLabel:{ 11 | refresh:5000, 12 | style:italic, 13 | action:"live ChargeCurrent" 14 | }},' 15 | fi 16 | if [ -f "/sys/kernel/charge_levels/charge_level_ac" ]; then 17 | ACCL=\`$BB cat /sys/kernel/charge_levels/charge_level_ac\` 18 | $BB echo '{ SSeekBar:{ 19 | title:"AC Charge Level", 20 | description:"Set MAX mA allowed while charging via AC (0 = stock charging logic).", 21 | unit:" mA", 22 | min:0, 23 | max:2000, 24 | step:100, 25 | default:'$ACCL', 26 | action:"generic /sys/kernel/charge_levels/charge_level_ac" 27 | }},' 28 | fi 29 | if [ -f "/sys/kernel/charge_levels/charge_level_usb" ]; then 30 | USBCL=\`$BB cat /sys/kernel/charge_levels/charge_level_usb\` 31 | $BB echo '{ SSeekBar:{ 32 | title:"USB Charge Level", 33 | description:"Set MAX mA allowed while charging via USB (0 = stock charging logic).", 34 | unit:" mA", 35 | min:0, 36 | max:1600, 37 | step:100, 38 | default:'$USBCL', 39 | action:"generic /sys/kernel/charge_levels/charge_level_usb" 40 | }},' 41 | fi 42 | fi` 43 | `if [ -f "/sys/module/state_notifier/parameters/enabled" ] || [ -f "/sys/module/state_notifier/parameters/debug_mask" ]; then 44 | $BB echo '{ SPane:{ 45 | title:"State Notifier" 46 | }}, 47 | { SSpacer:{ 48 | height: 1 49 | }}, 50 | { SLiveLabel:{ 51 | refresh:0, 52 | style:italic, 53 | action:"live StateNotifier" 54 | }},' 55 | if [ -f "/sys/module/state_notifier/parameters/enabled" ]; then 56 | MHH=\`bool /sys/module/state_notifier/parameters/enabled\`; 57 | $BB echo '{ SCheckBox:{ 58 | label:"Enable", 59 | description:"Enable/Disable State Notifier.", 60 | default:'$MHH', 61 | action:"boolean /sys/module/state_notifier/parameters/enabled" 62 | }},' 63 | fi 64 | if [ -f "/sys/module/state_notifier/parameters/debug_mask" ]; then 65 | DEBUGSN=\`$BB cat /sys/module/state_notifier/parameters/debug_mask\` 66 | $BB echo '{ SCheckBox:{ 67 | label:"Debug Mask", 68 | description:"Allows you to activate debug related to driver operations.", 69 | default:'$DEBUGSN', 70 | action:"generic /sys/module/state_notifier/parameters/debug_mask" 71 | }},' 72 | fi 73 | $BB echo '{ SSpacer:{ 74 | height: 1 75 | }},' 76 | if [ -f "/sys/module/state_notifier/parameters/suspend_defer_time" ]; then 77 | SDTSN=\`$BB cat /sys/module/state_notifier/parameters/suspend_defer_time\`; 78 | $BB echo '{ SSeekBar:{ 79 | title:"Suspend Defer Time", 80 | description:"Allows suspend routines wait a number of seconds to prevent false short suspend calls.", 81 | min:0, 82 | max:360, 83 | step:1, 84 | unit:" s", 85 | default:'$SDTSN', 86 | action:"generic /sys/module/state_notifier/parameters/suspend_defer_time" 87 | }},' 88 | fi 89 | fi` 90 | { STitleBar:{ 91 | title:"TCP Congestion Control" 92 | }}, 93 | { SOptionList:{ 94 | description:"Set the algorithm of internet congestion avoidance, to possibly improve speeds and load times. More info: HERE", 95 | default:`$BB cat \`sh $DEVICE DirTCPCongestion\``, 96 | action:"generic `sh $DEVICE DirTCPCongestion`", 97 | values:[ 98 | `sh $DEVICE TCPCongestionList` 99 | ] 100 | }}, 101 | `if [ -d "/sys/kernel/power_suspend" ]; then 102 | $BB echo '{ SPane:{ 103 | title:"Power Suspend" 104 | }},' 105 | if [ -f "/sys/kernel/power_suspend/power_suspend_mode" ] && [ "\`$BB grep 1.7 /sys/kernel/power_suspend/power_suspend_version\`" ]; then 106 | PSM=\`$BB cat /sys/kernel/power_suspend/power_suspend_mode\` 107 | $BB echo '{ SOptionList:{ 108 | title:"Power Suspend Mode", 109 | description:"Kernel Mode, LCD Hooks & Highest Level Hook are automatic and managed by the kernel, to manually enable or disable the Power Suspend State choose User Mode.", 110 | default:'$PSM', 111 | action:"generic /sys/kernel/power_suspend/power_suspend_mode", 112 | values:{ 113 | 1:"User Mode",2:"LCD Hooks", 114 | } 115 | }},' 116 | fi 117 | if [ -f "/sys/kernel/power_suspend/power_suspend_mode" ] && [ "\`$BB grep 1.6 /sys/kernel/power_suspend/power_suspend_version\`" ]; then 118 | PSM=\`$BB cat /sys/kernel/power_suspend/power_suspend_mode\` 119 | $BB echo '{ SOptionList:{ 120 | title:"Power Suspend Mode", 121 | description:"Kernel Mode, LCD Hooks & Highest Level Hook are automatic and managed by the kernel, to manually enable or disable the Power Suspend State choose User Mode.", 122 | default:'$PSM', 123 | action:"generic /sys/kernel/power_suspend/power_suspend_mode", 124 | values:{ 125 | 0:"Autosleep", 1:"User Mode",2:"LCD Hooks", 3:"Hybrid Mode", 126 | } 127 | }},' 128 | fi 129 | if [ -f "/sys/kernel/power_suspend/power_suspend_mode" ] && [ "\`$BB grep 1.5 /sys/kernel/power_suspend/power_suspend_version\`" ]; then 130 | PSM=\`$BB cat /sys/kernel/power_suspend/power_suspend_mode\` 131 | $BB echo '{ SOptionList:{ 132 | title:"Power Suspend Mode", 133 | description:"Kernel Mode, LCD Hooks & Highest Level Hook are automatic and managed by the kernel, to manually enable or disable the Power Suspend State choose User Mode.", 134 | default:'$PSM', 135 | action:"generic /sys/kernel/power_suspend/power_suspend_mode", 136 | values:{ 137 | 0:"Autosleep", 1:"User Mode",2:"LCD Hooks", 3:"Hybrid Mode", 138 | } 139 | }},' 140 | fi 141 | if [ -f "/sys/kernel/power_suspend/power_suspend_state" ]; then 142 | MHH=\`$BB cat /sys/kernel/power_suspend/power_suspend_state\`; 143 | $BB echo '{ SCheckBox:{ 144 | label:"Enable", 145 | description:"Kernel power management driver when screen is off. Better battery savings if enabled. Note: You can only change this setting if Power Suspend Mode is in User Mode.", 146 | default:'$MHH', 147 | action:"powersuspend /sys/kernel/power_suspend/power_suspend_state" 148 | }},' 149 | fi 150 | fi` 151 | `if [ -f "/sys/class/misc/btk_control/btkc_mode" ]; then 152 | $BB echo '{ SPane:{ 153 | title:"Boeffla Touchkey Control" 154 | }},' 155 | if [ -f "/sys/class/misc/btk_control/btkc_mode" ]; then 156 | BTC=\`$BB cat /sys/class/misc/btk_control/btkc_mode\` 157 | $BB echo '{ SOptionList:{ 158 | title:"Touchkey Control", 159 | description:"Touchkey driver to control key backlight developed by Lord Boeffla.", 160 | default:'$BTC', 161 | action:"generic /sys/class/misc/btk_control/btkc_mode", 162 | values:{ 163 | 0:"Normal Mode", 1:"Lit When Pressed", 2:"Lights Always Off", 164 | } 165 | }},' 166 | fi 167 | if [ -f "/sys/class/misc/btk_control/btkc_timeout" ]; then 168 | BTT=\`$BB cat /sys/class/misc/btk_control/btkc_timeout\` 169 | $BB echo '{ SSeekBar:{ 170 | title:"Touch Key lights Timeout", 171 | description:"Sets touchkey timeout.", 172 | unit:" ms", 173 | min:0, 174 | max:30000, 175 | step:1000, 176 | default:'$BTT', 177 | action:"generic /sys/class/misc/btk_control/btkc_timeout" 178 | }},' 179 | fi 180 | fi` 181 | `if [ -f "/sys/class/timed_output/vibrator/amp" ]; then 182 | VIBRATOR=\`$BB cat /sys/class/timed_output/vibrator/amp\` 183 | $BB echo '{ SPane:{ 184 | title:"Vibrator Strength Amp" 185 | }}, 186 | { SSeekBar:{ 187 | description:"Allows to set the intensity of the vibrator.", 188 | unit:"%", 189 | step:1, 190 | min:0, 191 | max:100, 192 | default:'$VIBRATOR', 193 | action:"generic /sys/class/timed_output/vibrator/amp" 194 | }},' 195 | fi` 196 | `if [ -f "/sys/devices/virtual/timed_output/vibrator/vtg_level" ]; then 197 | VTGLVL=\`$BB cat /sys/devices/virtual/timed_output/vibrator/vtg_level\` 198 | VTGMIN=\`$BB cat /sys/devices/virtual/timed_output/vibrator/vtg_min\` 199 | VTGMAX=\`$BB cat /sys/devices/virtual/timed_output/vibrator/vtg_max\` 200 | $BB echo '{ SPane:{ 201 | title:"Vibrator Strength VTG" 202 | }}, 203 | { SSeekBar:{ 204 | description:"Allows to set the intensity of the vibrator.", 205 | step:1, 206 | min:'$VTGMIN', 207 | max:'$VTGMAX', 208 | default:'$VTGLVL', 209 | action:"generic /sys/devices/virtual/timed_output/vibrator/vtg_level" 210 | }},' 211 | fi` 212 | `if [ -f "/sys/class/misc/vibratorcontrol/vibrator_strength" ]; then 213 | VIBRATOR=\`$BB cat /sys/class/misc/vibratorcontrol/vibrator_strength\` 214 | $BB echo '{ SPane:{ 215 | title:"Vibrator Strength VC" 216 | }}, 217 | { SSeekBar:{ 218 | description:"Allows to set the intensity of the vibrator.", 219 | step:1, 220 | min:1000, 221 | max:1600, 222 | default:'$VIBRATOR', 223 | action:"generic /sys/class/misc/vibratorcontrol/vibrator_strength" 224 | }},' 225 | fi` 226 | `if [ -f "/sys/vibrator/pwmvalue" ]; then 227 | VIBRATOR=\`$BB cat /sys/vibrator/pwmvalue\` 228 | $BB echo '{ SPane:{ 229 | title:"Vibrator Strength PWM" 230 | }}, 231 | { SSeekBar:{ 232 | description:"Allows to set the intensity of the vibrator.", 233 | step:1, 234 | min:1, 235 | max:127, 236 | default:'$VIBRATOR', 237 | action:"generic /sys/vibrator/pwmvalue" 238 | }},' 239 | fi` 240 | `if [ -f "/sys/kernel/fast_charge/force_fast_charge" ] && [ ! -f "/sys/kernel/fast_charge/fast_charge_level" ]; then 241 | FC=\`$BB cat /sys/kernel/fast_charge/force_fast_charge\` 242 | $BB echo '{ SPane:{ 243 | title:"Fast Charge" 244 | }}, 245 | { SCheckBox:{ 246 | label:"Enable", 247 | description:"If enabled, device will charge faster. Depends on kernel For USB use 900mA as MAX, For wallcharger use up to 2500mA. NOTE: Enabling this will disable access to phone storage via USB.", 248 | default:'$FC', 249 | action:"generic /sys/kernel/fast_charge/force_fast_charge" 250 | }},' 251 | fi` 252 | `if [ -f "/sys/kernel/fast_charge/force_fast_charge" ] && [ -f "/sys/kernel/fast_charge/fast_charge_level" ]; then 253 | FC=\`$BB cat /sys/kernel/fast_charge/force_fast_charge\` 254 | FCL=\`$BB cat /sys/kernel/fast_charge/fast_charge_level\` 255 | $BB echo '{ SPane:{ 256 | title:"USB Fast Charge" 257 | }}, 258 | { SOptionList:{ 259 | title:"Enable", 260 | description:"If enabled, device will charge faster when connected through USB, use custom for different voltage below. NOTE: Enabling this will disable access to phone storage via USB.", 261 | default:'$FC', 262 | action:"generic /sys/kernel/fast_charge/force_fast_charge", 263 | values:{ 264 | 0:"Disabled", 1:"Enable", 2:"Custom" 265 | } 266 | }}, 267 | { SSeekBar:{ 268 | title:"Fast Charge Level", 269 | description:"Fast charge voltage configuration. For USB 2.0 use 500mA as MAX, for USB 3.0 use 900mA as MAX, For wallcharger use 1500mA as MAX. WARNING: Incorrect use of voltage could damage your phone or USB ports.", 270 | default:'$FCL', 271 | action:"generic /sys/kernel/fast_charge/fast_charge_level", 272 | values:{ 0:"Disabled",' 273 | for CHARGE in \`$BB cat /sys/kernel/fast_charge/available_charge_levels\`; do 274 | $BB echo "$CHARGE:\"${CHARGE} mA\", "; 275 | done; 276 | $BB echo '} 277 | }},' 278 | fi` 279 | `if [ -f "/sys/module/msm_otg/parameters/otg_hack_enable" ]; then 280 | OTG=\`$BB cat /sys/module/msm_otg/parameters/otg_hack_enable\` 281 | $BB echo '{ SPane:{ 282 | title:"USB OTG (On-The-Go)" 283 | }}, 284 | { SCheckBox:{ 285 | label:"Enable", 286 | description:"Enabling this allows for OTG operation. More info: HERE", 287 | default:'$OTG', 288 | action:"generic /sys/module/msm_otg/parameters/otg_hack_enable" 289 | }},' 290 | fi` 291 | `if [ -f "/sys/module/msm_otg/parameters/usbhost_charge_mode" ]; then 292 | USB=\`bool /sys/module/msm_otg/parameters/usbhost_charge_mode\` 293 | $BB echo '{ SPane:{ 294 | title:"USB Host Mode Charging" 295 | }}, 296 | { SCheckBox:{ 297 | label:"Enable", 298 | description:"Enabling this allows for OTG operation.", 299 | default:'$USB', 300 | action:"boolean /sys/module/msm_otg/parameters/usbhost_charge_mode" 301 | }},' 302 | fi` 303 | `if [ -f "/sys/class/misc/batterylifeextender/charging_limit" ]; then 304 | BLX=\`$BB cat /sys/class/misc/batterylifeextender/charging_limit\` 305 | $BB echo '{ SPane:{ 306 | title:"Battery Life Extender (BLX)" 307 | }}, 308 | { SSeekBar:{ 309 | description:"Limit the capacity to which the battery will be charged.", 310 | unit:"%", 311 | step:1, 312 | min:0, 313 | max:100, 314 | default:'$BLX', 315 | action:"generic /sys/class/misc/batterylifeextender/charging_limit" 316 | }},' 317 | fi` 318 | `if [ -f "/sys/devices/i2c-0/0-006a/float_voltage" ]; then 319 | BLX=\`$BB cat /sys/devices/i2c-0/0-006a/float_voltage\` 320 | $BB echo '{ SPane:{ 321 | title:"Battery Life Extender (BLX)" 322 | }}, 323 | { SSeekBar:{ 324 | description:"Limit the capacity to which the battery will be charged.", 325 | default:'$BLX', 326 | action:"generic /sys/devices/i2c-0/0-006a/float_voltage", 327 | values:{ 4000:"4.0V", 4100:"4.1V", 4200:"4.2V" 328 | } 329 | }},' 330 | fi` 331 | `if [ -f "/sys/devices/virtual/input/lge_touch/accuracy" ] && [ -n "\`cat /sys/devices/virtual/input/lge_touch/accuracy 2> /dev/null\`" ]; then 332 | $BB echo '{ SPane:{ 333 | title:"Touchscreen Accuracy Filter", 334 | description:"Allows you to set the accuracy & sensitivity of the touchscreen. First select your preferred settings and then enable." 335 | }},' 336 | for TOUCH in 1; do 337 | $BB echo '{ SCheckBox:{' 338 | case $TOUCH in 339 | 1) 340 | $BB echo 'label:"Enable Accuracy Filter", default:0' ;; 341 | esac 342 | $BB echo ', action:"touch '${TOUCH}'", 343 | }},' 344 | done; 345 | for TOUCH in 2 3 4 5 6 7; do 346 | $BB echo '{ SSeekBar:{' 347 | case $TOUCH in 348 | 2) 349 | $BB echo 'title:"Ignore Pressure Gap", default:5' ;; 350 | 3) 351 | $BB echo 'title:"Delta Max", default:100' ;; 352 | 4) 353 | $BB echo 'title:"Touch Max Count", default:40' ;; 354 | 5) 355 | $BB echo 'title:"Max Pressure", default:255' ;; 356 | 6) 357 | $BB echo 'title:"Direction Count", default:13' ;; 358 | 7) 359 | $BB echo 'title:"Time To Max Pressure", default:4' ;; 360 | esac 361 | $BB echo ', action:"touch '${TOUCH}'", 362 | min:0, 363 | max:255 364 | }},' 365 | done; 366 | fi` 367 | `if [ -f "/sys/module/wakeup/parameters/enable_msm_hsic_ws" ]; then 368 | MHH=\`bool /sys/module/wakeup/parameters/enable_msm_hsic_ws\`; 369 | $BB echo '{ SPane:{ 370 | title:"Msm_hsic_host wakelock", 371 | }}, 372 | { SCheckBox:{ 373 | label:"Enable", 374 | description:"Enable/Disable msm_hsic_host wakelock.", 375 | default:'$MHH', 376 | action:"boolean /sys/module/wakeup/parameters/enable_msm_hsic_ws" 377 | }},' 378 | fi` 379 | ] 380 | } 381 | CTAG 382 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.profile: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:PROFILE, 4 | elements:[ 5 | { STitleBar:{ 6 | title:"Configs" 7 | }}, 8 | { SOptionList:{ 9 | title:"Selected Config", 10 | description:"Choose the settings you want and apply your choice in Synapse before using the action buttons below.", 11 | action:"restorebackup pickconfig", 12 | default:"None", 13 | values:[ "None", 14 | `for BAK in \`$UKM/actions/restorebackup listconfig\`; do 15 | echo "\"$BAK\"," 16 | done` 17 | ], 18 | notify:[ 19 | { 20 | on:APPLY, 21 | do:[ REFRESH, APPLY ], 22 | to:"generic $UKM/files/bck_prof" 23 | } 24 | ] 25 | }}, 26 | { SDescription:{ 27 | description:"NOTE: After you restore a config, you have to press the X button on top to load the settings." 28 | }}, 29 | { SButton:{ 30 | label:"Import Selected Config", 31 | action:"sqlite ImportConfigSynapse", 32 | notify:[ 33 | { 34 | on:APPLY, 35 | do:[ REFRESH, APPLY ], 36 | to:"restorebackup pickconfig" 37 | } 38 | ] 39 | }}, 40 | { SButton:{ 41 | label:"Delete Selected Config", 42 | action:"restorebackup delconfig", 43 | notify:[ 44 | { 45 | on:APPLY, 46 | do:[ REFRESH, APPLY ], 47 | to:"restorebackup pickconfig" 48 | } 49 | ] 50 | }}, 51 | { SPane:{ 52 | title:"Backup Actions" 53 | }}, 54 | { SGeneric:{ 55 | title:"Profile/Config Name", 56 | default:"None", 57 | action:"generic $UKM/files/bck_prof", 58 | }}, 59 | { SDescription:{ 60 | description:"First set a name above and apply. After this you can press the Backup Current Profile or Export Current Config button below." 61 | }}, 62 | { SButton:{ 63 | label:"Export Current Config", 64 | action:"sqlite ExportConfigSynapse", 65 | notify:[ 66 | { 67 | on:APPLY, 68 | do:[ REFRESH, APPLY ], 69 | to:"generic $UKM/files/bck_prof" 70 | } 71 | ] 72 | }}, 73 | { SPane:{ 74 | title:"General Actions", 75 | description:"To update/refresh lists, select Restart Synapse below." 76 | }}, 77 | { SButton:{ 78 | label:"Restart Synapse", 79 | action:"restorebackup restart" 80 | }}, 81 | ] 82 | } 83 | CTAG 84 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.sound: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:SOUND, 4 | elements:[ 5 | `if [ -d "/sys/kernel/sound_control_3" ]; then 6 | $BB echo '{ SLiveLabel:{ 7 | refresh:0, 8 | style:italic, 9 | action:"$BB echo FauxSound \`$BB cat /sys/kernel/sound_control_3/gpl_sound_control_version\`" 10 | }}, 11 | { SPane:{ 12 | title:"Sound Profiles", 13 | description:"After you apply a profile, turn audio Off/On to update. Select custom profile if you set controls manually." 14 | }}, 15 | { SOptionList:{ 16 | default:Custom, 17 | action:"soundfaux '$UKM'/files/sound_prof", 18 | values:[ Custom, LG_Stock, Quality, Loudness, Quiet, 19 | ], 20 | notify:[ 21 | { 22 | on:APPLY, 23 | do:[ REFRESH, APPLY ], 24 | to:[' 25 | [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ] && $BB echo '"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked",' 26 | $BB echo '"soundfaux /sys/kernel/sound_control_3/gpl_headphone_gain", 27 | "soundfaux /sys/kernel/sound_control_3/gpl_speaker_gain",' 28 | [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ] && $BB echo '"soundfaux /sys/kernel/sound_control_3/gpl_headphone_pa_gain",' 29 | $BB echo '"soundfaux /sys/kernel/sound_control_3/gpl_mic_gain", 30 | "soundfaux /sys/kernel/sound_control_3/gpl_cam_mic_gain" 31 | ] 32 | } 33 | ] 34 | }}, 35 | { SPane:{ 36 | title:"Gain Controls", 37 | }},' 38 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 39 | $BB echo '{ SOptionList:{ 40 | title:"Sound Control Lock", 41 | description:"Have this enabled to prevent the driver from automatically changing your settings.", 42 | default:0, 43 | action:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked", 44 | values:{ 0:"Disabled", 2:"Enabled" 45 | } 46 | }},' 47 | fi 48 | $BB echo '{ SSeekBar:{ 49 | title:"Headphone (Left & Right)", 50 | min:-30, 51 | max:20, 52 | default:0, 53 | action:"soundfaux /sys/kernel/sound_control_3/gpl_headphone_gain",' 54 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 55 | $BB echo 'notify:[ 56 | { 57 | on:APPLY, 58 | do:[ REFRESH, APPLY ], 59 | to:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked" 60 | } 61 | ]' 62 | fi 63 | $BB echo '}}, 64 | { SSeekBar:{ 65 | title:"Speaker", 66 | min:-30, 67 | max:20, 68 | default:0, 69 | action:"soundfaux /sys/kernel/sound_control_3/gpl_speaker_gain",' 70 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 71 | $BB echo 'notify:[ 72 | { 73 | on:APPLY, 74 | do:[ REFRESH, APPLY ], 75 | to:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked" 76 | } 77 | ]' 78 | fi 79 | $BB echo '}},' 80 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 81 | $BB echo '{ SSeekBar:{ 82 | title:"Headphone PowerAmp (Left & Right)", 83 | min:-6, 84 | max:6, 85 | default:0, 86 | action:"soundfaux /sys/kernel/sound_control_3/gpl_headphone_pa_gain", 87 | notify:[ 88 | { 89 | on:APPLY, 90 | do:[ REFRESH, APPLY ], 91 | to:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked" 92 | } 93 | ] 94 | }},' 95 | else 96 | $BB echo '{ SDescription:{ 97 | description:"Power Amp Control not available. The audio driver has automatic full on or full off control for Power Amp." 98 | }},' 99 | fi 100 | $BB echo '{ SSeekBar:{ 101 | title:"Handset Microphone", 102 | min:-30, 103 | max:20, 104 | default:0, 105 | action:"soundfaux /sys/kernel/sound_control_3/gpl_mic_gain",' 106 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 107 | $BB echo 'notify:[ 108 | { 109 | on:APPLY, 110 | do:[ REFRESH, APPLY ], 111 | to:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked" 112 | } 113 | ]' 114 | fi 115 | $BB echo '}}, 116 | { SSeekBar:{ 117 | title:"Camcorder Microphone", 118 | min:-30, 119 | max:20, 120 | default:0, 121 | action:"soundfaux /sys/kernel/sound_control_3/gpl_cam_mic_gain",' 122 | if [ "\`sh $DEVICE HasHeadphonePowerAmp\`" == "1" ]; then 123 | $BB echo 'notify:[ 124 | { 125 | on:APPLY, 126 | do:[ REFRESH, APPLY ], 127 | to:"soundfaux /sys/kernel/sound_control_3/gpl_sound_control_locked" 128 | } 129 | ]' 130 | fi 131 | $BB echo '}},' 132 | fi` 133 | `[ -d "/sys/class/misc/soundcontrol" ] && SC=/sys/class/misc/soundcontrol; 134 | [ -d "/sys/devices/virtual/misc/soundcontrol" ] && SC=/sys/devices/virtual/misc/soundcontrol; 135 | 136 | if [ -d "$SC" ]; then 137 | $BB echo '{ SPane:{ 138 | title:"Sound Control", 139 | }},' 140 | if [ -f "$SC/headset_boost" ]; then 141 | HB=\`$BB cat $SC/headset_boost\`; 142 | $BB echo '{ SSeekBar:{ 143 | title:"Headset Boost", 144 | min:-11, 145 | max:11, 146 | default:'$HB', 147 | action:"generic '$SC'/headset_boost", 148 | }},' 149 | fi 150 | if [ -f "$SC/mic_boost" ]; then 151 | MB=\`$BB cat $SC/mic_boost\`; 152 | $BB echo '{ SSeekBar:{ 153 | title:"Microphone Boost", 154 | min:-11, 155 | max:11, 156 | default:'$MB', 157 | action:"generic '$SC'/mic_boost", 158 | }},' 159 | fi 160 | if [ -f "$SC/mic_gain" ]; then 161 | MG=\`$BB cat $SC/mic_gain\`; 162 | $BB echo '{ SSeekBar:{ 163 | title:"Microphone Gain", 164 | min:0, 165 | max:10, 166 | default:'$MG', 167 | action:"generic '$SC'/mic_gain", 168 | }},' 169 | fi 170 | if [ -f "$SC/speaker_boost" ]; then 171 | SB=\`$BB cat $SC/speaker_boost\`; 172 | $BB echo '{ SSeekBar:{ 173 | title:"Speaker Boost", 174 | min:-11, 175 | max:11, 176 | default:'$SB', 177 | action:"generic '$SC'/speaker_boost", 178 | }},' 179 | fi 180 | if [ -f "$SC/volume_boost" ]; then 181 | VB=\`$BB cat $SC/volume_boost\`; 182 | $BB echo '{ SSeekBar:{ 183 | title:"Volume Boost", 184 | min:0, 185 | max:20, 186 | default:'$VB', 187 | action:"generic '$SC'/volume_boost", 188 | }},' 189 | fi 190 | if [ -f "$SC/highperf_enabled" ]; then 191 | HPE=\`$BB cat $SC/highperf_enabled\`; 192 | $BB echo '{ SPane:{ 193 | title:"High performance", 194 | description:"Class AB mode for headphone 192Khz playback.", 195 | }}, 196 | { SCheckBox:{ 197 | label:"Enable", 198 | default:'$HPE', 199 | action:"generic '$SC'/highperf_enabled", 200 | }},' 201 | fi 202 | fi` 203 | `if [ -f "sys/module/snd_soc_wcd9320/parameters/high_perf_mode" ]; then 204 | HPM=\`$BB cat /sys/module/snd_soc_wcd9320/parameters/high_perf_mode\`; 205 | $BB echo '{ SPane:{ 206 | title:"High performance Mode", 207 | }}, 208 | { SCheckBox:{ 209 | label:"Enable", 210 | default:'$HPM', 211 | action:"generic sys/module/snd_soc_wcd9320/parameters/high_perf_mode", 212 | }},' 213 | fi` 214 | `if [ -d "/sys/kernel/sound_control" ]; then 215 | $BB echo '{ SPane:{ 216 | title:"Flar 2 Sound Control" 217 | }},' 218 | if [ -f "/sys/kernel/sound_control/speaker_gain" ]; then 219 | SPG=\`$BB cat /sys/kernel/sound_control/speaker_gain\` 220 | $BB echo '{ SSeekBar:{ 221 | title:"Speaker Volume Control", 222 | min:0, 223 | max:20, 224 | step:1, 225 | default:'$SPG', 226 | action:"generic /sys/kernel/sound_control/speaker_gain", 227 | }},' 228 | fi 229 | if [ -f "/sys/kernel/sound_control/headphone_left_gain" ]; then 230 | HPG=\`$BB cat /sys/kernel/sound_control/headphone_left_gain\` 231 | $BB echo '{ SSeekBar:{ 232 | title:"Left Headphone Volume Control", 233 | min:-20, 234 | max:20, 235 | step:1, 236 | default:'$HPG', 237 | action:"generic /sys/kernel/sound_control/headphone_left_gain" 238 | }},' 239 | fi 240 | if [ -f "/sys/kernel/sound_control/headphone_right_gain" ]; then 241 | HPG=\`$BB cat /sys/kernel/sound_control/headphone_right_gain\` 242 | $BB echo '{ SSeekBar:{ 243 | title:"Right Headphone Volume Control", 244 | min:-20, 245 | max:20, 246 | step:1, 247 | default:'$HPG', 248 | action:"generic /sys/kernel/sound_control/headphone_right_gain" 249 | }},' 250 | fi 251 | if [ -f "/sys/kernel/sound_control/headphone_gain" ]; then 252 | HPG=\`$BB cat /sys/kernel/sound_control/headphone_gain\` 253 | $BB echo '{ SSeekBar:{ 254 | title:"Right Headphone Volume Control", 255 | min:-20, 256 | max:20, 257 | step:1, 258 | default:'$HPG', 259 | action:"sound /sys/kernel/sound_control/headphone_gain" 260 | }},' 261 | fi 262 | if [ -f "/sys/kernel/sound_control/mic_gain" ]; then 263 | MCG=\`$BB cat /sys/kernel/sound_control/mic_gain\` 264 | $BB echo '{ SSeekBar:{ 265 | title:"Microphone Gain Control", 266 | min:0, 267 | max:10, 268 | step:1, 269 | default:'$MCG', 270 | action:"generic /sys/kernel/sound_control/sound_control/mic_gain", 271 | }},' 272 | fi 273 | fi` 274 | ] 275 | } 276 | CTAG 277 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.speaker: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:SPEAKER, 4 | elements:[ 5 | `if [ -d "/sys/bus/i2c/devices/0-0058" ]; then 6 | SPEAKER=/sys/bus/i2c/devices/0-0058; 7 | 8 | $BB echo '{ SPane:{ 9 | title:"Speaker Profiles", 10 | description:"After you apply a profile, turn audio Off/On to update. Select custom profile if you set controls manually." 11 | }}, 12 | { SOptionList:{ 13 | default:Custom, 14 | action:"speakerfaux '$UKM'/files/speaker_prof", 15 | values:[ Custom, LG_Stock, Max_Loudness, Voice, Quiet, 16 | ], 17 | notify:[ 18 | { 19 | on:APPLY, 20 | do:[ REFRESH, APPLY ], 21 | to:[ ' 22 | [ -f "$SPEAKER/comp_rate" ] && $BB echo '"speakerfaux '$SPEAKER'/comp_rate",' 23 | [ -f "$SPEAKER/fixed_gain" ] && $BB echo '"speakerfaux '$SPEAKER'/fixed_gain",' 24 | [ -f "$SPEAKER/ATK_time" ] && $BB echo '"speakerfaux '$SPEAKER'/ATK_time",' 25 | [ -f "$SPEAKER/REL_time" ] && $BB echo '"speakerfaux '$SPEAKER'/REL_time",' 26 | [ -f "$SPEAKER/Hold_time" ] && $BB echo '"speakerfaux '$SPEAKER'/Hold_time",' 27 | [ -f "$SPEAKER/Output_limit_level" ] && $BB echo '"speakerfaux '$SPEAKER'/Output_limit_level",' 28 | [ -f "$SPEAKER/AGC_Max_Gain" ] && $BB echo '"speakerfaux '$SPEAKER'/AGC_Max_Gain",' 29 | [ -f "$SPEAKER/Noise_Gate_Threshold" ] && $BB echo '"speakerfaux '$SPEAKER'/Noise_Gate_Threshold"' 30 | $BB echo '] 31 | } 32 | ] 33 | }},' 34 | if [ -f "$SPEAKER/comp_rate" ]; then 35 | $BB echo '{ SPane:{ 36 | title:"Basic Amp Controls", 37 | }}, 38 | { SSeekBar:{ 39 | title:"Dynamic Range Compression", 40 | min:0, 41 | max:3, 42 | default:0, 43 | action:"speakerfaux '$SPEAKER'/comp_rate", 44 | }},' 45 | fi; 46 | if [ -f "$SPEAKER/fixed_gain" ]; then 47 | $BB echo '{ SSeekBar:{ 48 | title:"Fixed Gain", 49 | unit:" dB", 50 | min:-29, 51 | max:30, 52 | default:12, 53 | action:"speakerfaux '$SPEAKER'/fixed_gain", 54 | }},' 55 | fi; 56 | if [ -f "$SPEAKER/ATK_time" ]; then 57 | $BB echo '{ SPane:{ 58 | title:"Advanced Amp Controls", 59 | }}, 60 | { SSeekBar:{ 61 | title:"Attack Time", 62 | description:"Min time between -", 63 | min:0, 64 | max:63, 65 | default:5, 66 | action:"speakerfaux '$SPEAKER'/ATK_time", 67 | }},' 68 | fi; 69 | if [ -f "$SPEAKER/REL_time" ]; then 70 | $BB echo '{ SSeekBar:{ 71 | title:"Release Time", 72 | description:"Min time between +", 73 | min:0, 74 | max:63, 75 | default:11, 76 | action:"speakerfaux '$SPEAKER'/REL_time", 77 | }},' 78 | fi; 79 | if [ -f "$SPEAKER/Hold_time" ]; then 80 | $BB echo '{ SSeekBar:{ 81 | title:"Hold Time", 82 | description:"Min time between + / -", 83 | min:0, 84 | max:63, 85 | default:0, 86 | action:"speakerfaux '$SPEAKER'/Hold_time", 87 | }},' 88 | fi; 89 | if [ -f "$SPEAKER/Output_limit_level" ]; then 90 | $BB echo '{ SSeekBar:{ 91 | title:"Output Limit Level", 92 | unit:" dBV", 93 | min:0, 94 | max:31, 95 | default:26, 96 | action:"speakerfaux '$SPEAKER'/Output_limit_level", 97 | }},' 98 | fi; 99 | if [ -f "$SPEAKER/AGC_Max_Gain" ]; then 100 | $BB echo '{ SSeekBar:{ 101 | title:"Max AGC Gain", 102 | unit:" dB", 103 | min:18, 104 | max:30, 105 | default:30, 106 | action:"speakerfaux '$SPEAKER'/AGC_Max_Gain", 107 | }},' 108 | fi; 109 | if [ -f "$SPEAKER/Noise_Gate_Threshold" ]; then 110 | $BB echo '{ SSeekBar:{ 111 | title:"Noise Gate Threshold", 112 | description:"Threshold for AGC to start", 113 | min:0, 114 | max:4, 115 | default:1, 116 | action:"speakerfaux '$SPEAKER'/Noise_Gate_Threshold", 117 | }},' 118 | fi; 119 | fi` 120 | ] 121 | } 122 | CTAG 123 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.status: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:STATUS, 4 | elements:[ 5 | { SPane:{ 6 | title:"Battery Temperature:" 7 | }}, 8 | { SLiveLabel:{ 9 | refresh:2000, 10 | style:italic, 11 | action:"live BatteryTemperature" 12 | }}, 13 | { SPane:{ 14 | title:"CPU Temperature:" 15 | }}, 16 | { SLiveLabel:{ 17 | refresh:2000, 18 | style:italic, 19 | action:"live CPUTemperature" 20 | }}, 21 | { SPane:{ 22 | title:"Memory:" 23 | }}, 24 | { SLiveLabel:{ 25 | refresh:2000, 26 | style:italic, 27 | action:"live Memory" 28 | }}, 29 | { SPane:{ 30 | title:"Uptime:" 31 | }}, 32 | { SLiveLabel:{ 33 | refresh:0, 34 | style:italic, 35 | action:"live UpTime" 36 | }}, 37 | { SPane:{ 38 | title:"Unused States:" 39 | }}, 40 | { SLiveLabel:{ 41 | refresh:0, 42 | style:italic, 43 | action:"live UnUsed" 44 | }}, 45 | { SPane:{ 46 | title:"Time in States:" 47 | }}, 48 | { SLiveLabel:{ 49 | refresh:0, 50 | style:italic, 51 | action:"live Time 0 9" 52 | }}, 53 | { SLiveLabel:{ 54 | refresh:0, 55 | style:italic, 56 | action:"live Time 10 19" 57 | }}, 58 | { SLiveLabel:{ 59 | refresh:0, 60 | style:italic, 61 | action:"live Time 20 29" 62 | }}, 63 | `if [ -f "/proc/wakelocks" ]; then 64 | $BB echo '{ SPane:{ 65 | title:"Kernel Wakelocks (Top 10):" 66 | }}, 67 | { SLiveLabel:{ 68 | refresh:0, 69 | style:italic, 70 | action:"live WakelocksKernel" 71 | }},' 72 | fi` 73 | { SPane:{ 74 | title:"Installation Check:" 75 | }}, 76 | { SLiveLabel:{ 77 | refresh:0, 78 | style:italic, 79 | action:"live InstallationCheck" 80 | }}, 81 | ] 82 | } 83 | CTAG 84 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.thermal: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:THERMAL, 4 | elements:[ 5 | { SPane:{ 6 | title:"Info" 7 | }}, 8 | { SDescription:{ 9 | description:"Use only one thermal driver from the following options, using more than at the same time may cause unexpected behavior." 10 | }}, 11 | `if [ -f "/system/bin/thermald" ]; then 12 | THERMALD=\`ps | $BB grep thermald\` 13 | if [ -n "$THERMALD" ]; then THERMALD=1; else THERMALD=0; fi 14 | $BB echo '{ SPane:{ 15 | title:"Thermald" 16 | }}, 17 | { SCheckBox:{ 18 | label:"Enable", 19 | description:"Stock Qualcomm thermal driver that prevents device from overheating. This should be disabled if current kernel has an alternative.", 20 | default:'$THERMALD', 21 | action:"serviceset thermald" 22 | }},' 23 | fi` 24 | `[ -d "/sys/module/msm_thermal" ] && MSMTHERMAL=/sys/module/msm_thermal; 25 | [ -d "/sys/module/msm_thermal_v2" ] && MSMTHERMAL=/sys/module/msm_thermal_v2; 26 | 27 | if [ -d "$MSMTHERMAL/parameters" ]; then 28 | if [ -f "$MSMTHERMAL/parameters/enabled" ] && [ -f "$MSMTHERMAL/parameters/core_limit_temp_degC" ]; then 29 | THERMAL=\`bool $MSMTHERMAL/parameters/enabled\`; 30 | $BB echo '{ SPane:{ 31 | title:"Intellithermal" 32 | }}, 33 | { SCheckBox:{ 34 | label:"Enable", 35 | description:"An in kernel replacement for Qualcomms Thermald. Developed by faux123.", 36 | default:'$THERMAL', 37 | action:"boolean '$MSMTHERMAL'/parameters/enabled" 38 | }},' 39 | fi 40 | if [ -f "$MSMTHERMAL/parameters/intelli_enabled" ]; then 41 | INTELLIE=\`bool $MSMTHERMAL/parameters/intelli_enabled\`; 42 | $BB echo '{ SPane:{ 43 | title:"Intellithermal Optimized" 44 | }}, 45 | { SCheckBox:{ 46 | label:"Enable", 47 | description:"An in kernel replacement for Qualcomms Thermald. Developed by faux123 & alucard_24.", 48 | default:'$INTELLIE', 49 | action:"boolean '$MSMTHERMAL'/parameters/intelli_enabled" 50 | }},' 51 | fi 52 | if [ -f "$MSMTHERMAL/parameters/thermal_debug_mode" ]; then 53 | DEBUG=\`cat $MSMTHERMAL/parameters/thermal_debug_mode\` 54 | echo '{ SCheckBox:{ 55 | label:"Debug Mask", 56 | description:"Allows you to activate debug mask for thermal operations.", 57 | default:'$DEBUG', 58 | action:"generic '$MSMTHERMAL'/parameters/thermal_debug_mode" 59 | }},' 60 | fi 61 | if [ -f "$MSMTHERMAL/core_control/enabled" ]; then 62 | ECC=\`$BB cat $MSMTHERMAL/core_control/enabled\`; 63 | $BB echo '{ SCheckBox:{ 64 | label:"Enable Core Control", 65 | default:'$ECC', 66 | action:"generic '$MSMTHERMAL'/core_control/enabled" 67 | }},' 68 | fi 69 | if [ -f "$MSMTHERMAL/core_control/core_control" ]; then 70 | CC=\`$BB cat $MSMTHERMAL/core_control/core_control\`; 71 | $BB echo '{ SCheckBox:{ 72 | label:"Core Control", 73 | default:'$CC', 74 | action:"generic '$MSMTHERMAL'/core_control/core_control" 75 | }},' 76 | fi 77 | if [ -f "$MSMTHERMAL/vdd_restriction/enabled" ]; then 78 | CC=\`$BB cat $MSMTHERMAL/vdd_restriction/enabled\`; 79 | $BB echo '{ SCheckBox:{ 80 | label:"VDD Restriction", 81 | default:'$CC', 82 | action:"generic '$MSMTHERMAL'/vdd_restriction/enabled" 83 | }},' 84 | fi 85 | if [ -f "$MSMTHERMAL/parameters/limit_temp_degC" ]; then 86 | LT=\`$BB cat $MSMTHERMAL/parameters/limit_temp_degC\` 87 | $BB echo '{ SSeekBar:{ 88 | title:"Frequency Throttle Temperature", 89 | description:"Temperature to start throttling frequencies.", 90 | unit:"ºC", 91 | step:1, 92 | min:50, 93 | max:100, 94 | default:'$LT', 95 | action:"generic '$MSMTHERMAL'/parameters/limit_temp_degC" 96 | }},' 97 | fi 98 | if [ -f "$MSMTHERMAL/parameters/core_limit_temp_degC" ]; then 99 | TEMP=\`$BB cat $MSMTHERMAL/parameters/core_limit_temp_degC\`; 100 | $BB echo '{ SSeekBar:{ 101 | title:"Core Throttle Temperature", 102 | description:"Temperature to start shutting down cores", 103 | unit:"ºC", 104 | step:1, 105 | min:50, 106 | max:100, 107 | default:'$TEMP', 108 | action:"generic '$MSMTHERMAL'/parameters/core_limit_temp_degC" 109 | }},' 110 | fi 111 | if [ -f "$MSMTHERMAL/parameters/freq_control_mask" ]; then 112 | $BB echo '{ SDescription:{ 113 | description:"Frequency Throttling Cores:" 114 | }}, 115 | { SDescription:{ 116 | description:"Cores to throttle frequency when temperature limit is reached." 117 | }} 118 | { SCheckBox:{ 119 | label:"Core 0", 120 | action:"intellithermal freq core0" 121 | }}, 122 | { SCheckBox:{ 123 | label:"Core 1", 124 | action:"intellithermal freq core1" 125 | }}, 126 | { SCheckBox:{ 127 | label:"Core 2", 128 | action:"intellithermal freq core2" 129 | }}, 130 | { SCheckBox:{ 131 | label:"Core 3", 132 | action:"intellithermal freq core3" 133 | }},' 134 | fi 135 | if [ -f "$MSMTHERMAL/parameters/core_control_mask" ]; then 136 | $BB echo '{ SDescription:{ 137 | description:"Core Throttling Cores:" 138 | }}, 139 | { SDescription:{ 140 | description:"Cores to shutdown when temperature limit is reached." 141 | }} 142 | { SCheckBox:{ 143 | label:"Core 1", 144 | action:"intellithermal core core1" 145 | }}, 146 | { SCheckBox:{ 147 | label:"Core 2", 148 | action:"intellithermal core core2" 149 | }}, 150 | { SCheckBox:{ 151 | label:"Core 3", 152 | action:"intellithermal core core3" 153 | }},' 154 | fi 155 | if [ -f "$MSMTHERMAL/parameters/core_temp_hysteresis_degC" ]; then 156 | CTHG=\`$BB cat $MSMTHERMAL/parameters/core_temp_hysteresis_degC\`; 157 | $BB echo '{ SSeekBar:{ 158 | title:"Core Temperature Hysteresis", 159 | unit:"ºC", 160 | step:1, 161 | min:0, 162 | max:20, 163 | default:'$CTHG', 164 | action:"generic '$MSMTHERMAL'/parameters/core_temp_hysteresis_degC" 165 | }},' 166 | fi 167 | if [ -f "$MSMTHERMAL/parameters/freq_step" ]; then 168 | FS=\`$BB cat $MSMTHERMAL/parameters/freq_step\`; 169 | $BB echo '{ SSeekBar:{ 170 | title:"Frequency Step", 171 | step:1, 172 | min:1, 173 | max:10, 174 | default:'$FS', 175 | action:"generic '$MSMTHERMAL'/parameters/freq_step" 176 | }},' 177 | fi 178 | if [ -f "$MSMTHERMAL/parameters/immediately_limit_stop" ]; then 179 | ILS=\`bool $MSMTHERMAL/parameters/immediately_limit_stop\`; 180 | $BB echo '{ SCheckBox:{ 181 | label:"Immediately Limit Stop", 182 | default:'$ILS', 183 | action:"boolean '$MSMTHERMAL'/parameters/immediately_limit_stop" 184 | }},' 185 | fi 186 | if [ -f "$MSMTHERMAL/parameters/poll_ms" ]; then 187 | PMS=\`$BB cat $MSMTHERMAL/parameters/poll_ms\`; 188 | $BB echo '{ SSeekBar:{ 189 | title:"Poll", 190 | unit:" ms", 191 | step:10, 192 | min:0, 193 | max:3000, 194 | default:'$PMS', 195 | action:"generic '$MSMTHERMAL'/parameters/poll_ms" 196 | }},' 197 | fi 198 | if [ -f "$MSMTHERMAL/parameters/temp_hysteresis_degC" ]; then 199 | TH=\`$BB cat $MSMTHERMAL/parameters/temp_hysteresis_degC\`; 200 | $BB echo '{ SSeekBar:{ 201 | title:"Temperature Hysteresis", 202 | unit:"ºC", 203 | step:1, 204 | min:0, 205 | max:20, 206 | default:'$TH', 207 | action:"generic '$MSMTHERMAL'/parameters/temp_hysteresis_degC" 208 | }},' 209 | fi 210 | if [ -f "$MSMTHERMAL/parameters/thermal_limit_low" ]; then 211 | TLL=\`$BB cat $MSMTHERMAL/parameters/thermal_limit_low\`; 212 | $BB echo '{ SSeekBar:{ 213 | title:"Thermal Limit Low", 214 | step:1, 215 | min:1, 216 | max:30, 217 | default:'$TLL', 218 | action:"generic '$MSMTHERMAL'/parameters/thermal_limit_low" 219 | }},' 220 | fi 221 | if [ -f "$MSMTHERMAL/parameters/thermal_limit_high" ]; then 222 | TLH=\`$BB cat $MSMTHERMAL/parameters/thermal_limit_high\`; 223 | $BB echo '{ SSeekBar:{ 224 | title:"Thermal Limit High", 225 | step:1, 226 | min:1, 227 | max:30, 228 | default:'$TLH', 229 | action:"generic '$MSMTHERMAL'/parameters/thermal_limit_high" 230 | }},' 231 | fi 232 | if [ -f "$MSMTHERMAL/parameters/temp_safety" ]; then 233 | TS=\`$BB cat $MSMTHERMAL/parameters/temp_safety\`; 234 | $BB echo '{ SCheckBox:{ 235 | label:"Temperature Safety", 236 | default:'$TS', 237 | action:"generic '$MSMTHERMAL'/parameters/temp_safety" 238 | }},' 239 | fi 240 | fi` 241 | `if [ -d "/sys/kernel/msm_thermal/conf" ]; then 242 | $BB echo '{ SPane:{ 243 | title:"MSM thermal", 244 | description:"An in kernel replacement for Qualcomms Thermald. Developed by show-p1984.", 245 | }},' 246 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_low_low" ]; then 247 | ALL=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_low_low\` 248 | $BB echo '{ SSeekBar:{ 249 | title:"Phase 1: Allowed Low Low", 250 | unit:"ºC", 251 | min:40, 252 | max:100, 253 | step:1, 254 | default:'$ALL', 255 | action:"generic /sys/kernel/msm_thermal/conf/allowed_low_low" 256 | }},' 257 | fi 258 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_low_high" ]; then 259 | ALH=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_low_high\` 260 | $BB echo '{ SSeekBar:{ 261 | title:"Phase 1: Allowed Low High", 262 | unit:"ºC", 263 | min:40, 264 | max:100, 265 | step:1, 266 | default:'$ALH', 267 | action:"generic /sys/kernel/msm_thermal/conf/allowed_low_high" 268 | }},' 269 | fi 270 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_low_freq" ]; then 271 | ALF=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_low_freq\` 272 | $BB echo '{ SSeekBar:{ 273 | title:"Phase 1: Allowed Low Frequency", 274 | default:'$ALF', 275 | action:"generic /sys/kernel/msm_thermal/conf/allowed_low_freq", 276 | values:{' 277 | sh $DEVICE CPUFrequencyList 278 | $BB echo '} 279 | }},' 280 | fi 281 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_mid_low" ]; then 282 | AML=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_mid_low\` 283 | $BB echo '{ SSeekBar:{ 284 | title:"Phase 2: Allowed Mid Low", 285 | unit:"ºC", 286 | min:40, 287 | max:100, 288 | step:1, 289 | default:'$AML', 290 | action:"generic /sys/kernel/msm_thermal/conf/allowed_mid_low" 291 | }},' 292 | fi 293 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_mid_high" ]; then 294 | AMH=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_mid_high\` 295 | $BB echo '{ SSeekBar:{ 296 | title:"Phase 2: Allowed Mid High", 297 | unit:"ºC", 298 | min:40, 299 | max:100, 300 | step:1, 301 | default:'$AMH', 302 | action:"generic /sys/kernel/msm_thermal/conf/allowed_mid_high" 303 | }},' 304 | fi 305 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_mid_freq" ]; then 306 | AMF=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_mid_freq\` 307 | $BB echo '{ SSeekBar:{ 308 | title:"Phase 2: Allowed Mid Frequency", 309 | default:'$AMF', 310 | action:"generic /sys/kernel/msm_thermal/conf/allowed_mid_freq", 311 | values:{' 312 | sh $DEVICE CPUFrequencyList 313 | $BB echo '} 314 | }},' 315 | fi 316 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_max_low" ]; then 317 | AMXL=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_max_low\` 318 | $BB echo '{ SSeekBar:{ 319 | title:"Phase 3: Allowed Max Low", 320 | unit:"ºC", 321 | min:40, 322 | max:100, 323 | step:1, 324 | default:'$AMXL', 325 | action:"generic /sys/kernel/msm_thermal/conf/allowed_max_low" 326 | }},' 327 | fi 328 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_max_high" ]; then 329 | AMXH=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_max_high\` 330 | $BB echo '{ SSeekBar:{ 331 | title:"Phase 3: Allowed Max High", 332 | unit:"ºC", 333 | min:40, 334 | max:100, 335 | step:1, 336 | default:'$AMXH', 337 | action:"generic /sys/kernel/msm_thermal/conf/allowed_max_high" 338 | }},' 339 | fi 340 | if [ -f "/sys/kernel/msm_thermal/conf/allowed_max_freq" ]; then 341 | AMXF=\`$BB cat /sys/kernel/msm_thermal/conf/allowed_max_freq\` 342 | $BB echo '{ SSeekBar:{ 343 | title:"Phase 3: Allowed Max Frequency", 344 | default:'$AMXF', 345 | action:"generic /sys/kernel/msm_thermal/conf/allowed_max_freq", 346 | values:{' 347 | sh $DEVICE CPUFrequencyList 348 | $BB echo '} 349 | }},' 350 | fi 351 | if [ -f "/sys/kernel/msm_thermal/conf/check_interval_ms" ]; then 352 | CIMS=\`$BB cat /sys/kernel/msm_thermal/conf/check_interval_ms\` 353 | $BB echo '{ SSeekBar:{ 354 | title:"Check Interval", 355 | unit:" ms", 356 | min:0, 357 | max:3000, 358 | step:50, 359 | default:'$CIMS', 360 | action:"generic /sys/kernel/msm_thermal/conf/check_interval_ms" 361 | }},' 362 | fi 363 | if [ -f "/sys/kernel/msm_thermal/conf/shutdown_temp" ]; then 364 | SDT=\`$BB cat /sys/kernel/msm_thermal/conf/shutdown_temp\` 365 | $BB echo '{ SSeekBar:{ 366 | title:"Shutdown Temperature", 367 | unit:"ºC", 368 | min:40, 369 | max:100, 370 | step:1, 371 | default:'$SDT', 372 | action:"generic /sys/kernel/msm_thermal/conf/shutdown_temp" 373 | }},' 374 | fi 375 | fi` 376 | `if [ -f "/sys/module/msm_thermal/parameters/enabled" ] && [ ! -f "/sys/module/msm_thermal/parameters/core_limit_temp_degC" ]; then 377 | THERMAL=\`bool /sys/module/msm_thermal/parameters/enabled\` 378 | $BB echo '{ SPane:{ 379 | title:"Temperature Throttle" 380 | }}, 381 | { SCheckBox:{ 382 | description:"SOC temperature limit toggle.", 383 | label:"Enable", 384 | default:'$THERMAL', 385 | action:"boolean /sys/module/msm_thermal/parameters/enabled" 386 | }},' 387 | fi` 388 | `if [ -f "/sys/module/msm_thermal/parameters/throttle_temp" ]; then 389 | TEMP=\`$BB cat /sys/module/msm_thermal/parameters/throttle_temp\` 390 | $BB echo '{ SPane:{ 391 | title:"Throttle Temperature" 392 | }}, 393 | { SSeekBar:{ 394 | description:"This allows to throttle the CPUs frequencies when the temperature reaches a certain degree to avoid overheating.", 395 | unit:"ºC", 396 | step:1, 397 | min:50, 398 | max:100, 399 | default:'$TEMP', 400 | action:"generic /sys/module/msm_thermal/parameters/throttle_temp" 401 | }},' 402 | fi` 403 | `if [ -f "/sys/module/msm_thermal/parameters/temp_max" ]; then 404 | TEMP=\`$BB cat /sys/module/msm_thermal/parameters/temp_max\` 405 | $BB echo '{ SPane:{ 406 | title:"Maximum Temperature" 407 | }}, 408 | { SSeekBar:{ 409 | description:"This allows to throttle the CPUs frequencies when the temperature reaches a certain degree to avoid overheating.", 410 | unit:"ºC", 411 | step:1, 412 | min:50, 413 | max:100, 414 | default:'$TEMP', 415 | action:"generic /sys/module/msm_thermal/parameters/temp_max" 416 | }},' 417 | fi` 418 | `if [ -f "/sys/module/msm_thermal/parameters/freq_limit_debug" ]; then 419 | TEMPDEBUG=\`$BB cat /sys/module/msm_thermal/parameters/freq_limit_debug\` 420 | $BB echo '{ SPane:{ 421 | title:"Frequency Limit Debug" 422 | }}, 423 | { SCheckBox:{ 424 | label:"Enable", 425 | description:"This allows to debug the CPUs throttle when the temperature reaches maximum.", 426 | default:'$TEMPDEBUG', 427 | action:"generic /sys/module/msm_thermal/parameters/freq_limit_debug" 428 | }},' 429 | fi` 430 | `if [ -f "/sys/module/msm_thermal/parameters/temp_threshold" ]; then 431 | TEMP=\`$BB cat /sys/module/msm_thermal/parameters/temp_threshold\` 432 | $BB echo '{ SPane:{ 433 | title:"Temperature Threshold" 434 | }}, 435 | { SSeekBar:{ 436 | description:"This allows to throttle the CPUs frequencies when the temperature reaches a certain degree to avoid overheating.", 437 | unit:"ºC", 438 | step:1, 439 | min:50, 440 | max:100, 441 | default:'$TEMP', 442 | action:"generic /sys/module/msm_thermal/parameters/temp_threshold" 443 | }},' 444 | fi` 445 | `if [ -f "/sys/module/msm_thermal/parameters/min_freq_index" ]; then 446 | MFI=\`$BB cat /sys/module/msm_thermal/parameters/min_freq_index\` 447 | $BB echo '{ SPane:{ 448 | title:"Temperature Limit Minimum Frequency" 449 | }}, 450 | { SSeekBar:{ 451 | description:"The minimum frequency used in throttle down before returning to max.", 452 | default:'$MFI', 453 | action:"generic /sys/module/msm_thermal/parameters/min_freq_index", 454 | values:{' 455 | sh $DEVICE MinFreqIndex 456 | echo '} 457 | }},' 458 | fi` 459 | ] 460 | } 461 | CTAG 462 | -------------------------------------------------------------------------------- /data/UKM/config.json.generate.tools: -------------------------------------------------------------------------------- 1 | cat << CTAG 2 | { 3 | name:TOOLS, 4 | elements:[ 5 | { SPane:{ 6 | title:"SELinux Status", 7 | description:"Allows you to change your SELinux (Security-Enhanced Linux) Status from Enforcing (policy is enforced) to Permissive (prints warnings instead of enforcing).", 8 | }}, 9 | { SOptionList:{ 10 | default:`getenforce`, 11 | action:"devtools selinux", 12 | values:[ Enforcing, Permissive 13 | ], 14 | }}, 15 | `if [ -f "/sys/module/selinux/parameters/force_audit" ]; then 16 | FAUDIT=\`bool /sys/module/selinux/parameters/force_audit\`; 17 | $BB echo '{ SCheckBox:{ 18 | label:"Force Audit", 19 | description:"Enable for debugging SELinux driver.", 20 | default:'$FAUDIT', 21 | action:"boolean /sys/module/selinux/parameters/force_audit" 22 | }},' 23 | fi` 24 | `if [ -f "/data/data/com.android.providers.settings/databases/settings.db" ]; then 25 | $BB echo '{ SPane:{ 26 | title:"Preferred Network Mode", 27 | description:"Use GSM_auto or CDMA_auto (depending on your network) to reduce the msm_hsic_host wakelock and save battery. More info HERE.", 28 | }}, 29 | { SOptionList:{ 30 | default:0, 31 | action:"sqlite PreferredNetworkMode", 32 | values:{ 0:"WCDMA_preferred", 1:"GSM_only", 2:"WCDMA_only", 3:"GSM_auto", 4:"CDMA_auto", 5:"CDMA_only", 6:"EvDo_only", 33 | 7:"GSM_CDMA_auto", 8:"LTE_CDMA_auto", 9:"LTE_GSM_auto", 10:"LTE_GSM_CDMA_auto", 11:"LTE_only", 12:"LTE_WDCMA", 34 | 13:"TD-SCDMA_only", 14:"TD-SCDMA_WCDMA", 15:"TD-SCDMA_LTE", 16:"TD-SCDMA_GSM", 17:"TD-SCDMA_GSM_LTE", 18:"TD-SCDMA_GSM_WCDMA", 35 | 19:"TD-SCDMA_WCDMA_LTE", 20:"TD-SCDMA_GSM_WDCMA_LTE", 21:"TD-SCDMA_GSM_WCDMA_CDMA_EvDo", 22:"TD-SCDMA_LTE_CDMA_EvDo_GSM_WCDMA" 36 | }, 37 | }},' 38 | fi` 39 | { SPane:{ 40 | title:"Advanced Tools" 41 | }}, 42 | { SDescription:{ 43 | description:"Use this button to defrag/reindex all databases found in /data & /sdcard, this increases database read/write performance. NOTE: This process can take from 1-2 minutes." 44 | }}, 45 | { SButton:{ 46 | label:"Optimize Databases", 47 | action:"devtools optimizedb" 48 | }}, 49 | { SPane:{ 50 | title:"Log Creation" 51 | }}, 52 | `if [ -f "/sys/module/logger/parameters/enabled" ]; then 53 | LOGMODE=\`$BB cat /sys/module/logger/parameters/enabled\` 54 | $BB echo '{ SOptionList:{ 55 | title:"Logcat Mode", 56 | description:"Allows you to toggle the logcat mode.", 57 | default:'$LOGMODE', 58 | action:"generic /sys/module/logger/parameters/enabled", 59 | values:{ 60 | 0:"Disabled", 1:"Enabled" 61 | } 62 | }},' 63 | fi` 64 | `if [ -f "/sys/module/logger/parameters/log_mode" ]; then 65 | LOGMODE=\`$BB cat /sys/module/logger/parameters/log_mode\` 66 | $BB echo '{ SOptionList:{ 67 | title:"Log Mode", 68 | description:"Allows you to toggle the log mode.", 69 | default:'$LOGMODE', 70 | action:"generic /sys/module/logger/parameters/log_mode", 71 | values:{ 72 | 0:"Enabled", 1:"Auto Suspend", 2:"Disabled" 73 | } 74 | }},' 75 | fi` 76 | `if [ -f "/sys/kernel/printk_mode/printk_mode" ]; then 77 | $BB echo '{ SOptionList:{ 78 | title:"Kernel Logger", 79 | description:"Allows you to toggle dmesg kernel logging.", 80 | action:"printk /sys/kernel/printk_mode/printk_mode", 81 | values:{ 82 | 0:"Disabled", 1:"Enabled" 83 | } 84 | }},' 85 | fi` 86 | { SDescription:{ 87 | description:"Save the logcat (App/system debug), dmesg (active kernel output) or last_ksmg (same as dmesg but from the last shutdown)." 88 | }}, 89 | { SButton:{ 90 | label:"Save logcat", 91 | action:"devtools logcat" 92 | }}, 93 | { SButton:{ 94 | label:"Save dmesg", 95 | action:"devtools dmesg" 96 | }}, 97 | { SButton:{ 98 | label:"Save last_kmsg", 99 | action:"devtools kmsg" 100 | }}, 101 | `if [ -e "\`sh $DEVICE DirKernelIMG\`" ]; then 102 | KERNEL=\`sh $DEVICE DirKernelIMG\` 103 | $BB echo '{ SPane:{ 104 | title:"Kernel" 105 | }}, 106 | { SOptionList:{ 107 | title:"Selected Image", 108 | description:"Choose the image you want and apply your choice in Synapse before using the action buttons below.", 109 | action:"restorebackup pickboot", 110 | default:"None", 111 | values:[ "None",' 112 | for IMG in \`$UKM/actions/restorebackup listboot\`; do 113 | echo "\"$IMG\"," 114 | done 115 | $BB echo '] 116 | }}, 117 | { SButton:{ 118 | label:"Restore Selected Kernel", 119 | action:"restorebackup flashboot '$KERNEL'" 120 | }}, 121 | { SButton:{ 122 | label:"Delete Selected Kernel", 123 | action:"restorebackup delboot", 124 | notify:[ 125 | { on:APPLY, 126 | do:[ RESET, REFRESH ], 127 | to:"restorebackup pickboot" 128 | } 129 | ] 130 | }}, 131 | { SGeneric:{ 132 | title:"Kernel Name", 133 | default:"None", 134 | action:"generic '$UKM'/files/bck_prof", 135 | }}, 136 | { SDescription:{ 137 | description:"First set a name above and apply. After this you can press the Backup Current Kernel button below." 138 | }}, 139 | { SButton:{ 140 | label:"Backup Current Kernel", 141 | action:"restorebackup keepboot '$KERNEL'", 142 | notify:[ 143 | { 144 | on:APPLY, 145 | do:[ REFRESH, APPLY ], 146 | to:"generic '$UKM'/files/bck_prof" 147 | } 148 | ] 149 | }},' 150 | fi` 151 | { SPane:{ 152 | title:"General Actions", 153 | description:"To update/refresh lists, select Restart Synapse below. To clear data, select Clear Synapse Data (fixes most common issues)." 154 | }}, 155 | { SButton:{ 156 | label:"Restart Synapse", 157 | action:"restorebackup restart" 158 | }}, 159 | { SButton:{ 160 | label:"Clear Synapse Data", 161 | action:"devtools cleardata" 162 | }}, 163 | { STitleBar:{ 164 | title:"Reboot" 165 | }}, 166 | { SButton:{ 167 | label:"Reboot Device", 168 | action:"devtools reboot" 169 | }}, 170 | { SButton:{ 171 | label:"Reboot to Recovery", 172 | action:"devtools reboot recovery" 173 | }}, 174 | { SButton:{ 175 | label:"Reboot to Bootloader", 176 | action:"devtools reboot bootloader" 177 | }} 178 | ] 179 | } 180 | CTAG -------------------------------------------------------------------------------- /data/UKM/debug/last_kmsg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/data/UKM/debug/last_kmsg -------------------------------------------------------------------------------- /data/UKM/debug/pvs_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/data/UKM/debug/pvs_bin -------------------------------------------------------------------------------- /data/UKM/debug/speed_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/data/UKM/debug/speed_bin -------------------------------------------------------------------------------- /data/UKM/device/.device.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | UKM=/data/UKM; 4 | BB=$UKM/busybox; 5 | 6 | #Official 7 | 8 | CONFIG="unified"; 9 | 10 | if [ -n "$CONFIG" ]; then PATH="$UKM/device/$CONFIG.sh"; else PATH=""; fi; 11 | 12 | $BB echo "$PATH"; 13 | -------------------------------------------------------------------------------- /data/UKM/files/bck_prof: -------------------------------------------------------------------------------- 1 | None 2 | -------------------------------------------------------------------------------- /data/UKM/files/dropcaches_prof: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/black_white_gamma.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=250 250 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=266 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=1526 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=279 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=261 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/cool_amoled.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=236 248 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=258 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=0 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=275 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=251 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/deep_natural.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=250 250 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=264 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=0 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=285 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=245 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/extreme_amoled.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=256 256 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=264 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=0 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=290 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=242 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/mamba_feat_hackarchive.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=226 215 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=260 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=10 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=265 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=247 8 | -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/stock_gamma.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=256 256 256 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=255 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=0 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=255 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=255 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/triluminos_gamma.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=256 250 251 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=260 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=1526 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=291 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=264 -------------------------------------------------------------------------------- /data/UKM/files/gamma_ak/warm_amoled.txt: -------------------------------------------------------------------------------- 1 | gamma /sys/devices/platform/kcal_ctrl.0/kcal=253 246 243 2 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_cont=258 3 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_hue=0 4 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_invert=0 5 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_min=35 6 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_sat=275 7 | gamma /sys/devices/platform/kcal_ctrl.0/kcal_val=251 -------------------------------------------------------------------------------- /data/UKM/files/gamma_prof: -------------------------------------------------------------------------------- 1 | Custom 2 | -------------------------------------------------------------------------------- /data/UKM/files/gammafaux_prof: -------------------------------------------------------------------------------- 1 | Google_Stock 255 255 255 364 32 35 116 0 31 16 80 51 3 332 64 68 118 1 0 0 48 32 1 332 64 68 118 1 0 0 48 32 1 2 | LG_Stock 255 255 255 383 114 21 118 0 0 0 80 48 2 383 114 21 118 0 0 0 80 48 2 383 114 21 118 0 0 0 80 48 2 3 | Bundi22_iPhone5 255 255 255 168 0 39 119 0 6 0 2 0 2 168 0 39 119 0 6 0 2 0 2 168 0 39 119 0 6 0 2 0 2 4 | Faux123_Accurate 255 255 255 167 64 68 118 0 18 6 83 64 2 167 64 68 118 0 18 6 83 64 2 151 64 68 118 0 18 6 83 48 2 5 | Faux123_Good 178 178 178 60 0 100 118 0 0 0 48 48 2 60 0 100 118 0 0 0 48 48 2 60 0 100 118 0 0 0 48 48 2 6 | Faux123_Nice 255 255 255 152 114 21 118 0 22 3 80 48 2 149 114 21 118 0 20 2 80 48 2 140 114 21 118 0 13 0 80 48 2 7 | Faux123_Pop 255 255 255 114 0 112 119 119 31 0 119 119 7 114 0 112 119 119 31 0 119 119 7 114 0 112 119 119 31 0 119 119 7 8 | Faux123_Vivid 255 255 255 202 114 81 118 32 31 0 32 48 2 202 114 81 118 32 31 0 32 48 2 202 114 81 118 32 31 0 32 48 2 9 | Hospital349 250 250 255 134 0 119 119 0 22 2 119 7 2 134 0 119 119 0 22 2 119 7 2 134 0 119 119 0 22 2 119 7 2 10 | KelGhu_Gamma22 255 255 255 147 0 0 71 0 3 0 71 0 2 147 0 0 71 0 3 0 71 0 2 147 0 0 71 0 3 0 71 0 2 11 | MohitGalaxy3_KelGhu_Mod 255 255 255 158 0 0 70 0 3 0 67 16 2 158 0 0 70 0 3 0 67 16 2 158 0 0 70 0 3 0 67 16 2 12 | MohitGalaxy3_Old 255 255 255 161 0 0 70 0 4 2 67 16 2 161 0 0 70 0 4 2 67 16 2 161 0 0 70 0 4 2 67 16 2 13 | MohitGalaxy3_NewStock 255 255 255 180 0 17 70 0 5 3 67 16 2 191 0 33 70 0 0 3 67 16 2 191 0 33 70 0 0 3 67 16 2 14 | MohitGalaxy3_Nexus5 255 255 255 275 0 0 70 0 20 3 84 96 2 271 0 0 70 0 16 3 84 96 2 268 0 0 70 0 16 0 84 96 2 15 | Obsanity_Amoled 255 255 255 366 0 119 119 0 0 0 119 7 2 366 0 119 119 0 0 0 119 7 2 366 0 119 119 0 0 0 119 7 2 16 | PA_Brighter 255 255 255 342 49 21 118 0 31 9 64 48 2 342 49 21 118 0 31 9 64 48 2 342 49 21 118 0 31 9 64 48 2 17 | PA_Contrast 255 255 255 390 64 68 118 0 26 0 64 48 2 390 64 68 118 0 26 0 64 48 2 390 64 68 118 0 26 0 64 48 2 18 | PA_HalfBreed 255 255 255 378 64 68 118 0 25 4 66 32 1 378 64 68 118 0 25 4 66 32 1 378 64 68 118 0 25 4 66 32 1 19 | -------------------------------------------------------------------------------- /data/UKM/files/gammafrancoN5_prof: -------------------------------------------------------------------------------- 1 | Google_Stock 86 87 89 91 94 96 101 109 111 121 126 131 120 116 110 99 84 71 61 52 40 33 20 86 87 89 91 94 96 101 109 111 121 126 131 120 116 110 99 84 71 61 52 40 33 20 71 73 75 78 81 84 90 100 105 117 124 130 121 117 111 100 85 73 64 58 50 37 21 71 73 75 78 81 84 90 100 105 117 124 130 121 117 111 100 85 73 64 58 50 37 21 0 10 17 27 37 45 56 72 83 101 112 121 128 123 117 106 91 78 68 62 53 38 22 0 10 17 27 37 45 56 72 83 101 112 121 128 123 117 106 91 78 68 62 53 38 22 32 2 | 0rigin 90 91 93 95 98 100 105 113 115 124 130 133 119 114 108 93 76 66 57 48 36 29 16 90 91 93 95 98 100 105 113 115 124 130 133 119 114 108 93 76 66 57 48 36 29 16 84 85 86 88 91 94 101 110 114 124 131 134 117 113 108 95 79 70 63 57 49 36 20 84 85 86 88 91 94 101 110 114 124 131 134 117 113 108 95 79 70 63 57 49 36 20 0 10 17 27 37 45 57 74 85 103 116 123 127 121 115 101 86 76 67 61 52 37 21 0 10 17 27 37 45 57 74 85 103 116 123 127 121 115 101 86 76 67 61 52 37 21 31 3 | Aditya_AMOLEDDARKS 2 11 22 33 44 55 67 78 89 101 111 122 122 111 100 89 78 67 55 44 33 22 11 4 11 22 33 44 55 67 78 89 100 111 122 122 111 100 89 78 67 55 44 33 22 11 4 11 22 33 44 55 67 78 89 100 111 122 122 111 100 89 78 67 55 44 33 22 11 2 11 22 33 44 55 67 78 89 101 111 122 122 111 100 89 78 67 55 44 33 22 11 0 11 22 33 44 55 67 78 89 101 111 122 122 111 100 89 78 67 55 44 33 22 11 0 11 22 33 44 55 67 78 89 102 111 122 122 111 100 89 78 67 55 44 33 22 11 28 4 | Aditya_TRUERGB 2 10 17 27 37 45 56 72 83 98 112 121 128 123 117 106 91 78 68 62 53 38 22 4 10 17 27 37 45 56 72 83 100 112 121 128 123 117 106 91 78 68 62 53 38 22 4 10 17 27 37 45 56 72 83 101 112 121 128 123 117 106 91 78 68 62 53 38 22 2 10 17 27 37 45 56 72 83 103 112 121 128 123 117 106 91 78 68 62 53 38 22 0 10 17 27 37 45 56 72 83 101 112 121 128 123 117 106 91 78 68 62 53 38 22 0 10 17 27 37 45 56 72 83 103 112 121 128 123 117 106 91 78 68 62 53 38 22 28 5 | Faux123 78 87 89 91 94 96 101 109 111 123 126 131 120 116 110 99 84 71 61 52 40 33 20 78 87 89 91 94 96 101 109 111 123 126 131 120 116 110 99 84 71 61 52 40 33 20 73 73 75 78 81 84 90 100 105 117 124 130 121 117 111 100 85 73 64 58 50 37 21 73 73 75 78 81 84 90 100 105 117 124 130 121 117 111 100 85 73 64 58 50 37 21 0 10 17 27 37 45 56 72 83 107 112 121 128 123 117 106 91 78 68 62 53 38 22 0 10 17 27 37 45 56 72 83 100 112 121 128 123 117 106 91 78 68 62 53 38 22 30 6 | iPhone 255 87 89 91 94 96 101 109 111 255 126 131 120 116 110 99 84 71 61 52 40 33 20 255 87 89 91 94 96 101 109 111 255 126 131 120 116 110 99 84 71 61 52 40 33 20 255 73 75 78 81 84 90 100 105 0 124 130 121 117 111 100 85 73 64 58 50 37 21 0 73 75 78 81 84 90 100 105 255 124 130 121 117 111 100 85 73 64 58 50 37 21 0 10 17 27 37 45 56 72 83 255 112 121 128 123 117 106 91 78 68 62 53 38 22 255 10 17 27 37 45 56 72 83 0 112 121 128 123 117 106 91 78 68 62 53 38 22 32 7 | Nexu5mag 90 91 93 95 98 100 105 114 116 131 131 135 117 112 106 92 75 65 56 48 36 29 16 90 91 93 95 98 100 105 114 116 131 131 135 117 112 106 92 75 65 56 48 36 29 16 84 85 86 88 91 94 101 111 115 131 132 136 115 111 106 94 78 69 63 57 49 36 20 84 85 86 88 91 94 101 111 115 131 132 136 115 111 106 94 78 69 63 57 49 36 20 0 10 17 27 37 45 57 75 86 114 117 125 125 119 113 100 85 75 67 61 52 37 21 0 10 17 27 37 45 57 75 86 114 117 125 125 119 113 100 85 75 67 61 52 37 21 32 8 | NexusManiac 81 87 89 91 94 96 101 109 111 118 126 131 120 116 110 99 84 71 61 52 40 33 20 81 87 89 91 94 96 101 109 111 118 126 131 120 116 110 99 84 71 61 52 40 33 20 69 73 75 78 81 84 90 100 105 119 124 130 121 117 111 100 85 73 64 58 50 37 21 69 73 75 78 81 84 90 100 105 117 124 130 121 117 111 100 85 73 64 58 50 37 21 0 10 17 27 37 45 56 72 83 99 112 121 128 123 117 106 91 78 68 62 53 38 22 0 10 17 27 37 45 56 72 83 102 112 121 128 123 117 106 91 78 68 62 53 38 22 29 9 | Piereligio_True_RGB_V7 0 12 19 30 39 48 56 72 82 104 118 127 119 116 115 106 84 78 66 60 44 35 20 0 12 19 30 39 48 56 72 82 104 118 131 120 116 114 107 100 78 66 60 44 35 20 0 12 20 31 40 55 62 76 89 109 123 132 115 113 111 103 78 75 67 58 49 39 21 0 12 20 31 40 55 62 79 84 109 123 134 116 112 112 104 101 76 67 58 49 39 21 0 12 19 30 39 48 56 72 83 105 119 130 119 115 116 106 88 80 71 62 52 42 25 0 12 19 30 39 48 56 72 83 105 121 130 118 115 114 108 100 80 66 60 48 38 22 32 10 | The_Gingerbread_Man_23 0 12 23 34 45 57 68 79 90 111 112 124 121 111 101 91 81 71 63 55 43 32 20 0 12 23 34 45 57 68 79 90 111 112 124 121 111 101 91 81 71 63 55 43 32 20 0 12 24 37 48 60 71 83 94 114 117 127 117 108 98 90 80 71 62 54 43 32 21 0 12 24 37 48 60 71 83 94 114 117 127 117 108 98 90 80 71 62 54 43 32 21 0 12 25 37 50 61 73 85 96 121 116 126 118 109 100 92 83 74 64 56 45 33 22 0 12 25 37 50 61 73 85 96 121 116 126 118 109 100 92 83 74 64 56 45 33 22 32 11 | Piereligio_True_RGB_V7 0 12 19 30 39 48 56 72 82 104 118 127 119 116 115 106 84 78 66 60 44 35 20 0 12 19 30 39 48 56 72 82 104 118 131 120 116 114 107 100 78 66 60 44 35 20 0 12 20 31 40 55 62 76 89 109 123 132 115 113 111 103 78 75 67 58 49 39 21 0 12 20 31 40 55 62 79 84 109 123 134 116 112 112 104 101 76 67 58 49 39 21 0 12 19 30 39 48 56 72 83 105 119 130 119 115 116 106 88 80 71 62 52 42 25 0 12 19 30 39 48 56 72 83 105 121 130 118 115 114 108 100 80 66 60 48 38 22 32 12 | Vomer_AMOLED 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 0 12 24 36 48 60 73 84 96 108 119 130 110 96 82 67 53 40 32 26 21 15 10 32 13 | Vomer_Balanced 0 12 19 30 39 48 56 72 83 105 118 126 121 114 109 102 93 73 63 54 40 33 20 0 12 19 30 39 48 56 72 83 105 118 130 121 115 114 102 82 76 63 54 40 33 20 0 12 19 30 39 54 61 78 84 107 123 132 117 110 108 97 90 71 61 52 45 37 21 0 12 19 30 39 54 61 78 84 107 121 130 119 112 107 99 76 72 57 50 45 37 21 0 12 19 30 39 48 56 72 83 105 121 126 119 112 107 99 91 71 63 53 44 36 22 0 12 19 30 39 48 56 72 83 105 121 134 119 113 110 98 78 72 59 50 44 36 22 32 14 | Vomer_Medium 43 50 57 64 71 78 88 96 105 114 122 130 114 104 94 84 74 65 54 45 37 28 20 43 50 57 64 71 78 88 96 105 114 122 130 114 104 94 84 74 65 54 45 37 28 20 35 42 50 57 65 72 83 92 102 112 121 130 114 104 95 85 75 66 55 46 38 29 21 35 42 50 57 65 72 83 92 102 112 121 130 114 104 95 85 75 66 55 46 38 29 21 0 10 21 31 42 52 65 77 89 102 113 125 119 109 99 88 78 69 58 49 39 30 22 0 10 21 31 42 52 65 77 89 102 113 125 119 109 99 88 78 69 58 49 39 30 22 32 15 | Yorici_Calibrated_Punch 0 14 19 33 41 46 60 77 88 105 116 123 125 119 111 95 76 57 41 36 24 15 5 0 14 18 31 41 47 59 77 88 105 116 125 125 119 111 95 75 56 48 37 26 15 5 0 20 31 43 50 57 67 84 95 111 120 128 122 116 109 93 73 55 41 34 24 10 5 0 20 30 43 50 57 67 85 95 110 121 128 122 116 108 94 74 55 43 35 26 10 5 0 18 23 36 45 54 63 81 91 107 118 126 124 118 110 93 73 56 43 36 25 10 5 0 18 23 36 45 54 63 80 91 107 118 126 124 118 110 94 74 57 43 35 26 10 5 31 16 | -------------------------------------------------------------------------------- /data/UKM/files/gammafranco_prof: -------------------------------------------------------------------------------- 1 | Google_Stock 255 255 255 64 68 118 32 64 68 118 32 32 35 116 51 0 0 48 2 | LG_Stock 255 250 245 114 21 118 48 114 21 118 48 114 21 118 48 0 0 80 3 | Bundi22_GalaxyS3 255 255 255 0 87 119 0 0 87 119 0 0 87 119 0 6 0 1 4 | Bundi22_iPhone5 255 255 255 0 39 119 0 0 39 119 0 0 39 119 0 6 0 2 5 | Hospital349 250 250 255 0 119 119 7 0 119 119 7 0 119 119 7 22 2 119 6 | Hospital349_Summertime 250 250 255 0 119 119 2 0 119 119 2 0 119 119 2 7 7 7 7 | KelGhu_Gamma22 255 255 255 0 0 71 0 0 0 71 0 0 0 71 0 3 0 71 8 | MohitGalaxy3_Neutral 220 225 220 4 87 119 5 4 87 119 5 4 87 119 5 0 8 87 9 | MohitGalaxy3_S4 255 255 250 0 119 119 23 0 119 119 23 0 119 119 23 15 0 71 10 | Obsanity_Amoled 255 255 255 0 119 119 7 0 119 119 7 0 119 119 7 0 0 119 11 | PA_Brighter 245 244 240 49 21 118 48 49 21 118 48 49 21 118 48 31 9 64 12 | PA_Contrast 245 244 240 64 68 118 48 64 68 118 48 64 68 118 48 26 0 64 13 | PA_HalfBreed 255 255 255 32 68 118 64 32 68 118 64 32 68 118 64 25 4 66 14 | -------------------------------------------------------------------------------- /data/UKM/files/lmk_prof: -------------------------------------------------------------------------------- 1 | Custom 2 | -------------------------------------------------------------------------------- /data/UKM/files/sound_prof: -------------------------------------------------------------------------------- 1 | Custom 2 | -------------------------------------------------------------------------------- /data/UKM/files/speaker_prof: -------------------------------------------------------------------------------- 1 | Custom 2 | -------------------------------------------------------------------------------- /data/UKM/files/volt_prof: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /data/UKM/files/wake_prof: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /data/UKM/sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/data/UKM/sqlite3 -------------------------------------------------------------------------------- /data/UKM/uci: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | UKM=/data/UKM; 4 | BB=$UKM/busybox; 5 | DEVICE=`sh $UKM/device/.device.sh`; 6 | 7 | UCI_CONFIG=$UKM/config.json; 8 | UCI_ACTION=$UKM/actions/; 9 | UCI_DEVICE=$UKM/device/; 10 | UCI_FILES=$UKM/files/; 11 | DEBUG=$UKM/debug; 12 | SYNAPSE_SD_DIR=/sdcard/Synapse; 13 | 14 | if [ ! -f $UCI_CONFIG ]; then 15 | $BB mount -t rootfs -o rw,remount rootfs; 16 | $BB chmod -R 755 $UCI_ACTION $UCI_DEVICE $UCI_FILES; 17 | 18 | [ ! -d "$SYNAPSE_SD_DIR/UKM" ] && $BB mkdir -p "$SYNAPSE_SD_DIR/UKM"; 19 | KERNEL_CURR=`$BB cat /proc/version 2> /dev/null`; 20 | 21 | if [ ! -f "$SYNAPSE_SD_DIR/UKM/last_kernel" ]; then 22 | $BB rm -R /data/data/com.af.synapse/databases; 23 | $BB echo "$KERNEL_CURR" > $SYNAPSE_SD_DIR/UKM/last_kernel; 24 | else 25 | KERNEL_LAST=`$BB cat $SYNAPSE_SD_DIR/UKM/last_kernel 2> /dev/null`; 26 | 27 | if [ "$KERNEL_CURR" != "$KERNEL_LAST" ]; then 28 | $BB rm -R /data/data/com.af.synapse/databases; 29 | $BB echo "$KERNEL_CURR" > $SYNAPSE_SD_DIR/UKM/last_kernel; 30 | fi 31 | fi 32 | 33 | if [ ! -f $DEBUG/pvs_bin ]; then 34 | PVS=`$BB dmesg | $BB grep "\`sh $DEVICE DebugPVS\`"`; 35 | $BB echo ${PVS##*:} > $DEBUG/pvs_bin; 36 | fi 37 | 38 | if [ ! -f $DEBUG/speed_bin ]; then 39 | SPEED=`$BB dmesg | $BB grep "\`sh $DEVICE DebugSPEED\`"`; 40 | $BB echo ${SPEED##*:} > $DEBUG/speed_bin; 41 | fi 42 | 43 | if [ ! -f $DEBUG/last_kmsg ]; then 44 | LAST_KMSG=`$BB tail -n 1 /proc/last_kmsg 2> /dev/null`; 45 | $BB echo $LAST_KMSG > $DEBUG/last_kmsg; 46 | fi 47 | 48 | source $UKM/config.json.generate > $UCI_CONFIG; 49 | 50 | $BB mount -t rootfs -o ro,remount rootfs; 51 | fi; 52 | 53 | case "${1}" in 54 | config) 55 | $BB cat $UCI_CONFIG;; 56 | configpath) 57 | $BB echo $UCI_CONFIG;; 58 | actionpath) 59 | $BB echo $UCI_ACTION;; 60 | reset) 61 | $BB mount -t rootfs -o rw,remount rootfs; 62 | $BB rm -f $UCI_CONFIG; 63 | $BB mount -t rootfs -o ro,remount rootfs;; 64 | esac; 65 | -------------------------------------------------------------------------------- /system/app/Synapse/Synapse.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yarpiin/UKM-unified/0d85cd462c3fc6dd7a69b8ab7bb1c2ff3d7c3ef3/system/app/Synapse/Synapse.apk --------------------------------------------------------------------------------