Skip to content

Thrawl V1.0.0

Choose a tag to compare

@Fawrz Fawrz released this 14 Jun 14:23
· 18 commits to main since this release

Thrawl v1.0.0

Adaptive memory management for rooted Android. Tunes swappiness, ZRAM, swap, and LMKD in real time — written in Rust, packaged as a Magisk module.


What's new

This is the first release. Thrawl is a single thrawld binary that replaces scattered shell scripts with a Rust daemon:

  • PSI backend (Kernel 4.20+): reads /proc/pressure/memory, adjusts swappiness dynamically
  • Legacy backend (Kernel 3.18 - 4.19): meminfo-based hysteresis state machine
  • ZRAM hot-plug: add/remove ZRAM devices, auto-sized from MemTotal
  • Swap file management: mkswap/swapon/swapoff with timeout protection
  • LMKD tuning: PSI vs minfree property switching
  • UFFD GC: Android 12-13 userfaultfd garbage collection
  • Persistent logcat: size-based rotation, daemon activity log
  • Hot-reload: SIGHUP reloads config without restart
  • Stale PID recovery: auto-clean on crash

Install

  1. Download thrawl-v1.0.0.zip
  2. Open Magisk Manager → Modules → Install from storage
  3. Reboot

Or via ADB:

adb push thrawl-v1.0.0.zip /sdcard/
adb shell su -c 'magisk --install-module /sdcard/thrawl-v1.0.0.zip'
adb reboot

Verify

adb shell su -c 'pgrep -af thrawld'

Config

Edit /data/adb/thrawl/config.conf, then reload:

adb shell su -c 'kill -HUP $(cat /data/adb/modules/thrawl/data/flags/thrawld.pid)'

Default config works out of the box. See README for all options.

Requirements

  • Magisk 20.4+
  • Android 8.0 - 13
  • Root access