Overview
TCP Optimiser Module, developed by fatalcoder524, optimizes Android networking by dynamically switching TCP congestion control algorithms and queuing disciplines (qdisc) according to the device’s currently active network interface.
Modern mobile kernels often include Google’s BBR (Bottleneck Bandwidth and RTT) algorithm. While BBR delivers massive throughput gains (often 50–60 Mbps higher upload speeds) over stable Wi-Fi connections compared to traditional Cubic, BBR can struggle on cellular networks where radio signal fluctuations and transient packet drops cause unexpected latency penalties. TCP Optimiser solves this by monitoring network interface transitions, automatically applying BBR to Wi-Fi and Cubic to mobile data.
Prerequisites & Compatibility
- Root Solution: Compatible with Magisk, KernelSU, and APatch.
- Kernel Requirements: The device kernel must have the desired TCP congestion algorithms compiled in (
CONFIG_TCP_CONG_BBR,CONFIG_TCP_CONG_CUBIC, etc.). If an algorithm is not compiled in your kernel, the module falls back gracefully to system defaults.
There are no documented module conflicts.
Configuration & Tuning
TCP Optimiser can be controlled via its dedicated WebUI or directly via file descriptors in:
/data/adb/modules/tcp_optimiser/
Tuning via File Descriptors
The module generates two interface template files in its directory:
wlan_{algo}_{qdisc}: Governs Wi-Fi interfaces.rmnet_data_{algo}_{qdisc}: Governs cellular interfaces.
To modify the active configuration:
- Change Algorithm: Rename the
{algo}section (e.g., changewlan_cubic_fqtowlan_bbr_fq). Supported values includebbr,cubic,westwood,reno, and any algorithm listed in/proc/sys/net/ipv4/tcp_available_congestion_control. - Change Queuing Discipline: Rename the
{qdisc}section to your preferred packet queue (e.g.,fq,fq_codel,pfifo_fast). - Maximize Initial Windows: Create an empty file named
initcwnd_initrwndin the module directory to set initial congestion and receive windows to maximum values. - Immediate Application: Create an empty file named
force_applyto apply adjustments immediately without a reboot. - Connection Reset (Caution): Create an empty file named
kill_connectionsif you want existing TCP sockets terminated during interface handover. (Disabled by default to avoid interrupting background downloads).
Tuning via WebUI
For a graphical experience:
- Open the WebUI via KernelSU or APatch manager, or using KSUWebUIStandalone on Magisk.
- Adjust sliders and dropdown menus for cellular and Wi-Fi profiles.
Troubleshooting & Verification
- Verify Active Algorithm: Check which algorithm is currently active for your network:
su -c sysctl net.ipv4.tcp_congestion_control - Inspect Module Execution Logs:
cat /data/adb/modules/tcp_optimiser/service.log - Requested Algorithm Not Applying: If an algorithm fails to engage, inspect
/proc/sys/net/ipv4/tcp_available_congestion_controlto verify whether your current kernel actually compiled that specific module.
