← back to index · 2026-12-02

Preventing Backup Wipes on Pwnagotchi MemoryFS Write-Back

pwnagotchi python wifi

Repo: kwaadrat/pwnagotchi · Branch: fix/fs-memory-sync-and-delete-after · Commit: 52655ba

The Risk

Pwnagotchi mounts volatile RAM/zram overlays over SD card paths to reduce flash wear, then periodically syncs back to disk. If a mount was already active or a mount step hit an error, re-initializing zram or syncing an unready overlay risked corrupting or wiping backed-up files.

Hardening pwnagotchi/fs/__init__.py