daily pastebin goal
30%
SHARE
TWEET

VidOn Box Tweaks

a guest Jul 16th, 2015 444 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. # scaling governor switch, enable all cpus and change freq to 1.2Ghz (instead of 1.08Ghz)
  3. #!/system/bin/sh
  4. echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  5. echo 1 > /sys/devices/system/cpu/cpu0/online
  6. echo 1 > /sys/devices/system/cpu/cpu1/online
  7. echo 1 > /sys/devices/system/cpu/cpu2/online
  8. echo 1 > /sys/devices/system/cpu/cpu3/online
  9. echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  10.  
  11. #script to renice processes to give the UI/IO one a higher priority (negative is higher than positive)
  12. # while giving some processes a lower priority
  13. (while :
  14. do
  15.    # surfaceflinger
  16.    PID=`pgrep -f "surfaceflinger"`
  17.    busybox renice -17 -p ${PID}
  18.  
  19.    # google process
  20.    PID=`pgrep -f "com.google.process.location"`
  21.    busybox renice 19 -p ${PID}
  22.    PID=`pgrep -f "com.google.android.gms"`
  23.    busybox renice 8 -p ${PID}
  24.  
  25.    # pvr (powervr gpu)
  26.    PID=`pgrep -f "pvr"`
  27.    busybox renice -20 -p ${PID}
  28.  
  29.    # mmcqd (file io)
  30.    PID=`pgrep -f "mmcqd"`
  31.    busybox renice 16 -p ${PID}
  32.  
  33.    # others
  34.    PID=`pgrep -f "schw"`
  35.    busybox renice -18 -p ${PID}
  36.  
  37.    PID=`pgrep -f "ueventd"`
  38.    busybox renice -18 -p ${PID}
  39.  
  40.    sleep 180
  41. done) &
  42.  
  43.  
  44. # script to change the framebufer to 1080p/60
  45. #!/system/bin/sh
  46. fbset -fb /dev/graphics/fb0 -g 1920 1080 1920 2160 32 -t 6734 148 88 36 4 44 5 -hsync high
  47. echo 'U:1920x1080p-60' > /sys/devices/platform/disp/graphics/fb0/mode
  48.  
  49.  
  50. #script to change kernel/net parameters (note: I disabled ipv6 since I don't use it)
  51. #!/system/bin/sh
  52. sysctl -w kernel.msgmni=1024;
  53. sysctl -w kernel.msgmax=64000;
  54. sysctl -w kernel.shmmax=268435456;
  55. sysctl -w kernel.shmall=2097152;
  56. sysctl -w kernel.sem="500 512000 100 2048";
  57. sysctl -w net.core.optmem_max=20480;
  58. sysctl -w net.unix.max_dgram_qlen=50;
  59. sysctl -w net.core.wmem_max=524288;
  60. sysctl -w net.core.rmem_max=524288;
  61. sysctl -w net.core.rmem_default=256960;
  62. sysctl -w net.core.wmem_default=256960;
  63. sysctl -w fs.lease-break-time=10;
  64. sysctl -w fs.file-max=65536;
  65. sysctl -w vm.overcommit_memory=1;
  66. sysctl -w vm.min_free_order_shift=4;
  67. sysctl -w vm.block_dump=0;
  68. sysctl -w vm.oom_dump_tasks=1;
  69. sysctl -w vm.page-cluster=3;
  70. sysctl -w net.ipv4.conf.all.rp_filter=1;
  71. sysctl -w net.ipv4.conf.default.rp_filter=1;
  72. sysctl -w net.ipv4.tcp_synack_retries=2;
  73. sysctl -w net.ipv4.tcp_syn_retries=2;
  74. sysctl -w net.ipv4.tcp_max_syn_backlog=1024;
  75. sysctl -w net.ipv4.tcp_max_tw_buckets=16384;
  76. sysctl -w net.ipv4.icmp_echo_ignore_all=1;
  77. sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1;
  78. sysctl -w net.ipv4.tcp_no_metrics_save=1;
  79. sysctl -w net.ipv4.tcp_fin_timeout=15;
  80. sysctl -w net.ipv4.tcp_keepalive_time=1800;
  81. sysctl -w net.ipv4.ip_forward=0;
  82. sysctl -w net.ipv4.tcp_moderate_rcvbuf=1;
  83. sysctl -w net.ipv4.route.flush=1;
  84. sysctl -w net.ipv4.udp_rmem_min=6144;
  85. sysctl -w net.ipv4.udp_wmem_min=6144;
  86. sysctl -w net.ipv4.tcp_rfc1337=1;
  87. sysctl -w net.ipv4.ip_no_pmtu_disc=0;
  88. sysctl -w net.ipv4.tcp_ecn=0;
  89. sysctl -w net.ipv4.tcp_sack=1;
  90. sysctl -w net.ipv4.tcp_fack=1;
  91. sysctl -w net.ipv4.conf.default.accept_source_route=0 ;
  92. sysctl -w net.ipv4.conf.all.accept_source_route=0;
  93. sysctl -w net.ipv4.conf.all.accept_redirects=0;
  94. sysctl -w net.ipv4.conf.default.accept_redirects=0;
  95. sysctl -w net.ipv4.conf.all.secure_redirects=0;
  96. sysctl -w net.ipv4.conf.default.secure_redirects=0;
  97. sysctl -w net.ipv6.conf.all.disable_ipv6=1;
  98. sysctl -w net.ipv6.conf.default.disable_ipv6=1;
  99. sysctl -w net.ipv6.conf.lo.disable_ipv6=1;
  100.  
  101. # script I found on the net (XDA forum) to clear the memory cache
  102. #!/system/bin/sh
  103. # Adrenaline Boost V3
  104. # Brought To You By Imbawind@XDA Developers
  105. clear
  106. echo "=======================";
  107. echo "= Adrenaline Boost V3 =";
  108. echo "=======================";
  109. echo "";
  110. free | awk '/Mem/{print "Free Memory (Before Boost) : "$4/1024" MB";}'
  111. echo "";
  112. echo "";
  113. echo "";
  114. echo -n " Working";
  115. sync;
  116. sleep 1
  117. echo -n ".";
  118. echo "3" > /proc/sys/vm/drop_caches;
  119. sleep 1
  120. echo -n ".";
  121. dc=/proc/sys/vm/drop_caches
  122. dc_v=`cat $dc`
  123. if [ "$dc_v" -gt 1 ]; then
  124.         echo "1" > /proc/sys/vm/drop_caches;
  125. else
  126.         echo " Error When Boosting ! ";
  127.         exit
  128. fi
  129. sleep 1
  130. echo -n ".";
  131. echo "";
  132. sleep 1
  133. echo " [ -=|Adrenaline Boosted|=- ] ";
  134. echo "";
  135. echo "";
  136. echo "";
  137. free | awk '/Mem/{print "Free Memory (After Boost) : "$4/1024" MB";}'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top