[Galaxy Tab 7.7 Android Development] UpInTheAir:
v4.6.0 update

>> v4.6.0 UPDATE <<

NOT PESONALLY TESTED

CHANGES

ON P6800 PARTITION !!

** FOR P6800 partitioned device running JB 4.1.2 DXMD3 ROM !! **

1. Read warnings in Post #3 before flashing. I am not responsible, you are

2. Clear your CPU Control app defaults first. device settings/applications/all/"your control app"/clear data

3. You will need a CPU control app to adjust the CPU freq from the safe startup values (OC / UV / UC)

4. Recommend 200-1400 -or- 200-1600 MHz

5. Recommended governors etc = Read Post #3

** DO NOT USE ANY 3RD PARTY TWEAKS OR “PERFORMANCE” TYPE APPS & REMOVE

ALL

PREVIOUS SkyHigh ROM SCRIPTS FROM /system/etc/init.d FOLDER (EXCEPT: sqlite & ziplaign are OK) **

CHANGE-LOG v4.4.0 > v4.6.0

** Source changes as per gitHub

* ARM: 7746/1: mm: lazy cache flushing on non-mapped pages [dorimanx]

* mali: update gpu dvfs table voltages as soon as the driver is initialized [gokanmoral]

* UV GPU idle voltage 1000 > 950 mV

* fs: exFAT: update to v1.2.5 & in-build modules [Samsung OSRC – AndiP]

- not tested on USB-OTG, but should be OK

* mach-exynos: busfreq: add sysfs undervolt option using asv table [simone201]

- Be careful, memory may be more sensitive to voltage changes

# [COLOR="Red"]default group = 1 (stock)[/COLOR]
# available group options 1 > 7
echo “1” > /sys/devices/system/cpu/cpufreq/busfreq_asv_group

# L0 = 400 L1 = 267 L2 = 160 MHz

1> {1150000, 1050000, 1050000} default / stock

2 > {1125000, 1025000, 1025000}

3 > {1100000, 1000000, 1000000}

4 > {1075000, 975000, 975000}

5 > {1050000, 950000, 950000}

6 > {1025000, 950000, 925000}

7 > {1000000, 925000, 900000}

* allow memory UV to min 900 mV

* staging: android: lowmemorykiller: Don't count reserved free memory [dorimanx]

* fs: vfat: reduce the worst case latencies [Christopher83]

* writeback: Fix occasional slow sync(1) [Christopher83]

* zram: change ratio to 90% for bad compress [Christopher83]

* mali: make GPU vpll optional sysfs via init.d script [gokanmoral]

- For devices that can't handle vpll mode – use mpll instead

- http://xdaforums.com/showpost.php?p=33720501&postcount=4181&nocache=1&z=1048045007703282

# vpll or mpll mode
# vpll = 1 (default)
# mpll = 0
echo "0" > /sys/module/mali/parameters/mali_use_vpll

* page-writeback.c: subtract min_free_kbytes from dirtyable memory [temasek]

* fs/dcache.c: adaptive vfs_cache_pressure on suspend / resume [dorimanx]

Hard coded:

- Set to 10 save battery on device suspend

- Set to 60 for better smoothness on device wake

Low vfs_cache pressure values save battery while idle, while

a low value also causes stutter with longer up times.

* staging: android: lowmemorykiller: well-marked debug print [temasek]

Add lowmemorykiller: prefix to the debug print so it's easier to analyse LMK's debug output:

dmesg | grep lowmemorykiller

* mach-exynos: busfreq: add sysfs option for up & down thresholds [dorimanx]

- dorimanx kernel tweaked to 30, SkyHigh unchanged for now

# default = 23 (stock)

echo “30” > /sys/devices/system/cpu/cpufreq/busfreq_down_threshold
echo “30” > /sys/devices/system/cpu/cpufreq/busfreq_up_threshold

* fix KSM [Jeeko]

- working now. Still enabled by default

** initramfs changes

* update to SuperSU app & su binary v1.91 [Chainfire]

- will only install if NO SuperSU app or binary are found

* Smoothness tweak values from CrossBreeder [idcrisis]

/system/bin/setprop ro.min.fling_velocity 8000
/system/bin/setprop ro.max.fling_velocity 12000

* Free pagecache. dentries and inodes will be managed by /proc/sys/vm/vfs_cache_pressure [LeonardLuangga]

echo "1" > /proc/sys/vm/drop_caches

* Almost all V6SuperCharger, KAK, & 3GTurboCharger values implemented [zeppelinrox@XDA].

- Removed some code not able to write to kernel & adjusted / disabled some to suit.

* Virtual memory & kernel tweaks

# values from V6SuperCharger & Kick Ass Kernelizer [zeppelinrox@XDA]
echo "10" > /proc/sys/fs/lease-break-time
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/vm/block_dump
echo "60" > /proc/sys/vm/dirty_background_ratio
echo "95" > /proc/sys/vm/dirty_ratio
echo "0" > /proc/sys/vm/laptop_mode
echo "15360" > /proc/sys/vm/min_free_kbytes
echo "4" > /proc/sys/vm/min_free_order_shift
echo "0" > /proc/sys/vm/oom_dump_tasks
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "1" > /proc/sys/vm/overcommit_memory
echo "0" > /proc/sys/vm/panic_on_oom
#echo "20" > /proc/sys/vm/swappiness ########### Already implemented
#echo "10" > /proc/sys/vm/vfs_cache_pressure ########### Implemented adaptive vfs_cache_pressure on suspend (10) / resume (60)

* Misc tweaks for battery life

# values from V6SuperCharger & Kick Ass Kernelizer [zeppelinrox@XDA]
#
echo "65536" > /proc/sys/kernel/msgmax
echo "2048" > /proc/sys/kernel/msgmni
echo "500 512000 64 2048" > /proc/sys/kernel/sem
echo "2097152" > /proc/sys/kernel/shmall
echo "268435456" > /proc/sys/kernel/shmmax
echo "4096" > /proc/sys/kernel/shmmni
#
echo "524288" > /proc/sys/fs/file-max
echo "32000" > /proc/sys/fs/inotify/max_queued_events
echo "256" > /proc/sys/fs/inotify/max_user_instances
echo "10240" > /proc/sys/fs/inotify/max_user_watches
echo "0" > /proc/sys/kernel/sched_child_runs_first
echo "524288" > /proc/sys/kernel/threads-max

* TCP Speed & Security

# values from V6SuperCharger & Kick Ass Kernelizer [zeppelinrox@XDA]
# 3G TurboCharger Enhancement
#
# Google's public DNS settings
#
/system/bin/setprop net.dns1 8.8.8.8 ########### Not sticking
/system/bin/setprop net.dns2 8.8.4.4
#
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax
/system/bin/setprop net.tcp.buffersize.default 6144,87380,110208,6144,16384,110208
/system/bin/setprop net.tcp.buffersize.wifi 262144,524288,1048576,262144,524288,1048576
/system/bin/setprop net.tcp.buffersize.lte 262144,524288,3145728,262144,524288,3145728
/system/bin/setprop net.tcp.buffersize.hsdpa 6144,262144,1048576,6144,262144,1048576
/system/bin/setprop net.tcp.buffersize.evdo_b 6144,262144,1048576,6144,262144,1048576
/system/bin/setprop net.tcp.buffersize.umts 6144,87380,110208,6144,16384,110208
/system/bin/setprop net.tcp.buffersize.hspa 6144,87380,262144,6144,16384,262144
/system/bin/setprop net.tcp.buffersize.gprs 6144,8760,11680,6144,8760,11680
/system/bin/setprop net.tcp.buffersize.edge 6144,26280,35040,6144,16384,35040
#
# Queue size modifications
echo "20480" > /proc/sys/net/core/optmem_max
#echo "262144" > /proc/sys/net/core/rmem_default
echo "1048576" > /proc/sys/net/core/rmem_max
#echo "262144" > /proc/sys/net/core/wmem_default
echo "1048576" > /proc/sys/net/core/wmem_max
echo "50" > /proc/sys/net/unix/max_dgram_qlen
#
# Be sure that autotuning is in effect
echo "1" > /proc/sys/net/ipv4/tcp_moderate_rcvbuf
#
echo "0" > /proc/sys/net/ipv4/ip_no_pmtu_disc
echo "1" > /proc/sys/net/ipv4/route/flush
echo "0" > /proc/sys/net/ipv4/tcp_ecn
echo "1" > /proc/sys/net/ipv4/tcp_fack
echo "1" > /proc/sys/net/ipv4/tcp_rfc1337
#echo "6144 87380 1048576" > /proc/sys/net/ipv4/tcp_rmem ########### Not sticking
echo "1" > /proc/sys/net/ipv4/tcp_sack
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
#echo "6144 87380 1048576" > /proc/sys/net/ipv4/tcp_wmem ########### Not sticking
echo "6144" > /proc/sys/net/ipv4/udp_rmem_min
echo "6144" > /proc/sys/net/ipv4/udp_wmem_min
#
# Re-use sockets in time-wait state
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
#
# Hardening the TCP/IP stack to SYN attacks
echo "1024" > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo "2" > /proc/sys/net/ipv4/tcp_syn_retries
echo "2" > /proc/sys/net/ipv4/tcp_synack_retries
#
# Bump up tw_buckets in case we get DoS'd
echo "16384" > /proc/sys/net/ipv4/tcp_max_tw_buckets
#
# Ignore pings
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
#
# Don't reply to broadcasts (prevents joining a smurf attack)
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
#
# Enable bad error message protection (should be enabled by default)
echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
#
# Don't cache connection metrics from previous connection
echo "1" > /proc/sys/net/ipv4/tcp_no_metrics_save
#
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "1800" > /proc/sys/net/ipv4/tcp_keepalive_time
#
# Don't pass traffic between networks or act as a router
# Disable IP Packet forwarding (should be disabled already)
echo "0" > /proc/sys/net/ipv4/ip_forward
#
echo "0" > /proc/sys/net/ipv4/conf/all/send_redirects
echo "0" > /proc/sys/net/ipv4/conf/default/send_redirects
#
# Enable spoofing protection (turn on reverse packet filtering)
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter
#
# Don't accept source routing
echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route
echo "0" > /proc/sys/net/ipv4/conf/default/accept_source_route
#
# Don't accept redirects
echo "0" > /proc/sys/net/ipv4/conf/all/accept_redirects
echo "0" > /proc/sys/net/ipv4/conf/all/secure_redirects
echo "0" > /proc/sys/net/ipv4/conf/default/accept_redirects
echo "0" > /proc/sys/net/ipv4/conf/default/secure_redirects

INSTALLATION

** DO NOT USE ANY 3RD PARTY TWEAKS OR “PERFORMANCE” TYPE APPS & REMOVE

ALL

PREVIOUS SkyHigh ROM SCRIPTS FROM /system/etc/init.d FOLDER (EXCEPT: sqlite & ziplaign are OK) **

1. NANDROID (just in case)

2. Have installed any P6800 JB 4.1.2 ROM based from official Samsung sources

3. Remove any previous CPU control settings from starting at boot, remove any 3rd party tweaks etc

4. Flash in :

a) CWM.zip in custom recovery (CWM or TWRP)

-or-

b) ODIN.tar in Odin [PDA] / Mobile Odin
​

5. If requested by Recovery to install SU, DO NOT. Instead - Let the kernel do it on boot

SUGGESTED CPU CONTROL APP : Trickster Mod app

Don't forget to use only one Control app at a time. They will conflict !

CURRENT BUGS :

* Random screen tint (Read Post #3)

ISSUES?

* READ POST #1, #2 & #3 FIRST

CHEERS :D

UITA

.